- Timestamp:
- 04/21/2021 06:51:33 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r50505 r50780 293 293 } 294 294 295 if ( $term->parent != $parent && empty( $_REQUEST['s'] ) ) {295 if ( $term->parent !== $parent && empty( $_REQUEST['s'] ) ) { 296 296 continue; 297 297 } 298 298 299 299 // If the page starts in a subtree, print the parents. 300 if ( $count == $start && $term->parent > 0 && empty( $_REQUEST['s'] ) ) {300 if ( $count === $start && $term->parent > 0 && empty( $_REQUEST['s'] ) ) { 301 301 $my_parents = array(); 302 302 $parent_ids = array(); 303 303 $p = $term->parent; 304 304 305 while ( $p ) { 305 306 $my_parent = get_term( $p, $taxonomy ); 306 307 $my_parents[] = $my_parent; 307 308 $p = $my_parent->parent; 309 308 310 if ( in_array( $p, $parent_ids, true ) ) { // Prevent parent loops. 309 311 break; 310 312 } 313 311 314 $parent_ids[] = $p; 312 315 } 316 313 317 unset( $parent_ids ); 314 318 315 319 $num_parents = count( $my_parents ); 320 316 321 while ( $my_parent = array_pop( $my_parents ) ) { 317 322 echo "\t"; … … 475 480 476 481 $actions = array(); 482 477 483 if ( current_user_can( 'edit_term', $tag->term_id ) ) { 478 484 $actions['edit'] = sprintf( … … 490 496 ); 491 497 } 498 492 499 if ( current_user_can( 'delete_term', $tag->term_id ) ) { 493 500 $actions['delete'] = sprintf( … … 499 506 ); 500 507 } 508 501 509 if ( is_taxonomy_viewable( $tax ) ) { 502 510 $actions['view'] = sprintf( … … 604 612 public function column_links( $tag ) { 605 613 $count = number_format_i18n( $tag->count ); 614 606 615 if ( $count ) { 607 616 $count = "<a href='link-manager.php?cat_id=$tag->term_id'>$count</a>"; 608 617 } 618 609 619 return $count; 610 620 }
Note: See TracChangeset
for help on using the changeset viewer.