- Timestamp:
- 09/19/2022 09:06:08 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r54099 r54215 332 332 ); 333 333 334 $mine = $this->get_edit_link( $mine_args, $mine_inner_html, $class ); 334 $mine = array( 335 'url' => esc_url( add_query_arg( $mine_args, 'edit.php' ) ), 336 'label' => $mine_inner_html, 337 'current' => isset( $_GET['author'] ) && ( $current_user_id === (int) $_GET['author'] ), 338 ); 335 339 336 340 $all_args['all_posts'] = 1; 337 341 $class = ''; 338 }339 340 if ( empty( $class ) && ( $this->is_base_request() || isset( $_REQUEST['all_posts'] ) ) ) {341 $class = 'current';342 342 } 343 343 … … 353 353 ); 354 354 355 $status_links['all'] = $this->get_edit_link( $all_args, $all_inner_html, $class ); 355 $status_links['all'] = array( 356 'url' => esc_url( add_query_arg( $all_args, 'edit.php' ) ), 357 'label' => $all_inner_html, 358 'current' => empty( $class ) && ( $this->is_base_request() || isset( $_REQUEST['all_posts'] ) ), 359 ); 356 360 357 361 if ( $mine ) { … … 382 386 ); 383 387 384 $status_links[ $status_name ] = $this->get_edit_link( $status_args, $status_label, $class ); 388 $status_links[ $status_name ] = array( 389 'url' => esc_url( add_query_arg( $status_args, 'edit.php' ) ), 390 'label' => $status_label, 391 'current' => isset( $_REQUEST['post_status'] ) && $status_name === $_REQUEST['post_status'], 392 ); 385 393 } 386 394 … … 405 413 406 414 $sticky_link = array( 407 'sticky' => $this->get_edit_link( $sticky_args, $sticky_inner_html, $class ), 415 'sticky' => array( 416 'url' => esc_url( add_query_arg( $sticky_args, 'edit.php' ) ), 417 'label' => $sticky_inner_html, 418 'current' => ! empty( $_REQUEST['show_sticky'] ), 419 ), 408 420 ); 409 421 … … 413 425 } 414 426 415 return $ status_links;427 return $this->get_views_links( $status_links ); 416 428 } 417 429
Note: See TracChangeset
for help on using the changeset viewer.