Advertisement
mbcreation

Quick export : Adding a custom time interval

May 22nd, 2014
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // functions.php of your theme
  2. // (See http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules)
  3.  
  4. function my_add_weekly( $schedules ) {
  5. // add a 'weekly' schedule to the existing set
  6. $schedules['weekly'] = array(
  7. 'interval' => 604800, //interval of one week in seconds
  8. 'display' => __('Once Weekly') //name of the interval
  9. );
  10. return $schedules;
  11. }
  12. add_filter( 'cron_schedules', 'my_add_weekly' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement