Plugin Directory

Changeset 2227663


Ignore:
Timestamp:
01/15/2020 09:58:15 AM (6 years ago)
Author:
melkarim
Message:

new release

Location:
addefend-easy-integration
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • addefend-easy-integration/tags/1.7/Components/script_integration.php

    r2104005 r2227663  
    2121add_filter( 'cron_schedules', 'addefend_add_script_update_frequency');
    2222function addefend_add_script_update_frequency($schedules ) {
    23     $schedules['everyfiveminutes'] = array(
    24         'interval' => 300,
    25         'display' => __('Every Five Minutes')
    26     );
    27     // this is for testing
    28     $schedules['every10seconds'] = array(
    29         'interval' => 10,
    30         'display' => __('Every ten Seconds')
    31     );
     23    if(!isset($schedules['everyfiveminutes'])) {
     24        $schedules['everyfiveminutes'] = array(
     25            'interval' => 300,
     26            'display' => __('Every Five Minutes')
     27        );
     28    }
     29    if(!isset($schedules['every10seconds'])) {
     30        // this is for testing
     31        $schedules['every10seconds'] = array(
     32            'interval' => 10,
     33            'display' => __('Every ten Seconds')
     34        );
     35    }
    3236    return $schedules;
    3337}
     
    8690        addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
    8791    }
    88     if ( !wp_next_scheduled( 'out_of_date_script' ) ) {
    89         wp_schedule_event( time(), 'hourly', 'out_of_date_script');
     92    $nextScriptUpdateDate = wp_next_scheduled( 'out_of_date_script' );
     93    if ( $nextScriptUpdateDate ) {
     94        addefend_log('ADDEFEND -- TRACE : the next script update is scheduled for ' . date('l jS \of F Y h:i:s A', $nextScriptUpdateDate));
     95    } else {
     96        addefend_log('ADDEFEND -- ERROR : Script Update schedule does not exist, trying to re-create it...');
     97        $existingSchedules = wp_get_schedules();
     98        if (wp_schedule_event( time(), 'everyfiveminutes', 'out_of_date_script')) {
     99            addefend_log('ADDEFEND -- TRACE : successfully rescheduled the Script Update for every five minutes');
     100        } else if (wp_schedule_event( time(), 'hourly', 'out_of_date_script')) {
     101            addefend_log('ADDEFEND -- TRACE : successfully rescheduled the Script Update for every one hour');
     102        } else {
     103            addefend_log('ADDEFEND -- ERROR : failed to reschedule the Script Update - time() = ' . time() . ' | existingSchedules = ' . $existingSchedules);
     104        }
    90105    }
    91106}
  • addefend-easy-integration/tags/1.7/addefend-easy-integration.php

    r2104005 r2227663  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.6
     6Version: 1.7
    77Author: AdDefend GmbH
    88Author URI: http://www.addefend.com/
  • addefend-easy-integration/tags/1.7/readme.txt

    r2104005 r2227663  
    33Tags: unblock, unblockable, ads, addefend, ad recovery, recover ads, anti-adblocker, online advertising, digital advertising, ad reinsertion, counter block, block adblock, ad block blocker, adblock advertising
    44Requires at least: 4.2
    5 Tested up to: 5.2.1
    6 Stable tag: 1.6
     5Tested up to: 5.3.2
     6Stable tag: 1.7
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    5252== Changelog ==
    5353
     54= 1.7 =
     55* improve the automatic Cron job recovery
     56
    5457= 1.4 =
    5558* content-proxy integration was improved
  • addefend-easy-integration/trunk/Components/script_integration.php

    r2104005 r2227663  
    2121add_filter( 'cron_schedules', 'addefend_add_script_update_frequency');
    2222function addefend_add_script_update_frequency($schedules ) {
    23     $schedules['everyfiveminutes'] = array(
    24         'interval' => 300,
    25         'display' => __('Every Five Minutes')
    26     );
    27     // this is for testing
    28     $schedules['every10seconds'] = array(
    29         'interval' => 10,
    30         'display' => __('Every ten Seconds')
    31     );
     23    if(!isset($schedules['everyfiveminutes'])) {
     24        $schedules['everyfiveminutes'] = array(
     25            'interval' => 300,
     26            'display' => __('Every Five Minutes')
     27        );
     28    }
     29    if(!isset($schedules['every10seconds'])) {
     30        // this is for testing
     31        $schedules['every10seconds'] = array(
     32            'interval' => 10,
     33            'display' => __('Every ten Seconds')
     34        );
     35    }
    3236    return $schedules;
    3337}
     
    8690        addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
    8791    }
    88     if ( !wp_next_scheduled( 'out_of_date_script' ) ) {
    89         wp_schedule_event( time(), 'hourly', 'out_of_date_script');
     92    $nextScriptUpdateDate = wp_next_scheduled( 'out_of_date_script' );
     93    if ( $nextScriptUpdateDate ) {
     94        addefend_log('ADDEFEND -- TRACE : the next script update is scheduled for ' . date('l jS \of F Y h:i:s A', $nextScriptUpdateDate));
     95    } else {
     96        addefend_log('ADDEFEND -- ERROR : Script Update schedule does not exist, trying to re-create it...');
     97        $existingSchedules = wp_get_schedules();
     98        if (wp_schedule_event( time(), 'everyfiveminutes', 'out_of_date_script')) {
     99            addefend_log('ADDEFEND -- TRACE : successfully rescheduled the Script Update for every five minutes');
     100        } else if (wp_schedule_event( time(), 'hourly', 'out_of_date_script')) {
     101            addefend_log('ADDEFEND -- TRACE : successfully rescheduled the Script Update for every one hour');
     102        } else {
     103            addefend_log('ADDEFEND -- ERROR : failed to reschedule the Script Update - time() = ' . time() . ' | existingSchedules = ' . $existingSchedules);
     104        }
    90105    }
    91106}
  • addefend-easy-integration/trunk/addefend-easy-integration.php

    r2104005 r2227663  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.6
     6Version: 1.7
    77Author: AdDefend GmbH
    88Author URI: http://www.addefend.com/
  • addefend-easy-integration/trunk/readme.txt

    r2104005 r2227663  
    33Tags: unblock, unblockable, ads, addefend, ad recovery, recover ads, anti-adblocker, online advertising, digital advertising, ad reinsertion, counter block, block adblock, ad block blocker, adblock advertising
    44Requires at least: 4.2
    5 Tested up to: 5.2.1
    6 Stable tag: 1.6
     5Tested up to: 5.3.2
     6Stable tag: 1.7
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    5252== Changelog ==
    5353
     54= 1.7 =
     55* improve the automatic Cron job recovery
     56
    5457= 1.4 =
    5558* content-proxy integration was improved
Note: See TracChangeset for help on using the changeset viewer.