3 * Deprecated admin functions from past WordPress versions. You shouldn't use these
4 * functions and look for the alternatives instead. The functions will be removed
8 * @subpackage Deprecated
12 * Deprecated functions come here to die.
17 * @deprecated 2.1.0 Use wp_editor()
20 function tinymce_include() {
21 _deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
27 * Unused Admin function.
33 function documentation_link() {
34 _deprecated_function( __FUNCTION__, '2.5' );
38 * Calculates the new dimensions for a downsampled image.
41 * @deprecated 3.0.0 Use wp_constrain_dimensions()
42 * @see wp_constrain_dimensions()
44 * @param int $width Current width of the image
45 * @param int $height Current height of the image
46 * @param int $wmax Maximum wanted width
47 * @param int $hmax Maximum wanted height
48 * @return array Shrunk dimensions (width, height).
50 function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
51 _deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
52 return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
56 * Calculated the new dimensions for a downsampled image.
59 * @deprecated 3.5.0 Use wp_constrain_dimensions()
60 * @see wp_constrain_dimensions()
62 * @param int $width Current width of the image
63 * @param int $height Current height of the image
64 * @return array Shrunk dimensions (width, height).
66 function get_udims( $width, $height ) {
67 _deprecated_function( __FUNCTION__, '3.5', 'wp_constrain_dimensions()' );
68 return wp_constrain_dimensions( $width, $height, 128, 96 );
72 * Legacy function used to generate the categories checklist control.
75 * @deprecated 2.6.0 Use wp_category_checklist()
76 * @see wp_category_checklist()
78 * @param int $default Unused.
79 * @param int $parent Unused.
80 * @param array $popular_ids Unused.
82 function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
83 _deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
85 wp_category_checklist( $post_ID );
89 * Legacy function used to generate a link categories checklist control.
92 * @deprecated 2.6.0 Use wp_link_category_checklist()
93 * @see wp_link_category_checklist()
95 * @param int $default Unused.
97 function dropdown_link_categories( $default = 0 ) {
98 _deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
100 wp_link_category_checklist( $link_id );
104 * Get the real filesystem path to a file to edit within the admin.
108 * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory.
110 * @param string $file Filesystem path relative to the wp-content directory.
111 * @return string Full filesystem path to edit.
113 function get_real_file_to_edit( $file ) {
114 _deprecated_function( __FUNCTION__, '2.9' );
116 return WP_CONTENT_DIR . $file;
120 * Legacy function used for generating a categories drop-down control.
123 * @deprecated 3.0.0 Use wp_dropdown_categories()
124 * @see wp_dropdown_categories()
126 * @param int $currentcat Optional. ID of the current category. Default 0.
127 * @param int $currentparent Optional. Current parent category ID. Default 0.
128 * @param int $parent Optional. Parent ID to retrieve categories for. Default 0.
129 * @param int $level Optional. Number of levels deep to display. Default 0.
130 * @param array $categories Optional. Categories to include in the control. Default 0.
131 * @return bool|null False if no categories were found.
133 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
134 _deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
136 $categories = get_categories( array('hide_empty' => 0) );
139 foreach ( $categories as $category ) {
140 if ( $currentcat != $category->term_id && $parent == $category->parent) {
141 $pad = str_repeat( '– ', $level );
142 $category->name = esc_html( $category->name );
143 echo "\n\t<option value='$category->term_id'";
144 if ( $currentparent == $category->term_id )
145 echo " selected='selected'";
146 echo ">$pad$category->name</option>";
147 wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
156 * Register a setting and its sanitization callback
159 * @deprecated 3.0.0 Use register_setting()
160 * @see register_setting()
162 * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
163 * Default whitelisted option key names include "general," "discussion," and "reading," among others.
164 * @param string $option_name The name of an option to sanitize and save.
165 * @param callable $sanitize_callback A callback function that sanitizes the option's value.
167 function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
168 _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
169 register_setting( $option_group, $option_name, $sanitize_callback );
173 * Unregister a setting
176 * @deprecated 3.0.0 Use unregister_setting()
177 * @see unregister_setting()
179 * @param string $option_group
180 * @param string $option_name
181 * @param callable $sanitize_callback
183 function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
184 _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
185 unregister_setting( $option_group, $option_name, $sanitize_callback );
189 * Determines the language to use for CodePress syntax highlighting.
194 * @param string $filename
196 function codepress_get_lang( $filename ) {
197 _deprecated_function( __FUNCTION__, '3.0' );
201 * Adds JavaScript required to make CodePress work on the theme/plugin editors.
206 function codepress_footer_js() {
207 _deprecated_function( __FUNCTION__, '3.0' );
211 * Determine whether to use CodePress.
216 function use_codepress() {
217 _deprecated_function( __FUNCTION__, '3.0' );
223 * @deprecated 3.1.0 Use get_users()
225 * @return array List of user IDs.
227 function get_author_user_ids() {
228 _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
231 if ( !is_multisite() )
232 $level_key = $wpdb->get_blog_prefix() . 'user_level';
234 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
236 return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
240 * Gets author users who can edit posts.
242 * @deprecated 3.1.0 Use get_users()
244 * @param int $user_id User ID.
245 * @return array|bool List of editable authors. False if no editable users.
247 function get_editable_authors( $user_id ) {
248 _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
252 $editable = get_editable_user_ids( $user_id );
257 $editable = join(',', $editable);
258 $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
261 return apply_filters('get_editable_authors', $authors);
265 * Gets the IDs of any users who can edit posts.
267 * @deprecated 3.1.0 Use get_users()
269 * @param int $user_id User ID.
270 * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros.
273 function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
274 _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
278 if ( ! $user = get_userdata( $user_id ) )
280 $post_type_obj = get_post_type_object($post_type);
282 if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
283 if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros )
284 return array($user->ID);
289 if ( !is_multisite() )
290 $level_key = $wpdb->get_blog_prefix() . 'user_level';
292 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
294 $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
295 if ( $exclude_zeros )
296 $query .= " AND meta_value != '0'";
298 return $wpdb->get_col( $query );
302 * Gets all users who are not authors.
304 * @deprecated 3.1.0 Use get_users()
306 function get_nonauthor_user_ids() {
307 _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
311 if ( !is_multisite() )
312 $level_key = $wpdb->get_blog_prefix() . 'user_level';
314 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
316 return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
319 if ( ! class_exists( 'WP_User_Search', false ) ) :
321 * WordPress User Search class.
324 * @deprecated 3.1.0 Use WP_User_Query
326 class WP_User_Search {
329 * {@internal Missing Description}}
338 * {@internal Missing Description}}
356 * Role name that users have.
374 * Amount of users to display per page.
380 var $users_per_page = 50;
383 * {@internal Missing Description}}
392 * {@internal Missing Description}}
401 * {@internal Missing Description}}
410 * {@internal Missing Description}}
419 * {@internal Missing Description}}
428 * {@internal Missing Description}}
437 * {@internal Missing Description}}
443 var $total_users_for_query = 0;
446 * {@internal Missing Description}}
452 var $too_many_total_users = false;
455 * {@internal Missing Description}}
464 * {@internal Missing Description}}
473 * PHP5 Constructor - Sets up the object properties.
477 * @param string $search_term Search terms string.
478 * @param int $page Optional. Page ID.
479 * @param string $role Role name.
480 * @return WP_User_Search
482 function __construct( $search_term = '', $page = '', $role = '' ) {
483 _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' );
485 $this->search_term = wp_unslash( $search_term );
486 $this->raw_page = ( '' == $page ) ? false : (int) $page;
487 $this->page = (int) ( '' == $page ) ? 1 : $page;
490 $this->prepare_query();
496 * PHP4 Constructor - Sets up the object properties.
500 * @param string $search_term Search terms string.
501 * @param int $page Optional. Page ID.
502 * @param string $role Role name.
503 * @return WP_User_Search
505 public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
506 self::__construct( $search_term, $page, $role );
510 * Prepares the user search query (legacy).
515 public function prepare_query() {
517 $this->first_user = ($this->page - 1) * $this->users_per_page;
519 $this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page);
520 $this->query_orderby = ' ORDER BY user_login';
523 if ( $this->search_term ) {
525 $search_sql = 'AND (';
526 foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col )
527 $searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' );
528 $search_sql .= implode(' OR ', $searches);
532 $this->query_from = " FROM $wpdb->users";
533 $this->query_where = " WHERE 1=1 $search_sql";
536 $this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
537 $this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
538 } elseif ( is_multisite() ) {
539 $level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
540 $this->query_from .= ", $wpdb->usermeta";
541 $this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
544 do_action_ref_array( 'pre_user_search', array( &$this ) );
548 * Executes the user search query.
553 public function query() {
556 $this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
558 if ( $this->results )
559 $this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit
561 $this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
565 * Prepares variables for use in templates.
570 function prepare_vars_for_template_usage() {}
573 * Handles paging for the user search query.
578 public function do_paging() {
579 if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
581 if ( ! empty($this->search_term) )
582 $args['usersearch'] = urlencode($this->search_term);
583 if ( ! empty($this->role) )
584 $args['role'] = urlencode($this->role);
586 $this->paging_text = paginate_links( array(
587 'total' => ceil($this->total_users_for_query / $this->users_per_page),
588 'current' => $this->page,
589 'base' => 'users.php?%_%',
590 'format' => 'userspage=%#%',
593 if ( $this->paging_text ) {
594 $this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s',
595 number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
596 number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
597 number_format_i18n( $this->total_users_for_query ),
605 * Retrieves the user search query results.
612 public function get_results() {
613 return (array) $this->results;
617 * Displaying paging text.
619 * @see do_paging() Builds paging text.
624 function page_links() {
625 echo $this->paging_text;
629 * Whether paging is enabled.
631 * @see do_paging() Builds paging text.
638 function results_are_paged() {
639 if ( $this->paging_text )
645 * Whether there are search terms.
652 function is_search() {
653 if ( $this->search_term )
661 * Retrieve editable posts from other users.
663 * @deprecated 3.1.0 Use get_posts()
666 * @param int $user_id User ID to not retrieve posts from.
667 * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'.
668 * @return array List of posts from others.
670 function get_others_unpublished_posts($user_id, $type='any') {
671 _deprecated_function( __FUNCTION__, '3.1' );
675 $editable = get_editable_user_ids( $user_id );
677 if ( in_array($type, array('draft', 'pending')) )
678 $type_sql = " post_status = '$type' ";
680 $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
682 $dir = ( 'pending' == $type ) ? 'ASC' : 'DESC';
687 $editable = join(',', $editable);
688 $other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) );
691 return apply_filters('get_others_drafts', $other_unpubs);
695 * Retrieve drafts from other users.
697 * @deprecated 3.1.0 Use get_posts()
700 * @param int $user_id User ID.
701 * @return array List of drafts from other users.
703 function get_others_drafts($user_id) {
704 _deprecated_function( __FUNCTION__, '3.1' );
706 return get_others_unpublished_posts($user_id, 'draft');
710 * Retrieve pending review posts from other users.
712 * @deprecated 3.1.0 Use get_posts()
715 * @param int $user_id User ID.
716 * @return array List of posts with pending review post type from other users.
718 function get_others_pending($user_id) {
719 _deprecated_function( __FUNCTION__, '3.1' );
721 return get_others_unpublished_posts($user_id, 'pending');
725 * Output the QuickPress dashboard widget.
728 * @deprecated 3.2.0 Use wp_dashboard_quick_press()
729 * @see wp_dashboard_quick_press()
731 function wp_dashboard_quick_press_output() {
732 _deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' );
733 wp_dashboard_quick_press();
737 * Outputs the TinyMCE editor.
740 * @deprecated 3.3.0 Use wp_editor()
743 * @staticvar int $num
745 function wp_tiny_mce( $teeny = false, $settings = false ) {
746 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
750 if ( ! class_exists( '_WP_Editors', false ) )
751 require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
753 $editor_id = 'content' . $num++;
757 'tinymce' => $settings ? $settings : true,
761 $set = _WP_Editors::parse_settings($editor_id, $set);
762 _WP_Editors::editor_settings($editor_id, $set);
766 * Preloads TinyMCE dialogs.
768 * @deprecated 3.3.0 Use wp_editor()
771 function wp_preload_dialogs() {
772 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
776 * Prints TinyMCE editor JS.
778 * @deprecated 3.3.0 Use wp_editor()
781 function wp_print_editor_js() {
782 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
788 * @deprecated 3.3.0 Use wp_editor()
791 function wp_quicktags() {
792 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
796 * Returns the screen layout options.
799 * @deprecated 3.3.0 WP_Screen::render_screen_layout()
800 * @see WP_Screen::render_screen_layout()
802 function screen_layout( $screen ) {
803 _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' );
805 $current_screen = get_current_screen();
807 if ( ! $current_screen )
811 $current_screen->render_screen_layout();
812 return ob_get_clean();
816 * Returns the screen's per-page options.
819 * @deprecated 3.3.0 Use WP_Screen::render_per_page_options()
820 * @see WP_Screen::render_per_page_options()
822 function screen_options( $screen ) {
823 _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' );
825 $current_screen = get_current_screen();
827 if ( ! $current_screen )
831 $current_screen->render_per_page_options();
832 return ob_get_clean();
836 * Renders the screen's help.
839 * @deprecated 3.3.0 Use WP_Screen::render_screen_meta()
840 * @see WP_Screen::render_screen_meta()
842 function screen_meta( $screen ) {
843 $current_screen = get_current_screen();
844 $current_screen->render_screen_meta();
848 * Favorite actions were deprecated in version 3.2. Use the admin bar instead.
851 * @deprecated 3.2.0 Use WP_Admin_Bar
854 function favorite_actions() {
855 _deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' );
859 * Handles uploading an image.
861 * @deprecated 3.3.0 Use wp_media_upload_handler()
862 * @see wp_media_upload_handler()
864 * @return null|string
866 function media_upload_image() {
867 _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
868 return wp_media_upload_handler();
872 * Handles uploading an audio file.
874 * @deprecated 3.3.0 Use wp_media_upload_handler()
875 * @see wp_media_upload_handler()
877 * @return null|string
879 function media_upload_audio() {
880 _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
881 return wp_media_upload_handler();
885 * Handles uploading a video file.
887 * @deprecated 3.3.0 Use wp_media_upload_handler()
888 * @see wp_media_upload_handler()
890 * @return null|string
892 function media_upload_video() {
893 _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
894 return wp_media_upload_handler();
898 * Handles uploading a generic file.
900 * @deprecated 3.3.0 Use wp_media_upload_handler()
901 * @see wp_media_upload_handler()
903 * @return null|string
905 function media_upload_file() {
906 _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
907 return wp_media_upload_handler();
911 * Handles retrieving the insert-from-URL form for an image.
913 * @deprecated 3.3.0 Use wp_media_insert_url_form()
914 * @see wp_media_insert_url_form()
918 function type_url_form_image() {
919 _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
920 return wp_media_insert_url_form( 'image' );
924 * Handles retrieving the insert-from-URL form for an audio file.
926 * @deprecated 3.3.0 Use wp_media_insert_url_form()
927 * @see wp_media_insert_url_form()
931 function type_url_form_audio() {
932 _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
933 return wp_media_insert_url_form( 'audio' );
937 * Handles retrieving the insert-from-URL form for a video file.
939 * @deprecated 3.3.0 Use wp_media_insert_url_form()
940 * @see wp_media_insert_url_form()
944 function type_url_form_video() {
945 _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
946 return wp_media_insert_url_form( 'video' );
950 * Handles retrieving the insert-from-URL form for a generic file.
952 * @deprecated 3.3.0 Use wp_media_insert_url_form()
953 * @see wp_media_insert_url_form()
957 function type_url_form_file() {
958 _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
959 return wp_media_insert_url_form( 'file' );
963 * Add contextual help text for a page.
965 * Creates an 'Overview' help tab.
968 * @deprecated 3.3.0 Use WP_Screen::add_help_tab()
969 * @see WP_Screen::add_help_tab()
971 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
972 * @param string $help The content of an 'Overview' help tab.
974 function add_contextual_help( $screen, $help ) {
975 _deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' );
977 if ( is_string( $screen ) )
978 $screen = convert_to_screen( $screen );
980 WP_Screen::add_old_compat_help( $screen, $help );
984 * Get the allowed themes for the current blog.
987 * @deprecated 3.4.0 Use wp_get_themes()
988 * @see wp_get_themes()
990 * @return array $themes Array of allowed themes.
992 function get_allowed_themes() {
993 _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'allowed' => true ) )" );
995 $themes = wp_get_themes( array( 'allowed' => true ) );
997 $wp_themes = array();
998 foreach ( $themes as $theme ) {
999 $wp_themes[ $theme->get('Name') ] = $theme;
1006 * Retrieves a list of broken themes.
1009 * @deprecated 3.4.0 Use wp_get_themes()
1010 * @see wp_get_themes()
1014 function get_broken_themes() {
1015 _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" );
1017 $themes = wp_get_themes( array( 'errors' => true ) );
1019 foreach ( $themes as $theme ) {
1020 $name = $theme->get('Name');
1021 $broken[ $name ] = array(
1024 'Description' => $theme->errors()->get_error_message(),
1031 * Retrieves information on the current active theme.
1034 * @deprecated 3.4.0 Use wp_get_theme()
1035 * @see wp_get_theme()
1039 function current_theme_info() {
1040 _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
1042 return wp_get_theme();
1046 * This was once used to display an 'Insert into Post' button.
1048 * Now it is deprecated and stubbed.
1052 function _insert_into_post_button( $type ) {
1053 _deprecated_function( __FUNCTION__, '3.5' );
1057 * This was once used to display a media button.
1059 * Now it is deprecated and stubbed.
1063 function _media_button($title, $icon, $type, $id) {
1064 _deprecated_function( __FUNCTION__, '3.5' );
1068 * Gets an existing post and format it for editing.
1071 * @deprecated 3.5.0 Use get_post()
1077 function get_post_to_edit( $id ) {
1078 _deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
1080 return get_post( $id, OBJECT, 'edit' );
1084 * Gets the default page information to use.
1087 * @deprecated 3.5.0 Use get_default_post_to_edit()
1088 * @see get_default_post_to_edit()
1090 * @return WP_Post Post object containing all the default post data as attributes
1092 function get_default_page_to_edit() {
1093 _deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" );
1095 $page = get_default_post_to_edit();
1096 $page->post_type = 'page';
1101 * This was once used to create a thumbnail from an Image given a maximum side size.
1104 * @deprecated 3.5.0 Use image_resize()
1105 * @see image_resize()
1107 * @param mixed $file Filename of the original image, Or attachment id.
1108 * @param int $max_side Maximum length of a single side for the thumbnail.
1109 * @param mixed $deprecated Never used.
1110 * @return string Thumbnail path on success, Error string on failure.
1112 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
1113 _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
1114 return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
1118 * This was once used to display a metabox for the nav menu theme locations.
1120 * Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen.
1125 function wp_nav_menu_locations_meta_box() {
1126 _deprecated_function( __FUNCTION__, '3.6' );
1130 * This was once used to kick-off the Core Updater.
1132 * Deprecated in favor of instantating a Core_Upgrader instance directly,
1133 * and calling the 'upgrade' method.
1136 * @deprecated 3.7.0 Use Core_Upgrader
1137 * @see Core_Upgrader
1139 function wp_update_core($current, $feedback = '') {
1140 _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
1142 if ( !empty($feedback) )
1143 add_filter('update_feedback', $feedback);
1145 include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1146 $upgrader = new Core_Upgrader();
1147 return $upgrader->upgrade($current);
1152 * This was once used to kick-off the Plugin Updater.
1154 * Deprecated in favor of instantating a Plugin_Upgrader instance directly,
1155 * and calling the 'upgrade' method.
1156 * Unused since 2.8.0.
1159 * @deprecated 3.7.0 Use Plugin_Upgrader
1160 * @see Plugin_Upgrader
1162 function wp_update_plugin($plugin, $feedback = '') {
1163 _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
1165 if ( !empty($feedback) )
1166 add_filter('update_feedback', $feedback);
1168 include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1169 $upgrader = new Plugin_Upgrader();
1170 return $upgrader->upgrade($plugin);
1174 * This was once used to kick-off the Theme Updater.
1176 * Deprecated in favor of instantating a Theme_Upgrader instance directly,
1177 * and calling the 'upgrade' method.
1178 * Unused since 2.8.0.
1181 * @deprecated 3.7.0 Use Theme_Upgrader
1182 * @see Theme_Upgrader
1184 function wp_update_theme($theme, $feedback = '') {
1185 _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );
1187 if ( !empty($feedback) )
1188 add_filter('update_feedback', $feedback);
1190 include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1191 $upgrader = new Theme_Upgrader();
1192 return $upgrader->upgrade($theme);
1196 * This was once used to display attachment links. Now it is deprecated and stubbed.
1201 * @param int|bool $id
1203 function the_attachment_links( $id = false ) {
1204 _deprecated_function( __FUNCTION__, '3.7' );
1208 * Displays a screen icon.
1211 * @since 3.8.0 Screen icons are no longer used in WordPress. This function no longer produces output.
1212 * @deprecated 3.8.0 Use get_screen_icon()
1213 * @see get_screen_icon()
1215 function screen_icon() {
1216 echo get_screen_icon();
1220 * Retrieves the screen icon (no longer used in 3.8+).
1226 function get_screen_icon() {
1227 return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
1231 * Deprecated dashboard widget controls.
1236 function wp_dashboard_incoming_links_output() {}
1239 * Deprecated dashboard secondary output.
1243 function wp_dashboard_secondary_output() {}
1246 * Deprecated dashboard widget controls.
1251 function wp_dashboard_incoming_links() {}
1254 * Deprecated dashboard incoming links control.
1258 function wp_dashboard_incoming_links_control() {}
1261 * Deprecated dashboard plugins control.
1265 function wp_dashboard_plugins() {}
1268 * Deprecated dashboard primary control.
1272 function wp_dashboard_primary_control() {}
1275 * Deprecated dashboard recent comments control.
1279 function wp_dashboard_recent_comments_control() {}
1282 * Deprecated dashboard secondary section.
1286 function wp_dashboard_secondary() {}
1289 * Deprecated dashboard secondary control.
1293 function wp_dashboard_secondary_control() {}
1296 * This was once used to move child posts to a new parent.
1302 * @param int $old_ID
1303 * @param int $new_ID
1305 function _relocate_children( $old_ID, $new_ID ) {
1306 _deprecated_function( __FUNCTION__, '3.9' );