Use native labels for custom featured image text
This commit is contained in:
@@ -357,6 +357,10 @@ class SP_Post_types {
|
|||||||
'search_items' => __( 'Search', 'sportspress' ),
|
'search_items' => __( 'Search', 'sportspress' ),
|
||||||
'not_found' => __( 'No results found.', 'sportspress' ),
|
'not_found' => __( 'No results found.', 'sportspress' ),
|
||||||
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
||||||
|
'featured_image' => __( 'Icon', 'sportspress' ),
|
||||||
|
'set_featured_image' => __( 'Select Icon', 'sportspress' ),
|
||||||
|
'remove_featured_image' => __( 'Remove icon', 'sportspress' ),
|
||||||
|
'use_featured_image' => __( 'Add icon', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'public' => false,
|
'public' => false,
|
||||||
'show_ui' => true,
|
'show_ui' => true,
|
||||||
@@ -453,6 +457,10 @@ class SP_Post_types {
|
|||||||
'search_items' => __( 'Search', 'sportspress' ),
|
'search_items' => __( 'Search', 'sportspress' ),
|
||||||
'not_found' => __( 'No results found.', 'sportspress' ),
|
'not_found' => __( 'No results found.', 'sportspress' ),
|
||||||
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
||||||
|
'featured_image' => __( 'Logo', 'sportspress' ),
|
||||||
|
'set_featured_image' => __( 'Select Logo', 'sportspress' ),
|
||||||
|
'remove_featured_image' => __( 'Remove Logo', 'sportspress' ),
|
||||||
|
'use_featured_image' => __( 'Select Logo', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'show_ui' => true,
|
'show_ui' => true,
|
||||||
@@ -486,6 +494,10 @@ class SP_Post_types {
|
|||||||
'search_items' => __( 'Search', 'sportspress' ),
|
'search_items' => __( 'Search', 'sportspress' ),
|
||||||
'not_found' => __( 'No results found.', 'sportspress' ),
|
'not_found' => __( 'No results found.', 'sportspress' ),
|
||||||
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
||||||
|
'featured_image' => __( 'Photo', 'sportspress' ),
|
||||||
|
'set_featured_image' => __( 'Select Photo', 'sportspress' ),
|
||||||
|
'remove_featured_image' => __( 'Remove Photo', 'sportspress' ),
|
||||||
|
'use_featured_image' => __( 'Select Photo', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'show_ui' => true,
|
'show_ui' => true,
|
||||||
@@ -519,6 +531,10 @@ class SP_Post_types {
|
|||||||
'search_items' => __( 'Search', 'sportspress' ),
|
'search_items' => __( 'Search', 'sportspress' ),
|
||||||
'not_found' => __( 'No results found.', 'sportspress' ),
|
'not_found' => __( 'No results found.', 'sportspress' ),
|
||||||
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
'not_found_in_trash' => __( 'No results found.', 'sportspress' ),
|
||||||
|
'featured_image' => __( 'Photo', 'sportspress' ),
|
||||||
|
'set_featured_image' => __( 'Select Photo', 'sportspress' ),
|
||||||
|
'remove_featured_image' => __( 'Remove Photo', 'sportspress' ),
|
||||||
|
'use_featured_image' => __( 'Select Photo', 'sportspress' ),
|
||||||
),
|
),
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'show_ui' => true,
|
'show_ui' => true,
|
||||||
|
|||||||
@@ -173,18 +173,6 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain = nu
|
|||||||
case 'Slug':
|
case 'Slug':
|
||||||
$translated_text = ( in_array( $typenow, array( 'sp_column', 'sp_statistic' ) ) ) ? __( 'Key', 'sportspress' ) : __( 'Variable', 'sportspress' );
|
$translated_text = ( in_array( $typenow, array( 'sp_column', 'sp_statistic' ) ) ) ? __( 'Key', 'sportspress' ) : __( 'Variable', 'sportspress' );
|
||||||
break;
|
break;
|
||||||
case 'Featured Image':
|
|
||||||
$translated_text = __( 'Icon', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set Featured Image':
|
|
||||||
$translated_text = __( 'Select Icon', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set featured image':
|
|
||||||
$translated_text = __( 'Add icon', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Remove featured image':
|
|
||||||
$translated_text = __( 'Remove icon', 'sportspress' );
|
|
||||||
break;
|
|
||||||
endswitch;
|
endswitch;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
@@ -196,40 +184,6 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain = nu
|
|||||||
endswitch;
|
endswitch;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( in_array( $typenow, array( 'sp_player', 'sp_staff' ) ) ):
|
|
||||||
switch ( $untranslated_text ):
|
|
||||||
case 'Featured Image':
|
|
||||||
$translated_text = __( 'Photo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set Featured Image':
|
|
||||||
$translated_text = __( 'Select Photo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set featured image':
|
|
||||||
$translated_text = __( 'Add photo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Remove featured image':
|
|
||||||
$translated_text = __( 'Remove photo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
endswitch;
|
|
||||||
endif;
|
|
||||||
|
|
||||||
if ( in_array( $typenow, array( 'sp_team' ) ) ):
|
|
||||||
switch ( $untranslated_text ):
|
|
||||||
case 'Featured Image':
|
|
||||||
$translated_text = __( 'Logo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set Featured Image':
|
|
||||||
$translated_text = __( 'Select Logo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Set featured image':
|
|
||||||
$translated_text = __( 'Add logo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
case 'Remove featured image':
|
|
||||||
$translated_text = __( 'Remove logo', 'sportspress' );
|
|
||||||
break;
|
|
||||||
endswitch;
|
|
||||||
endif;
|
|
||||||
|
|
||||||
if ( in_array( $typenow, array( 'sp_event' ) ) ):
|
if ( in_array( $typenow, array( 'sp_event' ) ) ):
|
||||||
switch ( $untranslated_text ):
|
switch ( $untranslated_text ):
|
||||||
case 'Publish <b>immediately</b>':
|
case 'Publish <b>immediately</b>':
|
||||||
|
|||||||
Reference in New Issue
Block a user