Opened 6 years ago
Last modified 5 years ago
#44845 assigned enhancement
_get_list_table: Support for privacy requests tables
Reported by: | birgire | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | has-patch needs-refresh 2nd-opinion |
Focuses: | administration | Cc: |
Description
The admin table classes are served with _get_list_table()
.
I wonder if we should add a support for the classes:
WP_Privacy_Data_Export_Requests_Table
WP_Privacy_Data_Removal_Requests_Table
in _get_list_table()
for consistency.
Attachments (1)
Change History (14)
#3
@
6 years ago
- Milestone changed from 5.0 to 5.1
Moving to the 5.1 milestone due to the WordPress 5.0 focus on the new
editor (Gutenberg).
This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.
6 years ago
#11
@
5 years ago
I'm wondering how useful _get_list_table()
is? Perhaps we should be deprecating it? :) (unless I'm missing something).
Sure, at the time it was making sense to "normalize" setting of $args['screen']
. This can easily be done in the __construct()
of each class. Are there any other benefits from it?
Now with class autoloading becoming possible, do we really need/want this kind of loading and "external" normalization?
I like this idea, and the patch looks good. But, unfortunately, this is blocked by two issues.
First,
_get_list_table()
will try to includewp-admin/includes/class-wp-' . $required . '-list-table.php
, which does not exist yet (see #43895).Second, there is a problem with the privacy request class table names that will need to be resolved. The class names do not follow the correct pattern.
WP_Privacy_Data_Export_Requests_Table
, for example should beWP_Privacy_Data_Export_Requests_List_Table
.When a class is in its own file, the name should be
class-actualclassname.php
. In the current state, the file forWP_Privacy_Data_Export_Requests_Table
would beclass-wp-privacy-data-export-requests-table.php
, which does not match the pattern_get_list_table()
expects. Changing the class name is a backward compatibility issue, so it needs to be handled carefully.Going to move this to 5.0 for visibility and because this is at a minimum blocked by #43895. Ideally, both of these tickets should land in 5.0.