[wp-trac] [WordPress Trac] #19809: can't pass an array(class, method) as a callback in add_settings_field()
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 11 18:23:48 UTC 2012
#19809: can't pass an array(class, method) as a callback in add_settings_field()
--------------------------+-----------------------------
Reporter: mati1000 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3.1
Severity: normal | Keywords:
--------------------------+-----------------------------
I want to pass an array(class, method) as a callback for a settings field:
add_settings_field($field, $label, array(&$this, $method) , $slug,
$section, $field);
But 'do_settings_sections' don't do a check like 'add_filter()' and it's
used as string with 'call_user_func' in wp-
admin/includes/template.php:1103
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19809>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list