[wp-trac] [WordPress Trac] #44354: Improve `WP_Privacy_Requests_Table` to manage columns
WordPress Trac
noreply at wordpress.org
Tue Oct 20 20:30:20 UTC 2020
#44354: Improve `WP_Privacy_Requests_Table` to manage columns
-------------------------------------------------+-------------------------
Reporter: 7studio | Owner: garrett-
| eclipse
Type: enhancement | Status: accepted
Priority: normal | Milestone: 5.6
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: has-patch has-screenshots needs- | Focuses:
dev-note commit | administration
-------------------------------------------------+-------------------------
Comment (by TimothyBlynJacobs):
I don't think the filter on the column names is necessary. This extension
support is built in as `WP_List_Table` calls `get_column_headers()` which
already has a filter.
{{{#!php
<?php
add_filter( 'manage_export-personal-data_columns', function ( $columns ) {
$columns['test'] = __( 'Test' );
return $columns;
} );
}}}
The action in the `column_default` is still necessary as WordPress doesn't
provide a default one there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44354#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list