Filter hook 'screen_options_show_screen'

in WP Core File wp-admin/includes/class-wp-screen.php at line 1034

View Source

screen_options_show_screen

Filter Hook
Description
Filters whether to show the Screen Options tab.

Hook Information

File Location wp-admin/includes/class-wp-screen.php View on GitHub
Hook Type Filter
Line Number 1034

Hook Parameters

Type Name Description
bool $show_screen Whether to show Screen Options tab. Default true.
WP_Screen $screen Current WP_Screen instance.

Usage Examples

Basic Usage
<?php
// Hook into screen_options_show_screen
add_filter('screen_options_show_screen', 'my_custom_filter', 10, 2);

function my_custom_filter($show_screen, $screen) {
    // Your custom filtering logic here
    return $show_screen;
}

Source Code Context

wp-admin/includes/class-wp-screen.php:1034 - How this hook is used in WordPress core
<?php
1029  		 *
1030  		 * @param bool      $show_screen Whether to show Screen Options tab.
1031  		 *                               Default true.
1032  		 * @param WP_Screen $screen      Current WP_Screen instance.
1033  		 */
1034  		$this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this );
1035  		return $this->_show_screen_options;
1036  	}
1037  
1038  	/**
1039  	 * Renders the screen options tab.

PHP Documentation

<?php
/**
		 * Filters whether to show the Screen Options tab.
		 *
		 * @since 3.2.0
		 *
		 * @param bool      $show_screen Whether to show Screen Options tab.
		 *                               Default true.
		 * @param WP_Screen $screen      Current WP_Screen instance.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-admin/includes/class-wp-screen.php
Related Hooks

Related hooks will be displayed here in future updates.