Change taxonomy placeholders in events to "None"

This commit is contained in:
Brian Miyaji
2017-01-14 00:23:24 +11:00
parent 117fed448b
commit e5ca52b59a
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ class SP_Meta_Box_Event_Details {
<?php
foreach ( $taxonomies as $taxonomy ) {
if ( 'sp_venue' == $taxonomy ) continue;
sp_taxonomy_field( $taxonomy, $post, true, true );
sp_taxonomy_field( $taxonomy, $post, true, true, __( 'None', 'sportspress' ) );
}
?>
<div class="sp-event-sp_venue-field">

View File

@@ -1312,7 +1312,7 @@ if ( !function_exists( 'sp_get_next_event' ) ) {
}
if ( !function_exists( 'sp_taxonomy_field' ) ) {
function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false, $trigger = false ) {
function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false, $trigger = false, $placeholder = null ) {
$obj = get_taxonomy( $taxonomy );
if ( $obj ) {
$post_type = get_post_type( $post );
@@ -1335,7 +1335,7 @@ if ( !function_exists( 'sp_taxonomy_field' ) ) {
'values' => 'term_id',
'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ),
'chosen' => true,
'placeholder' => __( 'All', 'sportspress' ),
'placeholder' => $placeholder ? $placeholder : __( 'All', 'sportspress' ),
);
if ( $multiple ) {
$args['property'] = 'multiple';