Changeset 7685 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php
- Timestamp:
- 09/20/2018 08:43:38 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-loader.php
r7607 r7685 20 20 add_action( 'init', array( $this, 'register_post_statuses' ) ); 21 21 add_filter( 'pre_get_posts', array( $this, 'query_public_statuses_on_archives' ) ); 22 add_filter( 'cron_schedules', array( $this, 'add_weekly_cron_interval' ) ); 22 23 } 23 24 … … 109 110 } 110 111 112 /** 113 * Add weekly schedule option to wp_schedule_event 114 * 115 * @param array $new_schedules 116 * @param array $schedules 117 * 118 * @return array 119 */ 120 public function add_weekly_cron_interval( $schedules ) { 121 if ( isset( $schedules['weekly'] ) ) { 122 return $schedules; 123 } 124 125 $schedules['weekly'] = array( 126 'interval' => WEEK_IN_SECONDS, 127 'display' => __( 'Once weekly', 'wordcamporg' ) 128 ); 129 130 return $schedules; 131 } 132 111 133 }
Note: See TracChangeset
for help on using the changeset viewer.