diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php
index 7993b0c632..721c944ecd 100644
--- a/wp-admin/includes/deprecated.php
+++ b/wp-admin/includes/deprecated.php
@@ -125,4 +125,41 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
}
}
+/**
+ * Register a setting and its sanitization callback
+ *
+ * @since 2.7.0
+ * @deprecated 3.0.0
+ * @deprecated Use register_setting()
+ * @see register_setting()
+ *
+ * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
+ * Default whitelisted option key names include "general," "discussion," and "reading," among others.
+ * @param string $option_name The name of an option to sanitize and save.
+ * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value.
+ * @return unknown
+ */
+function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
+ _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
+ return register_setting( $option_group, $option_name, $sanitize_callback );
+}
+
+/**
+ * Unregister a setting
+ *
+ * @since 2.7.0
+ * @deprecated 3.0.0
+ * @deprecated Use unregister_setting()
+ * @see unregister_setting()
+ *
+ * @param unknown_type $option_group
+ * @param unknown_type $option_name
+ * @param unknown_type $sanitize_callback
+ * @return unknown
+ */
+function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
+ _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
+ return unregister_setting( $option_group, $option_name, $sanitize_callback );
+}
+
?>
\ No newline at end of file
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index 8504ea6bde..14f5f7f094 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -753,4 +753,15 @@ function ms_deprecated_blogs_file() {
}
add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
+/**
+ * Outputs the notice message for multisite regarding activation of plugin page.
+ *
+ * @since 3.0
+ * @return none
+ */
+function _admin_notice_multisite_activate_plugins_page() {
+ $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '' . __( 'Activate' ) . '' );
+ echo "
";
+}
+
?>
diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
index 87b727fa3e..19d08f555e 100644
--- a/wp-admin/includes/plugin.php
+++ b/wp-admin/includes/plugin.php
@@ -1422,10 +1422,17 @@ function user_can_access_admin_page() {
* @param unknown_type $sanitize_callback A callback function that sanitizes the option's value.
* @return unknown
*/
-function register_setting($option_group, $option_name, $sanitize_callback = '') {
- if ( 'misc' == $option_group )
+function register_setting( $option_group, $option_name, $sanitize_callback = '' ) {
+ global $new_whitelist_options;
+
+ 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);
+ $option_group = 'general';
+ }
+
+ $new_whitelist_options[ $option_group ][] = $option_name;
+ if ( $sanitize_callback != '' )
+ add_filter( "sanitize_option_{$option_name}", $sanitize_callback );
}
/**
@@ -1438,44 +1445,13 @@ function register_setting($option_group, $option_name, $sanitize_callback = '')
* @param unknown_type $sanitize_callback
* @return unknown
*/
-function unregister_setting($option_group, $option_name, $sanitize_callback = '') {
- return remove_option_update_handler($option_group, $option_name, $sanitize_callback);
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param unknown_type $option_group
- * @param unknown_type $option_name
- * @param unknown_type $sanitize_callback
- */
-function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
+function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) {
global $new_whitelist_options;
- if ( 'misc' == $option_group )
- $option_group = 'general';
-
- $new_whitelist_options[ $option_group ][] = $option_name;
- if ( $sanitize_callback != '' )
- add_filter( "sanitize_option_{$option_name}", $sanitize_callback );
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param unknown_type $option_group
- * @param unknown_type $option_name
- * @param unknown_type $sanitize_callback
- */
-function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
- global $new_whitelist_options;
-
- if ( 'misc' == $option_group )
+ if ( 'misc' == $option_group ) {
+ _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
$option_group = 'general';
+ }
$pos = array_search( $option_name, (array) $new_whitelist_options );
if ( $pos !== false )
@@ -1574,15 +1550,4 @@ function settings_fields($option_group) {
wp_nonce_field("$option_group-options");
}
-/**
- * Outputs the notice message for multisite regarding activation of plugin page.
- *
- * @since 3.0
- * @return none
- */
-function _admin_notice_multisite_activate_plugins_page() {
- $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '' . __( 'Activate' ) . '' );
- echo "";
-}
-
?>