Only informally deprecate get_screen_icon() and screen_icon(). fixes #26119.

Built from https://develop.svn.wordpress.org/trunk@26537


git-svn-id: http://core.svn.wordpress.org/trunk@26429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-12-02 20:00:11 +00:00
parent b4f2763f8d
commit 4728680f8f

View File

@ -1135,53 +1135,18 @@ function the_attachment_links( $id = false ) {
_deprecated_function( __FUNCTION__, '3.7' );
}
/**
/**#@+
* Displays a screen icon.
*
* @uses get_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
*
* @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
* which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
*/
function screen_icon( $screen = '' ) {
_deprecated_function( __FUNCTION__, '3.8' );
echo get_screen_icon( $screen );
function screen_icon() {
echo get_screen_icon();
}
/**
* Gets a screen icon.
*
* @since 3.2.0
* @deprecated 3.8.0
*
* @global $post_ID
* @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
* which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
* @return string HTML for the screen icon.
*/
function get_screen_icon( $screen = '' ) {
_deprecated_function( __FUNCTION__, '3.8' );
if ( empty( $screen ) )
$screen = get_current_screen();
elseif ( is_string( $screen ) )
$icon_id = $screen;
$class = 'icon32';
if ( empty( $icon_id ) ) {
if ( ! empty( $screen->parent_base ) )
$icon_id = $screen->parent_base;
else
$icon_id = $screen->base;
if ( 'page' == $screen->post_type )
$icon_id = 'edit-pages';
if ( $screen->post_type )
$class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
}
return '<div id="icon-' . esc_attr( $icon_id ) . '" class="' . $class . '"><br /></div>';
}
function get_screen_icon() {
return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
}
/**#@-*/