Add "week" as a filtering option to Birthdays widget

This commit is contained in:
savvasha
2018-07-30 16:40:07 +03:00
parent c8414b0689
commit ce4389bee9
2 changed files with 6 additions and 0 deletions

View File

@@ -37,6 +37,11 @@ if ( $date == 'day' ) {
$args['day'] = date('j');
}
if ( $date == 'week' ) {
$args['year'] = date( 'Y' );
$args['week'] = date( 'W' );
}
$posts = get_posts( $args );
foreach ( $posts as $post ) {