Replace global options with individual option check

This commit is contained in:
Brian Miyaji
2014-03-28 21:07:39 +11:00
parent 31ab02b3c1
commit cdab219f41
11 changed files with 8 additions and 31 deletions

View File

@@ -129,7 +129,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
if ( $domain != 'sportspress' )
return $translated_text;
global $typenow, $sportspress_options;
global $typenow;
if ( is_admin() ):
if ( in_array( $typenow, array( 'sp_event', 'sp_team', 'sp_player', 'sp_staff' ) ) ):
@@ -155,13 +155,6 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
$translated_text = $venue->name;
endif;
endif;
if ( isset( $sportspress_options['text'] ) ):
foreach( $sportspress_options['text'] as $key => $value ):
if ( $translated_text == $key ):
$translated_text = $value;
endif;
endforeach;
endif;
endif;
return $translated_text;