[wp-trac] [WordPress Trac] #43895: Organize privacy functions into logical files and classes

WordPress Trac noreply at wordpress.org
Fri May 24 00:58:09 UTC 2019


#43895: Organize privacy functions into logical files and classes
-------------------------------------------+-----------------------
 Reporter:  iandunn                        |       Owner:  desrosj
     Type:  enhancement                    |      Status:  assigned
 Priority:  normal                         |   Milestone:  5.3
Component:  Privacy                        |     Version:  4.9.6
 Severity:  normal                         |  Resolution:
 Keywords:  early has-patch needs-refresh  |     Focuses:
-------------------------------------------+-----------------------
Changes (by desrosj):

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


Comment:

 Thanks for taking a first pass at this, everyone! I have only briefly
 skimmed the patch and did not test yet, but here are some initial
 thoughts:

 - Was there a reason that the privacy JavaScript was in `xfn.js`? If so,
 `xfn.js` will need to be added as a dependency.
 - `class-wp-privacy-data-removal-requests-table.php` and `class-wp-
 privacy-data-export-requests-table.php` need to be changed to `class-wp-
 privacy-data-export-requests-list-table.php` and `class-wp-privacy-
 data-(removal erasure?)-requests-list-table.php` respectively. This is for
 the reasons detailed
 [https://core.trac.wordpress.org/ticket/44845#comment:2 here].
 - The old classes will need to remain in core somewhere for backwards
 compatibility (erhaps in `wp-admin/includes/deprecated.php`). The old
 classes should throw a `_doing_it_wrong()` and load the new classes.
 something like this, maybe: `Old_Class extends New_Class { function
 __construct() { doing_it_wrong(); parent::__construct(); } }` (props
 @johnbillion for this example to try out). The loading order needs to be
 explored here to ensure this is a suitable option.
 - There will most likely need to be `function_exists()` checks for any
 function reorganized when called. If the function does not exist,
 `include_once` should load `privacy.php`.
 - Some code needs to be added to guarantee that the old privacy tool
 locations (`tools.php?page=export_personal_data` and
 `tools.php?page=remove_personal_data`) are redirected to the new
 locations. `$_GET` params and form submissions need to be tested to ensure
 everything is included successfully.
 - Are there any front-end privacy related functions that warrant a `wp-
 includes/privacy.php`?

 Also, it will probably be best to split this up into some more manageable
 chunks. What those chunks are though are not obvious to me without fully
 diving in as a lot of elements are very tightly connected.

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


More information about the wp-trac mailing list