Jehu
Forum Replies Created
Viewing 1 replies (of 1 total)
-
In 3.5.2, the filters work by calling each of the defined functions in turn, passing the current result each time wp-includes\plugin.php
do { foreach( (array) current($wp_filter[$tag]) as $the_ ) if ( !is_null($the_['function']) ){ $args[1] = $value; $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args'])); } } while ( next($wp_filter[$tag]) !== false );By appending to the current result you’ll not overwrite existing values
function ald_more_reccurences( $schedules ) { /* return array( 'weekly' => array('interval' => 604800, 'display' => __( 'Once Weekly', TPTN_LOCAL_NAME )), 'fortnightly' => array('interval' => 1209600, 'display' => __( 'Once Fortnightly', TPTN_LOCAL_NAME )), 'monthly' => array('interval' => 2419200, 'display' => __( 'Once Monthly', TPTN_LOCAL_NAME )), ); */ $schedules['weekly'] = array('interval' => 604800, 'display' => __( 'Once Weekly', TPTN_LOCAL_NAME )); $schedules['fortnightly'] = array('interval' => 1209600, 'display' => __( 'Once Fortnightly', TPTN_LOCAL_NAME )); $schedules['monthly'] = array('interval' => 2419200, 'display' => __( 'Once Monthly', TPTN_LOCAL_NAME )); return $schedules; }/** * Return an array of BackUpWordPress cron schedules * * @return array */ public function get_cron_schedules(){ $schedules = wp_get_schedules(); // remove any schedule whose key is not prefixed with 'hmbkp_' foreach ( $schedules as $key => $arr ) { if( ! preg_match("/^hmbkp_/", $key ) ) unset( $schedules[$key] ); } return $schedules; }
Viewing 1 replies (of 1 total)