Changeset 9967
- Timestamp:
- 06/16/2020 10:09:20 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-docs.php
r8685 r9967 33 33 */ 34 34 protected $manifest_url; 35 36 /** 37 * The cron update interval schedule. 38 * 39 * @var string 40 */ 41 protected $cron_interval = '15_minutes'; 35 42 36 43 /** … … 152 159 */ 153 160 public function register_cron_jobs() { 161 // If configured cron interval does not exist, then fall back to default. 162 if ( ! in_array( $this->cron_interval, array_keys( wp_get_schedules() ) ) ) { 163 $this->cron_interval = '15_minutes'; 164 } 165 154 166 if ( ! wp_next_scheduled( "devhub_{$this->post_type}_import_manifest" ) ) { 155 wp_schedule_event( time(), '15_minutes', "devhub_{$this->post_type}_import_manifest" );167 wp_schedule_event( time(), $this->cron_interval, "devhub_{$this->post_type}_import_manifest" ); 156 168 } 157 169 158 170 if ( ! wp_next_scheduled( "devhub_{$this->post_type}_import_all_markdown" ) ) { 159 wp_schedule_event( time(), '15_minutes', "devhub_{$this->post_type}_import_all_markdown" );171 wp_schedule_event( time(), $this->cron_interval, "devhub_{$this->post_type}_import_all_markdown" ); 160 172 } 161 173 }
Note: See TracChangeset
for help on using the changeset viewer.