Enable event status selector in event list widget

This commit is contained in:
Brian Miyaji
2014-04-27 19:04:50 +10:00
parent dbb63247fd
commit caf57891bb
4 changed files with 51 additions and 8 deletions

View File

@@ -378,6 +378,7 @@ if ( !function_exists( 'sp_get_post_order' ) ) {
if ( !function_exists( 'sp_dropdown_statuses' ) ) {
function sp_dropdown_statuses( $args = array() ) {
$defaults = array(
'show_option_default' => false,
'name' => 'sp_status',
'id' => null,
'selected' => null,
@@ -387,6 +388,10 @@ if ( !function_exists( 'sp_dropdown_statuses' ) ) {
printf( '<select name="%s" class="postform %s">', $args['name'], $args['class'] );
if ( $args['show_option_default'] ):
printf( '<option value="default">%s</option>', $args['show_option_default'] );
endif;
$statuses = apply_filters( 'sportspress_statuses', array(
'any' => __( 'All', 'sportspress' ),
'publish' => __( 'Published', 'sportspress' ),