Plugin Directory

Changeset 2289464


Ignore:
Timestamp:
04/22/2020 04:09:43 PM (6 years ago)
Author:
jomisica
Message:

Configure the cron job when saving the options and clearing the cache

Location:
optimum-gravatar-cache
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • optimum-gravatar-cache/tags/1.4.6/changelog.txt

    r2098208 r2289464  
     1= 1.4.5 =
     2
     3* From this version any user who has the capability to 'manage_options' can configure the plugin. Until 1.4.4 only Admin could configure the plugin.
     4
    15= 1.4.4 =
    26
  • optimum-gravatar-cache/tags/1.4.6/optimum-gravatar-cache.php

    r2098208 r2289464  
    33Plugin Name: Optimum Gravatar Cache
    44Plugin URI:   https://www.ncdc.pt/groups/wordpress-optimum-gravatar-cache/
    5 Version: 1.4.5
     5Version: 1.4.6
    66Author: José Miguel Silva Caldeira
    77License:      GPL3
     
    2626    protected $pluginSlug = 'optimum-gravatar-cache';
    2727    protected $pluginDirectory;
    28     protected $pluginVersion = '1.4.5';
     28    protected $pluginVersion = '1.4.6';
    2929    protected $cacheDirectory;
    3030    protected $expireTime;
     
    301301        }
    302302    }
     303    public function reSetCronEvent()
     304    {
     305        if (wp_next_scheduled('OGC_CronEvent')) {
     306            wp_clear_scheduled_hook('OGC_CronEvent');
     307            wp_schedule_event(time() + 5, 'OGC_job', 'OGC_CronEvent');
     308        }
     309    }
    303310
    304311    protected function getCurrentDefaultAvatar()
     
    715722            "args"=>array()
    716723          );
     724          $this->reSetCronEvent();
    717725        }
    718726
     
    30883096              "args"=>array()
    30893097            );
     3098            $this->reSetCronEvent();
    30903099        }
    30913100        update_option('OGC_options', $this->options);
  • optimum-gravatar-cache/tags/1.4.6/readme.txt

    r2098212 r2289464  
    77Requires MySQL at least: 5.0.95
    88Requires at least: 4.7
    9 Tested up to: 5.2.1
    10 Stable tag: 1.4.5
     9Tested up to: 5.4
     10Stable tag: 1.4.6
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    128128== Upgrade Notice ==
    129129
    130 = 1.4.5 =
     130= 1.4.6 =
    131131
    132 From this version any user who has the capability to 'manage_options' can configure the plugin.
     132The plugin did not reset the cron job. This is problematic when clearing the cache and when modifying the "Check for outdated Gravatars every" time in the plugin settings. At this time, whenever the cache is cleared or the cache options are saved, the cron job is reconfigured.
    133133
    134134== Changelog ==
    135135
    136 = 1.4.5 =
     136= 1.4.6 =
    137137
    138 * From this version any user who has the capability to 'manage_options' can configure the plugin. Until 1.4.4 only Admin could configure the plugin.
     138* The plugin did not reset the cron job. This is problematic when clearing the cache and when modifying the "Check for outdated Gravatars every" time in the plugin settings. At this time, whenever the cache is cleared or the cache options are saved, the cron job is reconfigured.
    139139
  • optimum-gravatar-cache/tags/1.4.6/upgradenotice.txt

    r2098208 r2289464  
     1= 1.4.5 =
     2
     3From this version any user who has the capability to 'manage_options' can configure the plugin.
     4
    15= 1.4.4 =
    26
  • optimum-gravatar-cache/trunk/changelog.txt

    r2098208 r2289464  
     1= 1.4.5 =
     2
     3* From this version any user who has the capability to 'manage_options' can configure the plugin. Until 1.4.4 only Admin could configure the plugin.
     4
    15= 1.4.4 =
    26
  • optimum-gravatar-cache/trunk/optimum-gravatar-cache.php

    r2098208 r2289464  
    33Plugin Name: Optimum Gravatar Cache
    44Plugin URI:   https://www.ncdc.pt/groups/wordpress-optimum-gravatar-cache/
    5 Version: 1.4.5
     5Version: 1.4.6
    66Author: José Miguel Silva Caldeira
    77License:      GPL3
     
    2626    protected $pluginSlug = 'optimum-gravatar-cache';
    2727    protected $pluginDirectory;
    28     protected $pluginVersion = '1.4.5';
     28    protected $pluginVersion = '1.4.6';
    2929    protected $cacheDirectory;
    3030    protected $expireTime;
     
    301301        }
    302302    }
     303    public function reSetCronEvent()
     304    {
     305        if (wp_next_scheduled('OGC_CronEvent')) {
     306            wp_clear_scheduled_hook('OGC_CronEvent');
     307            wp_schedule_event(time() + 5, 'OGC_job', 'OGC_CronEvent');
     308        }
     309    }
    303310
    304311    protected function getCurrentDefaultAvatar()
     
    715722            "args"=>array()
    716723          );
     724          $this->reSetCronEvent();
    717725        }
    718726
     
    30883096              "args"=>array()
    30893097            );
     3098            $this->reSetCronEvent();
    30903099        }
    30913100        update_option('OGC_options', $this->options);
  • optimum-gravatar-cache/trunk/readme.txt

    r2098212 r2289464  
    77Requires MySQL at least: 5.0.95
    88Requires at least: 4.7
    9 Tested up to: 5.2.1
    10 Stable tag: 1.4.5
     9Tested up to: 5.4
     10Stable tag: 1.4.6
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    128128== Upgrade Notice ==
    129129
    130 = 1.4.5 =
     130= 1.4.6 =
    131131
    132 From this version any user who has the capability to 'manage_options' can configure the plugin.
     132The plugin did not reset the cron job. This is problematic when clearing the cache and when modifying the "Check for outdated Gravatars every" time in the plugin settings. At this time, whenever the cache is cleared or the cache options are saved, the cron job is reconfigured.
    133133
    134134== Changelog ==
    135135
    136 = 1.4.5 =
     136= 1.4.6 =
    137137
    138 * From this version any user who has the capability to 'manage_options' can configure the plugin. Until 1.4.4 only Admin could configure the plugin.
     138* The plugin did not reset the cron job. This is problematic when clearing the cache and when modifying the "Check for outdated Gravatars every" time in the plugin settings. At this time, whenever the cache is cleared or the cache options are saved, the cron job is reconfigured.
    139139
  • optimum-gravatar-cache/trunk/upgradenotice.txt

    r2098208 r2289464  
     1= 1.4.5 =
     2
     3From this version any user who has the capability to 'manage_options' can configure the plugin.
     4
    15= 1.4.4 =
    26
Note: See TracChangeset for help on using the changeset viewer.