[wp-trac] [WordPress Trac] #44354: Improve `WP_Privacy_Requests_Table` to manage columns

WordPress Trac noreply at wordpress.org
Fri Jun 7 22:47:08 UTC 2019


#44354: Improve `WP_Privacy_Requests_Table` to manage columns
-------------------------------------+------------------------------
 Reporter:  7studio                  |       Owner:  garrett-eclipse
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  Future Release
Component:  Privacy                  |     Version:  4.9.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+------------------------------
Changes (by pbiron):

 * keywords:  has-patch needs-refresh needs-testing => has-patch needs-
               testing


Comment:

 [[https://core.trac.wordpress.org/attachment/ticket/44354/44354.2.diff|44354.2.diff]]
 refreshes the patch after the file reorganization in #43895.  It also
 updates the `@since` tags to `5.3.0'.

 Additionally, it adds 2 new hooks:

 1. `manage_privacy_requests_columns` (in `get_columns()`, this is a
 filter).  This allows for adding columns that are "agnostic" as to the
 request type (similar to `wp_insert_post()`'s use of both `save_post` and
 `save_post_{$post_type}`).  The request type is passed as the 2nd param,
 so it can also be used to output columns that are specific to the request
 type.
 2. `manage_privacy_request_custom_column` (in `column_default()`, this is
 an action, see [comment:8 comment 8]).  Again, this allows for outputting
 values for custom columns that are both "agnostic" as to request-type and
 request-type-specific columns.

 The hooks in
 [[https://core.trac.wordpress.org/attachment/ticket/44354/44354.diff|44354.diff]]
 are still there.  These new hooks just give plugin authors different ways
 to add/output custom columns.

 p.s. I have **not** experienced the memory problems mentioned by
 [comment:6 garrett-eclipse].  I didn't try the initial patch until after
 #43895...maybe that had something to do with it?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44354#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list