Skip to content

Instantly share code, notes, and snippets.

@nunomorgadinho
Created June 12, 2017 11:18
Show Gist options
  • Save nunomorgadinho/94d0b5960b89d1103a0564b06aecac3b to your computer and use it in GitHub Desktop.
Save nunomorgadinho/94d0b5960b89d1103a0564b06aecac3b to your computer and use it in GitHub Desktop.
A filter to add weekdays as a schedule for the repeatable posts plugin by Human Made
/*
Plugin Name: Weekdays repeatable posts
Plugin URI: http://wordpress.org/plugins/wl_weekday_repeat_schedule
Description: A filter to add weekdays as a schedule for the repeatable posts plugin
Author: WidgiLabs
Version: 0.1
Author URI: http://widgilabs.com/
*/
add_filter( 'hm_post_repeat_schedules', 'wl_weekday_repeat_schedule', 10, 1);
function wl_weekday_repeat_schedule( $schedules ) {
$schedules['weekdays'] = array( 'interval' => '1 weekday', 'display' => __( 'Weekdays', 'hm-post-repeat' ) );
return $schedules;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment