[wp-trac] [WordPress Trac] #27805: Widget Customizer: Eliminate reliance on create_function()

WordPress Trac noreply at wordpress.org
Tue Apr 15 07:58:30 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 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(…);
    }
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27805#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list