[wp-trac] [WordPress Trac] #27805: Widget Customizer: Eliminate reliance on create_function()
WordPress Trac
noreply at wordpress.org
Tue Apr 15 08:00:50 UTC 2014
#27805: Widget Customizer: Eliminate reliance on create_function()
--------------------------+-----------------------
Reporter: westonruter | Owner: nacin
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.9
Component: Appearance | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------
Comment (by westonruter):
Replying to [comment:2 Denis-de-Bernardy]:
> Perhaps use some indirection with a class that has a method like:
>
> {{{
> function __call($name, $args) {
> if (preg_match("/widget_settings_handler_([a-zA-Z0-9_]+)/", $name,
$match) {
> return $this->widget_settings_handler($match[1], $args);
> }
> else {
> trigger_error(…);
> }
> }
> }}}
>
Did you see [attachment:27805-02.patch my patch]?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27805#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list