Add deprecated notices for Options > Misc settings registrations. see #12437

git-svn-id: https://develop.svn.wordpress.org/trunk@13749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-03-18 17:32:27 +00:00
parent 263bce7e66
commit fa0be92d46
2 changed files with 8 additions and 2 deletions

View File

@ -1424,6 +1424,8 @@ function user_can_access_admin_page() {
* @return unknown
*/
function register_setting($option_group, $option_name, $sanitize_callback = '') {
if ( 'misc' == $option_group )
_deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
return add_option_update_handler($option_group, $option_name, $sanitize_callback);
}

View File

@ -2980,8 +2980,10 @@ function get_hidden_meta_boxes($screen) {
function add_settings_section($id, $title, $callback, $page) {
global $wp_settings_sections;
if ( 'misc' == $page )
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
$page = 'general';
}
if ( !isset($wp_settings_sections) )
$wp_settings_sections = array();
@ -3018,8 +3020,10 @@ function add_settings_section($id, $title, $callback, $page) {
function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
global $wp_settings_fields;
if ( 'misc' == $page )
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
$page = 'general';
}
if ( !isset($wp_settings_fields) )
$wp_settings_fields = array();