Administration: Save column visibility on small screens.

Modifies the jQuery selector for determining hidden columns to ensure they are detected when the expanded columns details are closed.

Adds high-specificity selectors specifically for setting screen options in the comments and plugins lists.

Props afercia.
Fixes #46005. 



git-svn-id: https://develop.svn.wordpress.org/trunk@44722 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
peterwilsoncc 2019-02-01 02:13:02 +00:00
parent ffead81f22
commit 56f305790a
2 changed files with 11 additions and 1 deletions

View File

@ -110,7 +110,7 @@ window.columns = {
* @returns {string} The hidden column names separated by a comma.
*/
hidden : function() {
return $( '.manage-column[id]' ).filter( ':hidden' ).map(function() {
return $( '.manage-column[id]' ).filter( '.hidden' ).map(function() {
return this.id;
}).get().join( ',' );
},

View File

@ -1789,6 +1789,11 @@ div.action-links,
display: block;
}
/* Comment author hidden via Screen Options */
.fixed .column-author.hidden ~ .column-comment .comment-author {
display: none;
}
#the-comment-list .is-expanded td {
box-shadow: none;
}
@ -2009,6 +2014,11 @@ div.action-links,
padding: 10px 9px; /* reset from other list tables that have a label at this width */
}
/* Plugin description hidden via Screen Options */
#wpbody-content .wp-list-table.plugins .desc.hidden {
display: none;
}
#wpbody-content .wp-list-table.plugins .column-description {
padding-top: 2px;
}