Plugin Directory

Changeset 574317


Ignore:
Timestamp:
07/18/2012 10:03:05 PM (14 years ago)
Author:
Marko-M
Message:

Minor database auto update code change

Location:
quick-browscap/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • quick-browscap/trunk/languages/quick-browscap.pot

    r574291 r574317  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Quick Browscap 1.00\n"
     3"Project-Id-Version: Quick Browscap 1.01\n"
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2012-07-18 22:47+0100\n"
  • quick-browscap/trunk/quick-browscap.php

    r574294 r574317  
    55Description: Quickly get browser capabilities from built in browser capabilities database
    66Author: Marko Martinović
    7 Version: 1.00
     7Version: 1.01
    88Author URI: http://www.techytalk.info
    99License: GPL2
     
    2626
    2727class Quick_Browscap{
    28     const version = '1.00';
     28    const version = '1.01';
    2929    const name = 'Quick Browscap';
    3030    const slug = 'quick-browscap';
     
    8686
    8787        if(isset($this->options['auto_update'])){
    88             add_action('quick_browscap_update', array($this, 'do_auto_update'));
     88            add_action(self::safe_slug.'_update', array($this, 'do_auto_update'));
    8989            add_filter('cron_schedules', array($this, 'custom_schedule'));       
    9090            register_deactivation_hook(__FILE__, array($this, 'deschedule_update'));
     
    9797
    9898    public function schedule_update(){
    99         if(!wp_next_scheduled('quick_browscap_update')){
    100             wp_schedule_event(time(), 'quick_browscap_weekly', 'quick_browscap_update');       
     99        if(!wp_next_scheduled(self::safe_slug.'_update')){
     100            wp_schedule_event(time(), self::safe_slug.'_weekly', self::safe_slug.'_update');       
    101101
    102102            if(isset($this->options['debug_mode']) || (defined('WP_DEBUG') && WP_DEBUG)){
     
    108108
    109109    public function deschedule_update(){
    110         if(wp_next_scheduled('quick_browscap_update')){
    111             wp_clear_scheduled_hook('quick_browscap_update');
     110        if(wp_next_scheduled(self::safe_slug.'_update')){
     111            wp_clear_scheduled_hook(self::safe_slug.'_update');
    112112
    113113            if(isset($this->options['debug_mode']) || (defined('WP_DEBUG') && WP_DEBUG)){
     
    119119
    120120    function custom_schedule($schedules){
    121         $schedules['quick_browscap_weekly'] = array(
     121        $schedules[self::safe_slug.'_weekly'] = array(
    122122            'interval'=> 604800,
    123123            'display'=>  __('every week', self::slug)
  • quick-browscap/trunk/readme.txt

    r574291 r574317  
    130130
    131131== Changelog ==
     132= 1.01 (19.07.2012.) =
     133*   Minor database auto update code change
     134
    132135= 1.00 (19.07.2012.) =
    133136*   Initial release
Note: See TracChangeset for help on using the changeset viewer.