Changeset 10835
- Timestamp:
- 03/18/2021 08:44:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/importer.php
r10815 r10835 134 134 * Returns the handbook's cron interval schedule. 135 135 * 136 * @return string 137 */ 138 public function get_cron_interval() { 136 * @param string $as_string Return the interval as a label? True if a cron 137 * interval should be returned as string or false 138 * to return array of interval's data. Default true. 139 * @return string|array 140 */ 141 public function get_cron_interval( $as_string = true ) { 139 142 $cron_intervals = wp_get_schedules(); 140 143 $default = 'hourly'; … … 142 145 $cron_interval = $this->handbook->get_config()['cron_interval'] ?: $default; 143 146 144 return empty( $cron_intervals[ $cron_interval ] ) ? $default : $cron_interval; 147 $cron_label = empty( $cron_intervals[ $cron_interval ] ) ? $default : $cron_interval; 148 149 return $as_string ? $cron_label : ( $cron_intervals[ $cron_label ] ?? [] ); 145 150 } 146 151
Note: See TracChangeset
for help on using the changeset viewer.