get_screen_icon

The timeline below displays how wordpress function get_screen_icon has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.9

/**
 * Retrieves the screen icon (no longer used in 3.8+).
 *
 * @since 3.2.0
 * @deprecated 3.8.0
 *
 * @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. -->';
}

WordPress Version: 4.4

/**
 * Retrieves the screen icon (no longer used in 3.8+).
 *
 * @deprecated 3.8.0
 *
 * @return string
 */
function get_screen_icon()
{
    return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
}

WordPress Version: 3.8

function get_screen_icon()
{
    return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
}

WordPress Version: 3.7

/**
 * Gets a screen icon.
 *
 * @since 3.2.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 = '')
{
    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>';
}