Refactored WP_Debug_Data::debug_data() Part 1#7065
Refactored WP_Debug_Data::debug_data() Part 1#7065apermo wants to merge 8 commits intoWordPress:trunkfrom
Conversation
Changed: Moving $info['wp-filesystem'] to own function
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
7376882 to
0ea0e0e
Compare
|
I decided to move the |
0ea0e0e to
9e1b504
Compare
|
Update: I had to move that around a bit, in order to minimize dependencies. To allow plugin authors a convenient way to rearrange debug information, I introduced a new action |
9e1b504 to
f1b1ff4
Compare
Changed: Moving add_filter calls a distinct function. Added: 'pre_debug_information' to allow plugin_authors to alter, add, or remove the core debug information callbacks.
f1b1ff4 to
604c49f
Compare
Removed: Outdated information from phpDoc
|
In branch refactor-wp-debug-data-old is the original PR, with a minor update, to integrate changed approaches and more phpDoc from the new refactoring. In refactor-wp-debug-data/all-parts there is already one commit for each refactored function prepared as stated above. |
Applied code review from @costdev
Removed: ::init_filters() Changed: From apply_filters approach to return array approach.
dmsnell
left a comment
There was a problem hiding this comment.
I'll let some other folks review this if they want, but the code as proposed seems clear enough to me.
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
costdev
left a comment
There was a problem hiding this comment.
Approving from my perspective, pending reviews from one or more component maintainers.
|
LGTM 👍 |
|
Prepping to merge. |
This is the first part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other. This patch separates the first of twelve groups, the `wp-filesystem` info, into a separate method focused on that data. This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code. Developed in #7065 Discussed in https://core.trac.wordpress.org/ticket/61648 Props: afragen, apermo, costdev, dmsnell. See #61648. git-svn-id: https://develop.svn.wordpress.org/trunk@58830 602fd350-edb4-49c9-b593-d223f7449a82
This is the first part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other. This patch separates the first of twelve groups, the `wp-filesystem` info, into a separate method focused on that data. This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code. Developed in WordPress/wordpress-develop#7065 Discussed in https://core.trac.wordpress.org/ticket/61648 Props: afragen, apermo, costdev, dmsnell. See #61648. Built from https://develop.svn.wordpress.org/trunk@58830 git-svn-id: http://core.svn.wordpress.org/trunk@58226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the first part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other. This patch separates the first of twelve groups, the `wp-filesystem` info, into a separate method focused on that data. This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code. Developed in WordPress/wordpress-develop#7065 Discussed in https://core.trac.wordpress.org/ticket/61648 Props: afragen, apermo, costdev, dmsnell. See #61648. Built from https://develop.svn.wordpress.org/trunk@58830 git-svn-id: https://core.svn.wordpress.org/trunk@58226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the first part in a larger modularization of the data in `WP_Debug_Data`. Previously this was a single massive method drawing in debug data from various groups of related data, where the groups were independent from each other. This patch separates the first of twelve groups, the `wp-filesystem` info, into a separate method focused on that data. This work precedes changes to make the `WP_Debug_Data` class more extensible for better use by plugin and theme code. Developed in WordPress#7065 Discussed in https://core.trac.wordpress.org/ticket/61648 Props: afragen, apermo, costdev, dmsnell. See #61648. git-svn-id: https://develop.svn.wordpress.org/trunk@58830 602fd350-edb4-49c9-b593-d223f7449a82
Changed: Moving $info['wp-filesystem'] to own function
Follow up to #7027 as discussed with @dmsnell and @costdev
To keep the structure intact over all PRs, we will start moving content from the
$infoarray into own function from the bottom up, this way the result will always be identical and combarable.Summary of the coming steps:
Refactoring WP_Debug_Data::debug_data(); into smaller functions for
$parent_theme_auto_update_stringshowing the value from$auto_updates_string(This will be handled only in Step 9)Trac ticket: https://core.trac.wordpress.org/ticket/61648#ticket
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.