Changeset 9171 for sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php
- Timestamp:
- 10/10/2019 05:38:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php
r9106 r9171 40 40 public function __construct() { 41 41 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 42 add_action( 'init', array( $this, 'schedule_cron_jobs' ) ); 42 43 add_action( 'owpe_prime_events_cache', array( $this, 'prime_events_cache' ) ); 43 44 add_action( 'owpe_mark_deleted_meetups', array( $this, 'mark_deleted_meetups' ) ); … … 45 46 46 47 add_shortcode( 'official_wordpress_events', array( $this, 'render_events' ) ); 47 48 } 49 50 /** 51 * Schedule cron jobs. 52 * 53 * This needs to run on the `init` action, because Cavalcade isn't fully loaded before that, and events 54 * wouldn't be scheduled. 55 * 56 * @see https://dotorg.trac.wordpress.org/changeset/15351/ 57 */ 58 public function schedule_cron_jobs() { 48 59 if ( ! wp_next_scheduled( 'owpe_prime_events_cache' ) ) { 49 60 wp_schedule_event( time(), 'hourly', 'owpe_prime_events_cache' );
Note: See TracChangeset
for help on using the changeset viewer.