Plugin Directory

Changeset 3266222


Ignore:
Timestamp:
04/03/2025 10:10:13 AM (11 months ago)
Author:
epiphanyit321
Message:

Updating plugin to version 1.1.1 and adding bulk delete functionality

Location:
referral-link-tracker
Files:
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • referral-link-tracker/tags/1.1.1/js/activitytracker.js

    r3263478 r3266222  
    2727        columns: [
    2828            {
     29                data: null,
     30                render: function(data, type, row) {
     31                    return '<input type="checkbox" class="generated_links" name="generate_links" value="'+data.url+'">';
     32                },
     33                title: '<input type="checkbox" class="all_links" name="generate_links">',
     34            },
     35            {
    2936                data: function(data, type, row) {
    3037                    let href = domain+data.url;
     
    6067    tracking_log_table = $('#tracking_log_table').DataTable({
    6168        "scrollY": "400px", 
    62         order: [["3",'desc']],
     69        order: [["4",'desc']],
    6370        ajax:{
    6471            url: ajax_object.ajaxurl,
     
    7380        },
    7481        columns:[
     82            {
     83                data: null,
     84                render: function(data, type, row) {
     85                    return '<input type="checkbox" class="generated_links" name="generate_links" value="'+ row.id +'">';
     86                },
     87                title: '<input type="checkbox" class="all_links" name="generate_links">',
     88            },
    7589            {
    7690                data:'tracking_status',
     
    193207
    194208        var trackingid = jQuery(this).data('id');
    195         console.log(trackingid);
    196         console.log(nonce);
    197209
    198210        if (trackingid) {
     
    317329    }
    318330}
     331
     332jQuery(document).ready(function($){
     333    $(document).on('change','.all_links',function(){
     334        let is_checked = $(this).is(':checked');
     335        $(document).find('.generated_links').prop('checked',is_checked);
     336        showOrHideBulkDeleteBtn(is_checked);
     337    })
     338
     339    $(document).on('change','.generated_links',function(){
     340        let totalCheckboxes = $('.generated_links').length;
     341        let checkedCheckboxes = $('.generated_links:checked').length;
     342
     343        $('.all_links').prop('checked', totalCheckboxes === checkedCheckboxes)
     344        showOrHideBulkDeleteBtn(checkedCheckboxes > 0);
     345    })
     346
     347    $(document).on('click','#bulk-link-delete',function(){
     348
     349        var confirmDelete = confirm("Are you sure you want to delete?");
     350        if(!confirmDelete){
     351            return false;
     352        }
     353        var checkedValues = $(".generated_links:checked").map(function() {
     354            return $(this).val();
     355        }).get();
     356
     357        $.ajax({
     358            type: "POST",
     359            url: ajax_object.ajaxurl,
     360            dataType: "JSON",
     361            data: {
     362                'nonce' : nonce,
     363                'action': 'bulk_delete_generated_link',
     364                 data :checkedValues,
     365            },
     366            success: function(response) {
     367
     368                $("#dialog").html(response.message);     
     369                $("#dialog")[0].showModal();
     370                setTimeout(function () {
     371                    $("#dialog")[0].close();
     372                }, 1000);
     373
     374                setTimeout(function () {
     375                    table.ajax.reload();
     376                    showOrHideBulkDeleteBtn(false);
     377                }, 1000);
     378            },
     379            error: function(xhr, ajaxOptions,thrownError) {
     380                if(debug_mode){
     381                    if (thrownError == 'abort' || thrownError == 'undefined') return;
     382                    console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
     383                }else{
     384                    console.log(xhr.responseText);
     385                }
     386               
     387            }
     388        });
     389       
     390    })
     391
     392    $(document).on('click','#bulk-logs-delete',function(){
     393
     394        var confirmDelete = confirm("Are you sure you want to delete?");
     395        if(!confirmDelete){
     396            return false;
     397        }
     398        var checkedValues = $(".generated_links:checked").map(function() {
     399            return $(this).val();
     400        }).get();
     401
     402        $.ajax({
     403            type: "POST",
     404            url: ajax_object.ajaxurl,
     405            dataType: "JSON",
     406            data: {
     407                'nonce' : nonce,
     408                'action': 'bulk_delete_tracking_logs',
     409                 data :checkedValues,
     410            },
     411            success: function(response) {
     412                tracking_log_table.ajax.reload();
     413                showOrHideBulkDeleteBtn(false);
     414            },
     415            error: function(xhr, ajaxOptions,thrownError) {
     416                if(debug_mode){
     417                    if (thrownError == 'abort' || thrownError == 'undefined') return;
     418                    console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
     419                }else{
     420                    console.log(xhr.responseText);
     421                }
     422               
     423            }
     424        });
     425       
     426    })
     427
     428})
     429
     430function showOrHideBulkDeleteBtn(check = false){
     431    if(check){
     432        jQuery('.bulk-delete').show();
     433    }else{
     434        jQuery('.bulk-delete').hide();
     435    }
     436}
  • referral-link-tracker/tags/1.1.1/readme.txt

    r3263478 r3266222  
    55Requires at least: 4.7
    66Tested up to: 6.7
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    8181* Updated logic for logging urls
    8282* Changed UI of data tables
     83
     84= v1.1.1 =
     85* Added the functionality of bulk delete.
  • referral-link-tracker/tags/1.1.1/referral-link-tracker.php

    r3263478 r3266222  
    44 * Plugin URI:        https://www.epiphanyinfotech.com/contact/
    55 * Description:       Track user activity seamlessly, identify referrers, and optimize marketing with our  efficient Tracking Logs plugin.
    6  * Version:           1.1.0
     6 * Version:           1.1.1
    77 * Requires at least: 4.7
    88 * Requires PHP:      7.2
     
    1616    die("No direct script access allowed");
    1717}
     18
     19require_once ABSPATH . "wp-admin/includes/upgrade.php";
    1820
    1921/*
     
    121123
    122124function rlt846271_get_url_basename($uri){
    123     return parse_url($uri, PHP_URL_PATH);
     125    return wp_parse_url($uri, PHP_URL_PATH);
    124126}
    125127
    126128function rlt846271_get_url_query_strings($uri){
    127     $url_query = parse_url($uri, PHP_URL_QUERY);
     129    $url_query = wp_parse_url($uri, PHP_URL_QUERY);
    128130    $url_params = [];
    129131    if ($url_query) {
     
    143145    global $wpdb;
    144146    $table_name = $wpdb->prefix . "url_tracking_logs";
    145 
    146     $sql = $wpdb->prepare(
    147         "CREATE TABLE IF NOT EXISTS " .
    148             $table_name .
    149             " (
     147    $safe_table_name = esc_sql($table_name);
     148
     149    // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     150    $sql = $wpdb->prepare("CREATE TABLE IF NOT EXISTS ".$safe_table_name." (
    150151            id int(11) NOT NULL AUTO_INCREMENT,
    151152            tracking_status varchar(250) NOT NULL,
     
    157158    );
    158159
    159     require_once ABSPATH . "wp-admin/includes/upgrade.php";
    160160    dbDelta($sql);
    161161
    162     $check_column = $wpdb->get_results("SHOW COLUMNS FROM `$table_name` LIKE 'match_all'");
     162    // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     163    $check_column = $wpdb->get_results("SHOW COLUMNS FROM `".$safe_table_name."` LIKE 'match_all'");
    163164
    164165    if (empty($check_column)) {
    165         $wpdb->query("ALTER TABLE `$table_name` ADD `match_all` int(11) NOT NULL");
    166         $wpdb->query("UPDATE `$table_name` SET `match_all` = '1'");
     166        $alterSql = "ALTER TABLE `$safe_table_name` ADD `match_all` INT(11) NOT NULL;";
     167        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     168        $wpdb->query($alterSql);
     169        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     170        $wpdb->query("UPDATE `". $table_name ."` SET `match_all` = 1");
    167171    }
    168172
     
    203207        $script_url,
    204208        ["jquery"],
    205         "1.0.1",
     209        "1.0.2",
    206210        true
    207211    );
     
    290294            <h5></h5>
    291295            <div>
     296                <button class="bulk-delete btn btn-danger ms-5" id="bulk-logs-delete" style="display: none;">Bulk Delete</button>
    292297                <a href="javascript:void(0);" class="btn btn-danger delete-all-logs">Delete All Logs</a>
    293298            </div>
     
    358363    global $wpdb;
    359364    $table_name = $wpdb->prefix . "url_tracking_logs";
    360 
    361     $deleted = $wpdb->delete($table_name, ["id" => $id], ["%d"]);
     365    $deleted = false;
     366    if (!empty($id)) {
     367        $deleted = $wpdb->delete($table_name, ["id" => $id], ["%d"]);
     368    }
    362369    if ($deleted === false) {
    363370        wp_send_json_error("Error Deleting Logs");
     
    480487
    481488            <div class="mb-3 row">
    482                 <input type="checkbox" name="match_all" id="match_all" class="form-control mt-2 mx-2" checked>
    483                 <label for="match_all" class="col-sm-2 col-form-label">Match All</label>
     489                <label class="col-sm-2 col-form-label">Match All</label>
     490                <div class="col-sm-5">
     491                    <input type="checkbox" name="match_all" id="match_all" class="form-control mt-2 mx-2" style="transform: scale(1.5);" checked>
     492                </div>
    484493            </div>
    485494
     
    493502        <div class="card-header" style=" margin-bottom: 25px;">
    494503            Tracking logs
     504            <button class="bulk-delete btn btn-danger ms-5" id="bulk-link-delete" style="display: none;">Bulk Delete</button>
    495505        </div>
    496506            <!-- Datatable to show the generated links -->
     
    693703    ]);
    694704}
     705
     706//Function to delete bulk row
     707add_action("wp_ajax_bulk_delete_generated_link", "rlt846271_bulk_delete_generated_link");
     708function rlt846271_bulk_delete_generated_link()
     709{
     710    $nonce = isset($_POST["nonce"])
     711        ? sanitize_text_field(wp_unslash($_POST["nonce"]))
     712        : "";
     713    if (!wp_verify_nonce($nonce, md5("rlt846271_ajax_nonce"))) {
     714        wp_send_json_error("Invalid nonce");
     715    }
     716
     717    $data = isset($_POST["data"])
     718        ? array_map('sanitize_text_field', wp_unslash($_POST['data']))
     719        : null;
     720
     721    $links_arr = get_option("rlt846271_tracking_links");
     722
     723    if (is_array($links_arr)) {
     724        foreach($links_arr as $id => $links){
     725            if(in_array($links['url'], $data)){
     726                unset($links_arr[$id]);
     727            }
     728        }
     729    }
     730
     731    $links_arr = array_values($links_arr);
     732
     733    update_option("rlt846271_tracking_links", $links_arr);
     734
     735    wp_send_json([
     736        "status" => "success",
     737        "message" => "Delete successful",
     738    ]);
     739}
     740
     741//Function to delete bulk row
     742add_action("wp_ajax_bulk_delete_tracking_logs", "rlt846271_bulk_delete_tracking_logs");
     743function rlt846271_bulk_delete_tracking_logs()
     744{
     745    $nonce = isset($_POST["nonce"])
     746        ? sanitize_text_field(wp_unslash($_POST["nonce"]))
     747        : "";
     748    if (!wp_verify_nonce($nonce, md5("rlt846271_ajax_nonce"))) {
     749        wp_send_json_error("Invalid nonce");
     750    }
     751
     752    $ids = isset($_POST["data"]) ? array_map('sanitize_text_field', wp_unslash($_POST['data'])) : null;
     753
     754    global $wpdb;
     755    $table_name = $wpdb->prefix . "url_tracking_logs";
     756
     757    if(!empty($ids)){
     758
     759        foreach ($ids as $id) {
     760            $wpdb->delete($table_name, ['id' => $id], ['%d']);
     761        }
     762
     763        wp_send_json([
     764            "status" => "success",
     765            "message" => "Delete successful",
     766        ]);
     767    }
     768
     769    wp_send_json_error("Error Deleting Logs");
     770}
  • referral-link-tracker/trunk/js/activitytracker.js

    r3263478 r3266222  
    2727        columns: [
    2828            {
     29                data: null,
     30                render: function(data, type, row) {
     31                    return '<input type="checkbox" class="generated_links" name="generate_links" value="'+data.url+'">';
     32                },
     33                title: '<input type="checkbox" class="all_links" name="generate_links">',
     34            },
     35            {
    2936                data: function(data, type, row) {
    3037                    let href = domain+data.url;
     
    6067    tracking_log_table = $('#tracking_log_table').DataTable({
    6168        "scrollY": "400px", 
    62         order: [["3",'desc']],
     69        order: [["4",'desc']],
    6370        ajax:{
    6471            url: ajax_object.ajaxurl,
     
    7380        },
    7481        columns:[
     82            {
     83                data: null,
     84                render: function(data, type, row) {
     85                    return '<input type="checkbox" class="generated_links" name="generate_links" value="'+ row.id +'">';
     86                },
     87                title: '<input type="checkbox" class="all_links" name="generate_links">',
     88            },
    7589            {
    7690                data:'tracking_status',
     
    193207
    194208        var trackingid = jQuery(this).data('id');
    195         console.log(trackingid);
    196         console.log(nonce);
    197209
    198210        if (trackingid) {
     
    317329    }
    318330}
     331
     332jQuery(document).ready(function($){
     333    $(document).on('change','.all_links',function(){
     334        let is_checked = $(this).is(':checked');
     335        $(document).find('.generated_links').prop('checked',is_checked);
     336        showOrHideBulkDeleteBtn(is_checked);
     337    })
     338
     339    $(document).on('change','.generated_links',function(){
     340        let totalCheckboxes = $('.generated_links').length;
     341        let checkedCheckboxes = $('.generated_links:checked').length;
     342
     343        $('.all_links').prop('checked', totalCheckboxes === checkedCheckboxes)
     344        showOrHideBulkDeleteBtn(checkedCheckboxes > 0);
     345    })
     346
     347    $(document).on('click','#bulk-link-delete',function(){
     348
     349        var confirmDelete = confirm("Are you sure you want to delete?");
     350        if(!confirmDelete){
     351            return false;
     352        }
     353        var checkedValues = $(".generated_links:checked").map(function() {
     354            return $(this).val();
     355        }).get();
     356
     357        $.ajax({
     358            type: "POST",
     359            url: ajax_object.ajaxurl,
     360            dataType: "JSON",
     361            data: {
     362                'nonce' : nonce,
     363                'action': 'bulk_delete_generated_link',
     364                 data :checkedValues,
     365            },
     366            success: function(response) {
     367
     368                $("#dialog").html(response.message);     
     369                $("#dialog")[0].showModal();
     370                setTimeout(function () {
     371                    $("#dialog")[0].close();
     372                }, 1000);
     373
     374                setTimeout(function () {
     375                    table.ajax.reload();
     376                    showOrHideBulkDeleteBtn(false);
     377                }, 1000);
     378            },
     379            error: function(xhr, ajaxOptions,thrownError) {
     380                if(debug_mode){
     381                    if (thrownError == 'abort' || thrownError == 'undefined') return;
     382                    console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
     383                }else{
     384                    console.log(xhr.responseText);
     385                }
     386               
     387            }
     388        });
     389       
     390    })
     391
     392    $(document).on('click','#bulk-logs-delete',function(){
     393
     394        var confirmDelete = confirm("Are you sure you want to delete?");
     395        if(!confirmDelete){
     396            return false;
     397        }
     398        var checkedValues = $(".generated_links:checked").map(function() {
     399            return $(this).val();
     400        }).get();
     401
     402        $.ajax({
     403            type: "POST",
     404            url: ajax_object.ajaxurl,
     405            dataType: "JSON",
     406            data: {
     407                'nonce' : nonce,
     408                'action': 'bulk_delete_tracking_logs',
     409                 data :checkedValues,
     410            },
     411            success: function(response) {
     412                tracking_log_table.ajax.reload();
     413                showOrHideBulkDeleteBtn(false);
     414            },
     415            error: function(xhr, ajaxOptions,thrownError) {
     416                if(debug_mode){
     417                    if (thrownError == 'abort' || thrownError == 'undefined') return;
     418                    console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
     419                }else{
     420                    console.log(xhr.responseText);
     421                }
     422               
     423            }
     424        });
     425       
     426    })
     427
     428})
     429
     430function showOrHideBulkDeleteBtn(check = false){
     431    if(check){
     432        jQuery('.bulk-delete').show();
     433    }else{
     434        jQuery('.bulk-delete').hide();
     435    }
     436}
  • referral-link-tracker/trunk/readme.txt

    r3263478 r3266222  
    55Requires at least: 4.7
    66Tested up to: 6.7
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    8181* Updated logic for logging urls
    8282* Changed UI of data tables
     83
     84= v1.1.1 =
     85* Added the functionality of bulk delete.
  • referral-link-tracker/trunk/referral-link-tracker.php

    r3263478 r3266222  
    44 * Plugin URI:        https://www.epiphanyinfotech.com/contact/
    55 * Description:       Track user activity seamlessly, identify referrers, and optimize marketing with our  efficient Tracking Logs plugin.
    6  * Version:           1.1.0
     6 * Version:           1.1.1
    77 * Requires at least: 4.7
    88 * Requires PHP:      7.2
     
    1616    die("No direct script access allowed");
    1717}
     18
     19require_once ABSPATH . "wp-admin/includes/upgrade.php";
    1820
    1921/*
     
    121123
    122124function rlt846271_get_url_basename($uri){
    123     return parse_url($uri, PHP_URL_PATH);
     125    return wp_parse_url($uri, PHP_URL_PATH);
    124126}
    125127
    126128function rlt846271_get_url_query_strings($uri){
    127     $url_query = parse_url($uri, PHP_URL_QUERY);
     129    $url_query = wp_parse_url($uri, PHP_URL_QUERY);
    128130    $url_params = [];
    129131    if ($url_query) {
     
    143145    global $wpdb;
    144146    $table_name = $wpdb->prefix . "url_tracking_logs";
    145 
    146     $sql = $wpdb->prepare(
    147         "CREATE TABLE IF NOT EXISTS " .
    148             $table_name .
    149             " (
     147    $safe_table_name = esc_sql($table_name);
     148
     149    // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     150    $sql = $wpdb->prepare("CREATE TABLE IF NOT EXISTS ".$safe_table_name." (
    150151            id int(11) NOT NULL AUTO_INCREMENT,
    151152            tracking_status varchar(250) NOT NULL,
     
    157158    );
    158159
    159     require_once ABSPATH . "wp-admin/includes/upgrade.php";
    160160    dbDelta($sql);
    161161
    162     $check_column = $wpdb->get_results("SHOW COLUMNS FROM `$table_name` LIKE 'match_all'");
     162    // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     163    $check_column = $wpdb->get_results("SHOW COLUMNS FROM `".$safe_table_name."` LIKE 'match_all'");
    163164
    164165    if (empty($check_column)) {
    165         $wpdb->query("ALTER TABLE `$table_name` ADD `match_all` int(11) NOT NULL");
    166         $wpdb->query("UPDATE `$table_name` SET `match_all` = '1'");
     166        $alterSql = "ALTER TABLE `$safe_table_name` ADD `match_all` INT(11) NOT NULL;";
     167        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     168        $wpdb->query($alterSql);
     169        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Table names cannot be parameterized
     170        $wpdb->query("UPDATE `". $table_name ."` SET `match_all` = 1");
    167171    }
    168172
     
    203207        $script_url,
    204208        ["jquery"],
    205         "1.0.1",
     209        "1.0.2",
    206210        true
    207211    );
     
    290294            <h5></h5>
    291295            <div>
     296                <button class="bulk-delete btn btn-danger ms-5" id="bulk-logs-delete" style="display: none;">Bulk Delete</button>
    292297                <a href="javascript:void(0);" class="btn btn-danger delete-all-logs">Delete All Logs</a>
    293298            </div>
     
    358363    global $wpdb;
    359364    $table_name = $wpdb->prefix . "url_tracking_logs";
    360 
    361     $deleted = $wpdb->delete($table_name, ["id" => $id], ["%d"]);
     365    $deleted = false;
     366    if (!empty($id)) {
     367        $deleted = $wpdb->delete($table_name, ["id" => $id], ["%d"]);
     368    }
    362369    if ($deleted === false) {
    363370        wp_send_json_error("Error Deleting Logs");
     
    480487
    481488            <div class="mb-3 row">
    482                 <input type="checkbox" name="match_all" id="match_all" class="form-control mt-2 mx-2" checked>
    483                 <label for="match_all" class="col-sm-2 col-form-label">Match All</label>
     489                <label class="col-sm-2 col-form-label">Match All</label>
     490                <div class="col-sm-5">
     491                    <input type="checkbox" name="match_all" id="match_all" class="form-control mt-2 mx-2" style="transform: scale(1.5);" checked>
     492                </div>
    484493            </div>
    485494
     
    493502        <div class="card-header" style=" margin-bottom: 25px;">
    494503            Tracking logs
     504            <button class="bulk-delete btn btn-danger ms-5" id="bulk-link-delete" style="display: none;">Bulk Delete</button>
    495505        </div>
    496506            <!-- Datatable to show the generated links -->
     
    693703    ]);
    694704}
     705
     706//Function to delete bulk row
     707add_action("wp_ajax_bulk_delete_generated_link", "rlt846271_bulk_delete_generated_link");
     708function rlt846271_bulk_delete_generated_link()
     709{
     710    $nonce = isset($_POST["nonce"])
     711        ? sanitize_text_field(wp_unslash($_POST["nonce"]))
     712        : "";
     713    if (!wp_verify_nonce($nonce, md5("rlt846271_ajax_nonce"))) {
     714        wp_send_json_error("Invalid nonce");
     715    }
     716
     717    $data = isset($_POST["data"])
     718        ? array_map('sanitize_text_field', wp_unslash($_POST['data']))
     719        : null;
     720
     721    $links_arr = get_option("rlt846271_tracking_links");
     722
     723    if (is_array($links_arr)) {
     724        foreach($links_arr as $id => $links){
     725            if(in_array($links['url'], $data)){
     726                unset($links_arr[$id]);
     727            }
     728        }
     729    }
     730
     731    $links_arr = array_values($links_arr);
     732
     733    update_option("rlt846271_tracking_links", $links_arr);
     734
     735    wp_send_json([
     736        "status" => "success",
     737        "message" => "Delete successful",
     738    ]);
     739}
     740
     741//Function to delete bulk row
     742add_action("wp_ajax_bulk_delete_tracking_logs", "rlt846271_bulk_delete_tracking_logs");
     743function rlt846271_bulk_delete_tracking_logs()
     744{
     745    $nonce = isset($_POST["nonce"])
     746        ? sanitize_text_field(wp_unslash($_POST["nonce"]))
     747        : "";
     748    if (!wp_verify_nonce($nonce, md5("rlt846271_ajax_nonce"))) {
     749        wp_send_json_error("Invalid nonce");
     750    }
     751
     752    $ids = isset($_POST["data"]) ? array_map('sanitize_text_field', wp_unslash($_POST['data'])) : null;
     753
     754    global $wpdb;
     755    $table_name = $wpdb->prefix . "url_tracking_logs";
     756
     757    if(!empty($ids)){
     758
     759        foreach ($ids as $id) {
     760            $wpdb->delete($table_name, ['id' => $id], ['%d']);
     761        }
     762
     763        wp_send_json([
     764            "status" => "success",
     765            "message" => "Delete successful",
     766        ]);
     767    }
     768
     769    wp_send_json_error("Error Deleting Logs");
     770}
Note: See TracChangeset for help on using the changeset viewer.