[wp-trac] [WordPress Trac] #36666: Enhance `remove_theme_support()` so that it can take additional arguments
WordPress Trac
noreply at wordpress.org
Wed Apr 27 09:35:04 UTC 2016
#36666: Enhance `remove_theme_support()` so that it can take additional arguments
------------------------------------+------------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+------------------------------
Comment (by flixos90):
[attachment:36666.3.diff] is an updated patch which builds on the existing
`switch` block. Note that there is no `break` in the clause for `post-
thumbnails` and `post-formats` on purpose because the logic in the `html5`
clause applies to them as well if they haven't returned until then.
The patch will return `false` when trying to remove a specific element
from theme support when the value for this feature is a bool (`true`).
Also, when removing a specific element from support produces an empty
array as result, the theme feature is removed entirely. I assume we don't
want to have something like `$_wp_theme_features['post-formats'][0] =
array()`.
@jmichaelward Feel free to review and enhance the updated patch. Also, can
you ensure that you upload a full diff for upcoming patches please, not
only a diff from the file you patched? It is much easier to handle.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36666#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list