Media List Table: remove the counts from the "views" portion of the toolbar, which are inconsistent with grid view. Also reduces complexity and removes potentially expensive count query.

Related to the toolbar view, remove the `wp_admin_canonical_url()` action in grid mode. Grid views that result from links from the list table view are lenses into the library and need to be indicated as such vs being a full attachment query.

Fixes #29744.


git-svn-id: https://develop.svn.wordpress.org/trunk@34256 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-17 02:29:22 +00:00
parent 25710ecc67
commit a1805ecada
2 changed files with 36 additions and 24 deletions

View File

@@ -25,6 +25,8 @@ if ( 'grid' === $mode ) {
wp_enqueue_script( 'media-grid' );
wp_enqueue_script( 'media' );
remove_action( 'admin_head', 'wp_admin_canonical_url' );
$q = $_GET;
// let JS handle this
unset( $q['s'] );