X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8d3bb1a5dcfdea9857d3c88c3751f09593e34dc8..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-admin/includes/class-wp-posts-list-table.php diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 39c2d682..ae0f2441 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -459,6 +459,7 @@ class WP_Posts_List_Table extends WP_List_Table {
months_dropdown( $this->screen->post_type ); $this->categories_dropdown( $this->screen->post_type ); @@ -479,7 +480,12 @@ class WP_Posts_List_Table extends WP_List_Table { */ do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); - submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + $output = ob_get_clean(); + + if ( ! empty( $output ) ) { + echo $output; + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + } } if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) { @@ -829,7 +835,16 @@ class WP_Posts_List_Table extends WP_List_Table { printf( __( 'Select %s' ), _draft_or_post_title() ); ?> -
+
+ + +
ID ); + + if ( $can_edit_post && $post->post_status != 'trash' ) { + $lock_holder = wp_check_post_lock( $post->ID ); + + if ( $lock_holder ) { + $lock_holder = get_userdata( $lock_holder ); + $locked_avatar = get_avatar( $lock_holder->ID, 18 ); + $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ); + } else { + $locked_avatar = $locked_text = ''; + } + + echo '
' . $locked_avatar . ' ' . $locked_text . "
\n"; + } + $pad = str_repeat( '— ', $this->current_level ); echo ""; @@ -901,7 +932,6 @@ class WP_Posts_List_Table extends WP_List_Table { echo $this->get_edit_link( $format_args, $label . ':', $format_class ); } - $can_edit_post = current_user_can( 'edit_post', $post->ID ); $title = _draft_or_post_title(); if ( $can_edit_post && $post->post_status != 'trash' ) { @@ -924,22 +954,8 @@ class WP_Posts_List_Table extends WP_List_Table { } echo "\n"; - if ( $can_edit_post && $post->post_status != 'trash' ) { - $lock_holder = wp_check_post_lock( $post->ID ); - - if ( $lock_holder ) { - $lock_holder = get_userdata( $lock_holder ); - $locked_avatar = get_avatar( $lock_holder->ID, 18 ); - $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ); - } else { - $locked_avatar = $locked_text = ''; - } - - echo '
' . $locked_avatar . ' ' . $locked_text . "
\n"; - } - if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) { - echo esc_html( get_the_excerpt() ); + the_excerpt(); } get_inline_data( $post ); @@ -1522,38 +1538,38 @@ class WP_Posts_List_Table extends WP_List_Table { - post_type ) : - ?> - - - + post_type ) ) ) : ?> + + + - cap->assign_terms ) ) : ?> + cap->assign_terms ) ) : + $taxonomy_name = esc_attr( $taxonomy->name ); + + ?> @@ -1713,14 +1729,14 @@ class WP_Posts_List_Table extends WP_List_Table { } ?>

- + - +