WPML compatibility tweaks
This commit is contained in:
@@ -105,7 +105,9 @@ add_filter( 'previous_post_link', 'sportspress_hide_adjacent_post_links', 10, 4
|
||||
add_filter( 'next_post_link', 'sportspress_hide_adjacent_post_links', 10, 4 );
|
||||
|
||||
function sportspress_the_title( $title, $id = null ) {
|
||||
if ( $id && ! is_admin() && ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ):
|
||||
if ( ! $id ) return $title;
|
||||
|
||||
if ( ! is_admin() && ! current_theme_supports( 'sportspress' ) && in_the_loop() && $id == get_the_ID() ):
|
||||
if ( is_singular( 'sp_player' ) ):
|
||||
$number = get_post_meta( $id, 'sp_number', true );
|
||||
if ( $number != null ):
|
||||
@@ -131,11 +133,12 @@ function sportspress_the_title( $title, $id = null ) {
|
||||
endif;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
return $title;
|
||||
}
|
||||
add_filter( 'the_title', 'sportspress_the_title', 10, 2 );
|
||||
|
||||
function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
|
||||
function sportspress_gettext( $translated_text, $untranslated_text, $domain = null ) {
|
||||
global $typenow;
|
||||
|
||||
if ( is_admin() ):
|
||||
|
||||
Reference in New Issue
Block a user