Make WordPress Core

Opened 9 months ago

Last modified 31 hours ago

#43895 assigned enhancement

Organize privacy functions into logical files and classes

Reported by: iandunn Owned by: desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version: 4.9.6
Component: Privacy Keywords: needs-patch early
Focuses: Cc:


Many new functions and classes are being created in 4.9.6 for the privacy features, but they can only be added in existing files, because it's a point release (and they have to be in the next point release, because GDPR).

That results in a bit of a mess, since functions are tacked on to unrelated files, or files that already have thousands of lines of code. The codebase would be much more maintainable if we can migrate logical groups of functions to their own file, and move classes to their own files.

We may need to consider back-compat issues, like plugins including wp-admin/includes/file.php in order to call a function that resides there in 4.9.6. Ideally this should be done in 5.0, to minimize the time where plugins will start to rely on functions being available in certain files.

Change History (15)

#1 @desrosj
8 months ago

  • Component changed from General to Privacy

Moving to the new Privacy component.

This ticket was mentioned in Slack in #gdpr-compliance by desrosj. View the logs.

8 months ago

#3 @desrosj
8 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.0

Marking this as 5.0, but to prevent complicating backports this should be done when 5.0 is confirmed as the next release.

#4 @desrosj
7 months ago

  • Keywords gdpr removed

Removing the GDPR keyword. This has been replaced by the new Privacy component and privacy focuses in Trac.

#5 @desrosj
4 months ago

Related: #44845.

This ticket was mentioned in Slack in #core-privacy by birgire. View the logs.

4 months ago

#7 @SergeyBiryukov
3 months ago

  • Milestone changed from 5.0 to 5.1

#8 @garrett-eclipse
3 months ago

Some discussion on this happened in #44876

#9 @garrett-eclipse
3 months ago

Quoting @desrosj from #core-privacy Slack;
'some scenarios we need to consider. https://core.trac.wordpress.org/ticket/44845#comment:2 for example.'
Reference - https://wordpress.slack.com/archives/C9695RJBW/p1541007701145600

Last edited 3 months ago by garrett-eclipse (previous) (diff)

#10 @desrosj
3 months ago

Some discussion in Slack for this today.

The plan is as follows:

  1. Create a map of where current code belongs.
  2. The 5.0 code is merged into trunk create a patch (to limit patch revisions)
  3. Commit this just before a 5.1 beta is set to land.

This ticket was mentioned in Slack in #core-privacy by itowhid06. View the logs.

3 weeks ago

#12 @desrosj
2 weeks ago

  • Milestone changed from 5.1 to 5.2

This still needs an initial patch.

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.

8 days ago

#14 @garrett-eclipse
4 days ago

  • Version set to 4.9.6

#15 @desrosj
31 hours ago

  • Keywords early added
  • Owner set to desrosj
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.