Change taxonomy placeholders in events to "None"
This commit is contained in:
@@ -40,7 +40,7 @@ class SP_Meta_Box_Event_Details {
|
|||||||
<?php
|
<?php
|
||||||
foreach ( $taxonomies as $taxonomy ) {
|
foreach ( $taxonomies as $taxonomy ) {
|
||||||
if ( 'sp_venue' == $taxonomy ) continue;
|
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">
|
<div class="sp-event-sp_venue-field">
|
||||||
|
|||||||
@@ -1312,7 +1312,7 @@ if ( !function_exists( 'sp_get_next_event' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
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 );
|
$obj = get_taxonomy( $taxonomy );
|
||||||
if ( $obj ) {
|
if ( $obj ) {
|
||||||
$post_type = get_post_type( $post );
|
$post_type = get_post_type( $post );
|
||||||
@@ -1335,7 +1335,7 @@ if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
|||||||
'values' => 'term_id',
|
'values' => 'term_id',
|
||||||
'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ),
|
'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ),
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'placeholder' => __( 'All', 'sportspress' ),
|
'placeholder' => $placeholder ? $placeholder : __( 'All', 'sportspress' ),
|
||||||
);
|
);
|
||||||
if ( $multiple ) {
|
if ( $multiple ) {
|
||||||
$args['property'] = 'multiple';
|
$args['property'] = 'multiple';
|
||||||
|
|||||||
Reference in New Issue
Block a user