#32499 closed feature request (fixed)
Filter: get_hidden_columns
| Reported by: | Compute | Owned by: | chriscct7 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
Today I came across a client that wanted alot of new columns to the admin list screen. As we're also using the WordPress SEO plugin the columns are quickly filled. I would like to hide these columns by default, but for my client to be able to enable the columns again.
add_filter( 'get_user_option_manageedit-coursecolumnshidden', hide_wp_seo_columns' );
public function hide_wp_seo_columns( $hidden ) {
if ( empty( $hidden ) ) {
$hidden = [
'wpseo-score',
'wpseo-title',
'wpseo-metadesc',
'wpseo-focuskw',
];
}
return $hidden;
}
Even if this is working, I believe this would be a quite useful filter inside the get_hidden_columns() function instead. Just like get_hidden_meta_boxes().
Attachments (4)
Change History (13)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Introduce filters
default_hidden_columnsandhidden_columns