Plugin Directory

Changeset 3291054


Ignore:
Timestamp:
05/10/2025 11:41:45 PM (7 months ago)
Author:
khromov
Message:

Update to version 1.4.1 from GitHub

Location:
clarity-ad-blocker
Files:
2 deleted
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • clarity-ad-blocker/tags/1.4.1/clarity-ad-blocker.php

    r3291045 r3291054  
    66 * Description: Remove nags and upsells from popular WordPress plugins.
    77 * Author:      khromov
    8  * Version:     1.4
     8 * Version:     1.4.1
    99 * Requires at least: 5.0
    1010 * Tested up to: 6.7
     
    4949        add_action( 'after_setup_theme', [ $this, 'themes_loaded' ] );
    5050        add_action( $this->cron_hook, [ $this, 'update_definitions_from_remote' ] );
    51         add_action( 'upgrader_process_complete', [ $this, 'handle_plugin_update' ], 10, 2 );
    5251        add_filter( 'plugin_action_links_clarity-ad-blocker/clarity-ad-blocker.php', [ $this, 'filter_plugin_action_links' ] );
    5352        add_action( 'cli_init', [ $this, 'cli_init' ] );
    54     }
    55 
    56     /**
    57      * Handle plugin update
    58      */
    59     function handle_plugin_update( $upgrader_object, $options ) {
    60         if ( $options['action'] !== 'update' || $options['type'] !== 'plugin' ) {
    61             return;
    62         }
    63 
    64         if ( ! isset( $options['plugins'] ) || ! in_array( plugin_basename( __FILE__ ), $options['plugins'] ) ) {
    65             return;
    66         }
    67 
    68         do_action( 'qm/info', 'Clarity plugin update detected' );
    69 
    70         if ( ! wp_next_scheduled( $this->cron_hook ) ) {
    71             wp_schedule_event( time(), 'daily', $this->cron_hook );
    72             do_action( 'qm/info', 'Scheduled definitions update CRON job after plugin update' );
    73         }
    7453    }
    7554
     
    212191            define( 'METASLIDER_DISABLE_SEASONAL_NOTICES', true );
    213192        }
     193       
     194        // Check if CRON job is scheduled and schedule it if not
     195        if ( ! wp_next_scheduled( $this->cron_hook ) ) {
     196            wp_schedule_event( time(), 'daily', $this->cron_hook );
     197            do_action( 'qm/info', 'Scheduled definitions update CRON job in plugins_loaded' );
     198        }
    214199    }
    215200
  • clarity-ad-blocker/trunk/clarity-ad-blocker.php

    r3291045 r3291054  
    66 * Description: Remove nags and upsells from popular WordPress plugins.
    77 * Author:      khromov
    8  * Version:     1.4
     8 * Version:     1.4.1
    99 * Requires at least: 5.0
    1010 * Tested up to: 6.7
     
    4949        add_action( 'after_setup_theme', [ $this, 'themes_loaded' ] );
    5050        add_action( $this->cron_hook, [ $this, 'update_definitions_from_remote' ] );
    51         add_action( 'upgrader_process_complete', [ $this, 'handle_plugin_update' ], 10, 2 );
    5251        add_filter( 'plugin_action_links_clarity-ad-blocker/clarity-ad-blocker.php', [ $this, 'filter_plugin_action_links' ] );
    5352        add_action( 'cli_init', [ $this, 'cli_init' ] );
    54     }
    55 
    56     /**
    57      * Handle plugin update
    58      */
    59     function handle_plugin_update( $upgrader_object, $options ) {
    60         if ( $options['action'] !== 'update' || $options['type'] !== 'plugin' ) {
    61             return;
    62         }
    63 
    64         if ( ! isset( $options['plugins'] ) || ! in_array( plugin_basename( __FILE__ ), $options['plugins'] ) ) {
    65             return;
    66         }
    67 
    68         do_action( 'qm/info', 'Clarity plugin update detected' );
    69 
    70         if ( ! wp_next_scheduled( $this->cron_hook ) ) {
    71             wp_schedule_event( time(), 'daily', $this->cron_hook );
    72             do_action( 'qm/info', 'Scheduled definitions update CRON job after plugin update' );
    73         }
    7453    }
    7554
     
    212191            define( 'METASLIDER_DISABLE_SEASONAL_NOTICES', true );
    213192        }
     193       
     194        // Check if CRON job is scheduled and schedule it if not
     195        if ( ! wp_next_scheduled( $this->cron_hook ) ) {
     196            wp_schedule_event( time(), 'daily', $this->cron_hook );
     197            do_action( 'qm/info', 'Scheduled definitions update CRON job in plugins_loaded' );
     198        }
    214199    }
    215200
Note: See TracChangeset for help on using the changeset viewer.