X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..a349837896628462bf8c9bdc27d1477a10fe03eb:/wp-admin/includes/screen.php diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 2ab5161b..85ab7124 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -124,53 +124,6 @@ function add_screen_option( $option, $args = array() ) { $current_screen->add_option( $option, $args ); } -/** - * Displays a screen icon. - * - * @uses get_screen_icon() - * @since 2.7.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 = '' ) { - echo get_screen_icon( $screen ); -} - -/** - * 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 '

'; -} - /** * Get the current screen object * @@ -618,6 +571,37 @@ final class WP_Screen { $this->_options[ $option ] = $args; } + /** + * Remove an option from the screen. + * + * @since 3.8.0 + * + * @param string $option Option ID. + */ + public function remove_option( $option ) { + unset( $this->_options[ $option ] ); + } + + /** + * Remove all options from the screen. + * + * @since 3.8.0 + */ + public function remove_options() { + $this->_options = array(); + } + + /** + * Get the options registered for the screen. + * + * @since 3.8.0 + * + * @return array Options with arguments. + */ + public function get_options() { + return $this->_options; + } + /** * Gets the arguments for an option for the screen. *