Fix player list display error in admin
This commit is contained in:
@@ -263,12 +263,16 @@ if ( !function_exists( 'sportspress_the_posts' ) ) {
|
|||||||
foreach ( $ids as $id ):
|
foreach ( $ids as $id ):
|
||||||
if ( !$id ) continue;
|
if ( !$id ) continue;
|
||||||
$parents = get_post_ancestors( $id );
|
$parents = get_post_ancestors( $id );
|
||||||
$parents = array_combine( array_keys( $parents ), array_reverse( array_values( $parents ) ) );
|
$keys = array_keys( $parents );
|
||||||
foreach ( $parents as $parent ):
|
$values = array_reverse( array_values( $parents ) );
|
||||||
if ( !in_array( $parent, $ids ) )
|
if ( ! empty( $keys ) && ! empty( $values ) ):
|
||||||
edit_post_link( get_the_title( $parent ), '', '', $parent );
|
$parents = array_combine( $keys, $values );
|
||||||
echo ' - ';
|
foreach ( $parents as $parent ):
|
||||||
endforeach;
|
if ( !in_array( $parent, $ids ) )
|
||||||
|
edit_post_link( get_the_title( $parent ), '', '', $parent );
|
||||||
|
echo ' - ';
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
$title = get_the_title( $id );
|
$title = get_the_title( $id );
|
||||||
if ( empty( $title ) )
|
if ( empty( $title ) )
|
||||||
$title = __( '(no title)', 'sportspress' );
|
$title = __( '(no title)', 'sportspress' );
|
||||||
|
|||||||
Reference in New Issue
Block a user