[wp-trac] [WordPress Trac] #39184: Fatal error in child-theme customizer partials
WordPress Trac
noreply at wordpress.org
Thu Dec 8 17:58:07 UTC 2016
#39184: Fatal error in child-theme customizer partials
-------------------------------+------------------------------
Reporter: bastho | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by westonruter):
* keywords: needs-patch => reporter-feedback
Comment:
@bastho I cannot reproduce the issue here. Note in your example also you
have `return_true` as the `render_callback` but this is not defined and
would cause a fatal error. I think you're looking for `__return_true`.
Here is a complete example showing a child theme of Twenty Seventeen that
has two new partials for the title and tagline, the first lacks a
`render_callback` while the second has it:
https://gist.github.com/westonruter/cc0f17b18774c4d732778a27aeff232d
Please fork the child theme in that gist to bring it to a point where it
exhibits the bug.
When I change the site title, the Ajax response returns with `false` as
the rendered partial which is exactly as expected.
Also, the `render_callback` needn't be mandated because it can be supplied
via the `customize_partial_render` filter or via overriding
`WP_Customize_Partial::render_callback()` in a subclass.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39184#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list