[wp-trac] [WordPress Trac] #25618: Fix opening of Media Manager in Customizer
WordPress Trac
noreply at wordpress.org
Tue Dec 3 21:00:16 UTC 2013
#25618: Fix opening of Media Manager in Customizer
--------------------------+---------------------
Reporter: westonruter | Owner: nacin
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.8
Component: Appearance | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch |
--------------------------+---------------------
Comment (by westonruter):
@nacin: The `require_once` addresses an issue when you try to subclass
`WP_Customize_Control` before the Customizer is initialized (e.g. the
attached `test-control.php` plugin). To do this subclass, you have to
`require` `class-wp-customize-control.php` up front, but then when
`WP_Customize_Manager` is instantiated later, its constructor also does a
`require` for that same file, resulting in a fatal class redeclaration
error. It seems `require_once` should be the default method for importing
libraries, whereas `require` the default for templates/partials.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25618#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list