wp/wp-admin/includes/deprecated.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
--- a/wp/wp-admin/includes/deprecated.php	Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-admin/includes/deprecated.php	Tue Jun 09 03:35:32 2015 +0200
@@ -33,7 +33,6 @@
  */
 function documentation_link() {
 	_deprecated_function( __FUNCTION__, '2.5' );
-	return;
 }
 
 /**
@@ -80,9 +79,9 @@
  * @deprecated Use wp_category_checklist()
  * @see wp_category_checklist()
  *
- * @param unknown_type $default
- * @param unknown_type $parent
- * @param unknown_type $popular_ids
+ * @param int $default
+ * @param int $parent
+ * @param array $popular_ids
  */
 function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
 	_deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
@@ -98,7 +97,7 @@
  * @deprecated Use wp_link_category_checklist()
  * @see wp_link_category_checklist()
  *
- * @param unknown_type $default
+ * @param int $default
  */
 function dropdown_link_categories( $default = 0 ) {
 	_deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
@@ -130,12 +129,12 @@
  * @deprecated Use wp_dropdown_categories()
  * @see wp_dropdown_categories()
  *
- * @param unknown_type $currentcat
- * @param unknown_type $currentparent
- * @param unknown_type $parent
- * @param unknown_type $level
- * @param unknown_type $categories
- * @return unknown
+ * @param int $currentcat
+ * @param int $currentparent
+ * @param int $parent
+ * @param int $level
+ * @param array $categories
+ * @return bool|null
  */
 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
 	_deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
@@ -170,12 +169,11 @@
  * @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
+ * @param callable $sanitize_callback A callback function that sanitizes the option's value.
  */
 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 );
+	register_setting( $option_group, $option_name, $sanitize_callback );
 }
 
 /**
@@ -186,14 +184,13 @@
  * @deprecated Use unregister_setting()
  * @see unregister_setting()
  *
- * @param unknown_type $option_group
- * @param unknown_type $option_name
- * @param unknown_type $sanitize_callback
- * @return unknown
+ * @param string $option_group
+ * @param string $option_name
+ * @param callable $sanitize_callback
  */
 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 );
+	unregister_setting( $option_group, $option_name, $sanitize_callback );
 }
 
 /**
@@ -206,18 +203,16 @@
 **/
 function codepress_get_lang( $filename ) {
 	_deprecated_function( __FUNCTION__, '3.0' );
-	return;
 }
 
 /**
- * Adds Javascript required to make CodePress work on the theme/plugin editors.
+ * Adds JavaScript required to make CodePress work on the theme/plugin editors.
  *
  * @since 2.8.0
  * @deprecated 3.0.0
 **/
 function codepress_footer_js() {
 	_deprecated_function( __FUNCTION__, '3.0' );
-	return;
 }
 
 /**
@@ -228,7 +223,6 @@
 **/
 function use_codepress() {
 	_deprecated_function( __FUNCTION__, '3.0' );
-	return;
 }
 
 /**
@@ -276,7 +270,7 @@
  *
  * @param int $user_id User ID.
  * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros.
- * @return unknown
+ * @return mixed
  */
 function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
 	_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
@@ -336,7 +330,7 @@
 	 *
 	 * @since 2.1.0
 	 * @access private
-	 * @var unknown_type
+	 * @var mixed
 	 */
 	var $results;
 
@@ -345,7 +339,7 @@
 	 *
 	 * @since 2.1.0
 	 * @access private
-	 * @var unknown_type
+	 * @var string
 	 */
 	var $search_term;
 
@@ -390,7 +384,7 @@
 	 *
 	 * @since 2.1.0
 	 * @access private
-	 * @var unknown_type
+	 * @var int
 	 */
 	var $first_user;
 
@@ -462,7 +456,7 @@
 	 *
 	 * @since 2.1.0
 	 * @access private
-	 * @var unknown_type
+	 * @var WP_Error
 	 */
 	var $search_errors;
 
@@ -471,7 +465,7 @@
 	 *
 	 * @since 2.7.0
 	 * @access private
-	 * @var unknown_type
+	 * @var string
 	 */
 	var $paging_text;
 
@@ -554,7 +548,7 @@
 		if ( $this->results )
 			$this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit
 		else
