Add deprecated notices for Options > Misc settings registrations. see #12437
git-svn-id: http://svn.automattic.com/wordpress/trunk@13749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0ac55fc053
commit
65e9cd7eb1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue