$screen = convert_to_screen( $screen );
WP_Screen::add_old_compat_help( $screen, $help );
* Get the allowed themes for the current site.
* @deprecated 3.4.0 Use wp_get_themes()
* @return WP_Theme[] Array of WP_Theme objects keyed by their name.
function get_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
$themes = wp_get_themes( array( 'allowed' => true ) );
foreach ( $themes as $theme ) {
$wp_themes[ $theme->get('Name') ] = $theme;
* Retrieves a list of broken themes.
* @deprecated 3.4.0 Use wp_get_themes()
function get_broken_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
$themes = wp_get_themes( array( 'errors' => true ) );
foreach ( $themes as $theme ) {
$name = $theme->get('Name');
$broken[ $name ] = array(
'Description' => $theme->errors()->get_error_message(),
* Retrieves information on the current active theme.
* @deprecated 3.4.0 Use wp_get_theme()
function current_theme_info() {
_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
* This was once used to display an 'Insert into Post' button.
* Now it is deprecated and stubbed.
function _insert_into_post_button( $type ) {
_deprecated_function( __FUNCTION__, '3.5.0' );
* This was once used to display a media button.
* Now it is deprecated and stubbed.
function _media_button($title, $icon, $type, $id) {
_deprecated_function( __FUNCTION__, '3.5.0' );
* Gets an existing post and format it for editing.
* @deprecated 3.5.0 Use get_post()
function get_post_to_edit( $id ) {
_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
return get_post( $id, OBJECT, 'edit' );
* Gets the default page information to use.
* @deprecated 3.5.0 Use get_default_post_to_edit()
* @see get_default_post_to_edit()
* @return WP_Post Post object containing all the default post data as attributes
function get_default_page_to_edit() {
_deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
$page = get_default_post_to_edit();
$page->post_type = 'page';
* This was once used to create a thumbnail from an Image given a maximum side size.
* @deprecated 3.5.0 Use image_resize()
* @param mixed $file Filename of the original image, Or attachment ID.
* @param int $max_side Maximum length of a single side for the thumbnail.
* @param mixed $deprecated Never used.
* @return string Thumbnail path on success, Error string on failure.
function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
_deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
* This was once used to display a meta box for the nav menu theme locations.
* Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen.
function wp_nav_menu_locations_meta_box() {
_deprecated_function( __FUNCTION__, '3.6.0' );
* This was once used to kick-off the Core Updater.
* Deprecated in favor of instantiating a Core_Upgrader instance directly,
* and calling the 'upgrade' method.
* @deprecated 3.7.0 Use Core_Upgrader
function wp_update_core($current, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
add_filter('update_feedback', $feedback);
require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Core_Upgrader();
return $upgrader->upgrade($current);
* This was once used to kick-off the Plugin Updater.
* Deprecated in favor of instantiating a Plugin_Upgrader instance directly,
* and calling the 'upgrade' method.
* @deprecated 3.7.0 Use Plugin_Upgrader
function wp_update_plugin($plugin, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
add_filter('update_feedback', $feedback);
require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Plugin_Upgrader();
return $upgrader->upgrade($plugin);
* This was once used to kick-off the Theme Updater.
* Deprecated in favor of instantiating a Theme_Upgrader instance directly,
* and calling the 'upgrade' method.
* @deprecated 3.7.0 Use Theme_Upgrader
function wp_update_theme($theme, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
add_filter('update_feedback', $feedback);
require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Theme_Upgrader();
return $upgrader->upgrade($theme);
* This was once used to display attachment links. Now it is deprecated and stubbed.
function the_attachment_links( $id = false ) {
_deprecated_function( __FUNCTION__, '3.7.0' );
* Displays a screen icon.
_deprecated_function( __FUNCTION__, '3.8.0' );
* Retrieves the screen icon (no longer used in 3.8+).
* @return string An HTML comment explaining that icons are no longer used.
function get_screen_icon() {
_deprecated_function( __FUNCTION__, '3.8.0' );
return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
* Deprecated dashboard widget controls.
function wp_dashboard_incoming_links_output() {}
* Deprecated dashboard secondary output.
function wp_dashboard_secondary_output() {}
* Deprecated dashboard widget controls.
function wp_dashboard_incoming_links() {}
* Deprecated dashboard incoming links control.
function wp_dashboard_incoming_links_control() {}
* Deprecated dashboard plugins control.
function wp_dashboard_plugins() {}
* Deprecated dashboard primary control.
function wp_dashboard_primary_control() {}
* Deprecated dashboard recent comments control.
function wp_dashboard_recent_comments_control() {}
* Deprecated dashboard secondary section.
function wp_dashboard_secondary() {}
* Deprecated dashboard secondary control.
function wp_dashboard_secondary_control() {}
* Display plugins text for the WordPress news widget.
* @param string $rss The RSS feed URL.
* @param array $args Array of arguments for this RSS feed.
function wp_dashboard_plugins_output( $rss, $args = array() ) {
_deprecated_function( __FUNCTION__, '4.8.0' );
// Plugin feeds plus link to install them.
$popular = fetch_feed( $args['url']['popular'] );
if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
$plugin_slugs = array_keys( get_plugins() );
set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS );
foreach ( array( $popular ) as $feed ) {
if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
$items = $feed->get_items(0, 5);
// Pick a random, non-installed plugin.
// Abort this foreach loop iteration if there's no plugins left of this type.
if ( 0 === count($items) )
$item_key = array_rand($items);
$item = $items[$item_key];
list($link, $frag) = explode( '#', $item->get_link() );
if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )
unset( $items[$item_key] );
// Is this random plugin's slug already installed? If so, try again.
foreach ( $plugin_slugs as $plugin_slug ) {
if ( str_starts_with( $plugin_slug, $slug ) ) {
unset( $items[$item_key] );
// If we get to this point, then the random plugin isn't installed and we can stop the while().
// Eliminate some common badly formed plugin descriptions.
while ( ( null !== $item_key = array_rand($items) ) && str_contains( $items[$item_key]->get_description(), 'Plugin Name:' ) )
unset($items[$item_key]);
if ( !isset($items[$item_key]) )
$raw_title = $item->get_title();
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800';
echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
' <a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
/* translators: %s: Plugin name. */
esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
* This was once used to move child posts to a new parent.
function _relocate_children( $old_ID, $new_ID ) {
_deprecated_function( __FUNCTION__, '3.9.0' );
* Add a top-level menu page in the 'objects' section.
* This function takes a capability which will be used to determine whether
* or not a page is included in the menu.
* The function which is hooked in to handle the output of the page must check
* that the user has the required capability as well.
* @deprecated 4.5.0 Use add_menu_page()
* @global int $_wp_last_object_menu
* @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.
* @param string $menu_title The text to be used for the menu.
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
* @param callable $callback Optional. The function to be called to output the content for this page.
* @param string $icon_url Optional. The URL to the icon to be used for this menu.
* @return string The resulting page's hook_suffix.
function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_object_menu;
return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_object_menu);
* Add a top-level menu page in the 'utility' section.
* This function takes a capability which will be used to determine whether
* or not a page is included in the menu.
* The function which is hooked in to handle the output of the page must check
* that the user has the required capability as well.
* @deprecated 4.5.0 Use add_menu_page()
* @global int $_wp_last_utility_menu
* @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.
* @param string $menu_title The text to be used for the menu.
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
* @param callable $callback Optional. The function to be called to output the content for this page.
* @param string $icon_url Optional. The URL to the icon to be used for this menu.
* @return string The resulting page's hook_suffix.
function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_utility_menu;
$_wp_last_utility_menu++;
return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_utility_menu);
* Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
* as they disregard the autocomplete setting on the editor textarea. That can break the editor
* when the user navigates to it with the browser's Back button. See #28037
* Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
* @link https://core.trac.wordpress.org/ticket/35852
* @global bool $is_safari
* @global bool $is_chrome
function post_form_autocomplete_off() {
global $is_safari, $is_chrome;
_deprecated_function( __FUNCTION__, '4.6.0' );