-			$this->search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!'));
+			$this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
 	}
 
 	/**
@@ -609,7 +603,7 @@
 	 * @since 2.1.0
 	 * @access public
 	 *
-	 * @return unknown
+	 * @return array
 	 */
 	function get_results() {
 		return (array) $this->results;
@@ -852,42 +846,42 @@
 }
 
 function media_upload_image() {
-	__deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+	_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
 	return wp_media_upload_handler();
 }
 
 function media_upload_audio() {
-	__deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+	_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
 	return wp_media_upload_handler();
 }
 
 function media_upload_video() {
-	__deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+	_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
 	return wp_media_upload_handler();
 }
 
 function media_upload_file() {
-	__deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+	_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
 	return wp_media_upload_handler();
 }
 
 function type_url_form_image() {
-	__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
+	_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
 	return wp_media_insert_url_form( 'image' );
 }
 
 function type_url_form_audio() {
-	__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
+	_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
 	return wp_media_insert_url_form( 'audio' );
 }
 
 function type_url_form_video() {
-	__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
+	_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
 	return wp_media_insert_url_form( 'video' );
 }
 
 function type_url_form_file() {
-	__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
+	_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
 	return wp_media_insert_url_form( 'file' );
 }
 
@@ -942,7 +936,7 @@
  * @since 1.5.0
  * @deprecated 3.4.0
  *
- * @return unknown
+ * @return array
  */
 function get_broken_themes() {
 	_deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" );
@@ -966,7 +960,7 @@
  * @since 2.0.0
  * @deprecated 3.4.0
  *
- * @return unknown
+ * @return WP_Theme
  */
 function current_theme_info() {
 	_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
@@ -1062,6 +1056,7 @@
  *
  * @since 2.7.0
  * @deprecated 3.7.0
+ * @see Core_Upgrader
  */
 function wp_update_core($current, $feedback = '') {
 	_deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
@@ -1069,7 +1064,7 @@
 	if ( !empty($feedback) )
 		add_filter('update_feedback', $feedback);
 
-	include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Core_Upgrader();
 	return $upgrader->upgrade($current);
 
@@ -1084,6 +1079,7 @@
  *
  * @since 2.5.0
  * @deprecated 3.7.0
+ * @see Plugin_Upgrader
  */
 function wp_update_plugin($plugin, $feedback = '') {
 	_deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
@@ -1091,20 +1087,21 @@
 	if ( !empty($feedback) )
 		add_filter('update_feedback', $feedback);
 
-	include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Plugin_Upgrader();
 	return $upgrader->upgrade($plugin);
 }
 
 /**
- * This was once used to kick-off the Plugin Updater.
+ * This was once used to kick-off the Theme Updater.
  *
- * Deprecated in favor of instantating a Plugin_Upgrader instance directly,
+ * Deprecated in favor of instantating a Theme_Upgrader instance directly,
  * and calling the 'upgrade' method.
  * Unused since 2.8.0.
  *
  * @since 2.7.0
  * @deprecated 3.7.0
+ * @see Theme_Upgrader
  */
 function wp_update_theme($theme, $feedback = '') {
 	_deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );
@@ -1112,7 +1109,7 @@
 	if ( !empty($feedback) )
 		add_filter('update_feedback', $feedback);
 
-	include ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Theme_Upgrader();
 	return $upgrader->upgrade($theme);
 }
@@ -1125,9 +1122,62 @@
  * @since 2.0.0
  * @deprecated 3.7.0
  *
- * @param unknown_type $id
- * @return unknown
+ * @param int|bool $id
  */
 function the_attachment_links( $id = false ) {
 	_deprecated_function( __FUNCTION__, '3.7' );
 }
+
+/**#@+
+ * Displays a screen icon.
+ *
+ * @since 2.7.0
+ * @since 3.8.0 Screen icons are no longer used in WordPress. This function no longer produces output.
+ * @deprecated 3.8.0
+ */
+function screen_icon() {
+	echo get_screen_icon();
+}
+function get_screen_icon() {
+	return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
+}
+/**#@-*/
+
+/**#@+
+ * Deprecated dashboard widget controls.
+ *
+ * @since 2.5.0
+ * @deprecated 3.8.0
+ */
+function wp_dashboard_incoming_links_output() {}
+function wp_dashboard_secondary_output() {}
+/**#@-*/
+
+/**#@+
+ * Deprecated dashboard widget controls.
+ *
+ * @since 2.7.0
+ * @deprecated 3.8.0
+ */
+function wp_dashboard_incoming_links() {}
+function wp_dashboard_incoming_links_control() {}
+function wp_dashboard_plugins() {}
+function wp_dashboard_primary_control() {}
+function wp_dashboard_recent_comments_control() {}
+function wp_dashboard_secondary() {}
+function wp_dashboard_secondary_control() {}
+/**#@-*/
+
+/**
+ * This was once used to move child posts to a new parent.
+ *
+ * @since 2.3.0
+ * @deprecated 3.9.0
+ * @access private
+ *
+ * @param int $old_ID
+ * @param int $new_ID
+ */
+function _relocate_children( $old_ID, $new_ID ) {
+	_deprecated_function( __FUNCTION__, '3.9' );
+}