[wp-trac] [WordPress Trac] #28672: add_settings_field & co don't return values
WordPress Trac
noreply at wordpress.org
Mon Oct 27 15:56:32 UTC 2014
#28672: add_settings_field & co don't return values
---------------------------------------------+-----------------------------
Reporter: TJNowell | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Options, Meta APIs | Review
Severity: normal | Version: 2.7
Keywords: needs-unit-tests good-first-bug | Resolution:
| Focuses: administration
---------------------------------------------+-----------------------------
Comment (by GunGeekATX):
Something like this in add_settings_field()?
{{{
if ( ! isset( $wp_settings_sections[$page] ) )
$settings_page_check = new WP_Error( 'invalid_settings_page',
sprintf( __('Settings page %s does not exist.'), $page ) );
else
$settings_page_check = true;
$wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' =>
$title, 'callback' => $callback, 'args' => $args);
return $settings_page_check;
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28672#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list