Plugin Directory

Changeset 2375999


Ignore:
Timestamp:
09/06/2020 08:42:36 AM (6 years ago)
Author:
betacore
Message:

2.1.28

  • Changed the register REST checkup time, less stress on the website...
  • Added some info back to the Callback REST so that setting info can be updated at all times (why did I even take this out in the first place?!)
  • Also checking the PHP version in the Callback REST
  • Fixed a bug where registration didn't fire a callback and a task loop.
Location:
site-auditor
Files:
26 added
3 edited

Legend:

Unmodified
Added
Removed
  • site-auditor/trunk/audit.php

    r2375323 r2375999  
    44* Plugin URI: https://wpaudit.dev
    55* Description: Run automated Google Pagespeed/Lighthouse audits and keep track of your 404 errors all in one plugin.
    6 * Version: 2.1.25
     6* Version: 2.1.28
    77* Author: Rik Janssen
    88* Author URI: https://rikjanssen.info
     
    4242
    4343    if($api['status']==1){
    44         set_transient('bca_ask_account_update', date("Y-m-d H:i:s"), (60*60) * 6 );
     44        set_transient('bca_ask_account_update', date("Y-m-d H:i:s"), (60*60) * 23 );
    4545        return true;
    4646    }else{
    47         set_transient('bca_ask_account_update', date("Y-m-d H:i:s"), (30*60));
     47        set_transient('bca_ask_account_update', date("Y-m-d H:i:s"), (60*60));
    4848        return false;
    4949    }
  • site-auditor/trunk/inc/rest.php

    r2375323 r2375999  
    2727    if(isset($plugin_data['Version'])){ $version = $plugin_data['Version']; }else{ $version = 0; }
    2828   
     29    if(get_option('bca_beta')==''){ $bca_beta = 0; }else{ $bca_beta = get_option('bca_beta'); }
     30    if(get_option('bca_audit_api')==''){ $bca_audit_api = 0; }else{ $bca_audit_api = get_option('bca_audit_api'); }
     31   
    2932    // create the data needed for registration
    3033    $input = array(
     
    3235        'plugin_email'=>$admin_email,
    3336        'plugin_version'=>$version,
    34         'plugin_auto_audit'=>esc_html(get_option('bca_audit_api')),
    35         'plugin_data_share'=>esc_html(get_option('bca_beta')),
     37        'plugin_auto_audit'=>esc_html($bca_audit_api),
     38        'plugin_data_share'=>esc_html($bca_beta),
    3639        'wp_name'=>esc_html(get_bloginfo("name")),
    3740        'wp_description'=>esc_html(get_bloginfo("description")),
     
    185188        }
    186189    }
     190   
     191    if(get_option('bca_email')==''){
     192        $admin_email= esc_html(get_bloginfo('admin_email'));
     193    }else{
     194        $admin_email= esc_html(get_option('bca_email'));
     195    }
     196
     197    if( ! function_exists('get_plugin_data') ){
     198        require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     199    }
     200    $plugin_data = get_plugin_data(dirname(__DIR__).'/audit.php' );
     201    if(isset($plugin_data['Version'])){ $version = $plugin_data['Version']; }else{ $version = 0; }
     202   
     203    $d['settings']['plugin_email'] = $admin_email;
     204    $d['settings']['plugin_version'] = $version;
     205    $d['settings']['plugin_auto_audit'] = esc_html(get_option('bca_audit_api'));
     206    $d['settings']['plugin_data_share'] = esc_html(get_option('bca_beta'));
     207    $d['settings']['wp_name'] = esc_html(get_bloginfo("name"));
     208    $d['settings']['wp_description'] = esc_html(get_bloginfo("description"));
     209    $d['settings']['wp_version'] = esc_html(get_bloginfo("version"));
     210    $d['settings']['wp_language'] = esc_html(get_bloginfo("language"));
     211    $d['settings']['php_version'] = esc_html(phpversion());
     212
    187213
    188214    return $d;
  • site-auditor/trunk/readme.txt

    r2375323 r2375999  
    66Tested up to: 5.5
    77Requires PHP: 7
    8 Stable tag: 2.1.25
     8Stable tag: 2.1.28
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    4545
    4646== Changelog ==
     47= 2.1.28 =
     48* Changed the register REST checkup time, less stress on the website...
     49* Added some info back to the Callback REST so that setting info can be updated at all times (why did I even take this out in the first place?!)
     50* Also checking the PHP version in the Callback REST
     51* Fixed a bug where registration didn't fire a callback and a task loop.
     52
    4753= 2.1.25 =
    4854* Foreach error on an empty callback on pagespeed page
Note: See TracChangeset for help on using the changeset viewer.