Changeset 3291054
- Timestamp:
- 05/10/2025 11:41:45 PM (7 months ago)
- Location:
- clarity-ad-blocker
- Files:
-
- 2 deleted
- 2 edited
- 1 copied
-
tags/1.4.1 (copied) (copied from clarity-ad-blocker/trunk)
-
tags/1.4.1/.aidigestignore (deleted)
-
tags/1.4.1/clarity-ad-blocker.php (modified) (3 diffs)
-
trunk/.aidigestignore (deleted)
-
trunk/clarity-ad-blocker.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
clarity-ad-blocker/tags/1.4.1/clarity-ad-blocker.php
r3291045 r3291054 6 6 * Description: Remove nags and upsells from popular WordPress plugins. 7 7 * Author: khromov 8 * Version: 1.4 8 * Version: 1.4.1 9 9 * Requires at least: 5.0 10 10 * Tested up to: 6.7 … … 49 49 add_action( 'after_setup_theme', [ $this, 'themes_loaded' ] ); 50 50 add_action( $this->cron_hook, [ $this, 'update_definitions_from_remote' ] ); 51 add_action( 'upgrader_process_complete', [ $this, 'handle_plugin_update' ], 10, 2 );52 51 add_filter( 'plugin_action_links_clarity-ad-blocker/clarity-ad-blocker.php', [ $this, 'filter_plugin_action_links' ] ); 53 52 add_action( 'cli_init', [ $this, 'cli_init' ] ); 54 }55 56 /**57 * Handle plugin update58 */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 }74 53 } 75 54 … … 212 191 define( 'METASLIDER_DISABLE_SEASONAL_NOTICES', true ); 213 192 } 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 } 214 199 } 215 200 -
clarity-ad-blocker/trunk/clarity-ad-blocker.php
r3291045 r3291054 6 6 * Description: Remove nags and upsells from popular WordPress plugins. 7 7 * Author: khromov 8 * Version: 1.4 8 * Version: 1.4.1 9 9 * Requires at least: 5.0 10 10 * Tested up to: 6.7 … … 49 49 add_action( 'after_setup_theme', [ $this, 'themes_loaded' ] ); 50 50 add_action( $this->cron_hook, [ $this, 'update_definitions_from_remote' ] ); 51 add_action( 'upgrader_process_complete', [ $this, 'handle_plugin_update' ], 10, 2 );52 51 add_filter( 'plugin_action_links_clarity-ad-blocker/clarity-ad-blocker.php', [ $this, 'filter_plugin_action_links' ] ); 53 52 add_action( 'cli_init', [ $this, 'cli_init' ] ); 54 }55 56 /**57 * Handle plugin update58 */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 }74 53 } 75 54 … … 212 191 define( 'METASLIDER_DISABLE_SEASONAL_NOTICES', true ); 213 192 } 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 } 214 199 } 215 200
Note: See TracChangeset
for help on using the changeset viewer.