Filter hook 'screen_options_show_submit'

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

View Source

screen_options_show_submit

Filter Hook
Description
Filters whether to show the Screen Options submit button.

Hook Information

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

Hook Parameters

Type Name Description
bool $show_button Whether to show Screen Options submit button. Default false.
WP_Screen $screen Current WP_Screen instance.

Usage Examples

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

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

Source Code Context

wp-admin/includes/class-wp-screen.php:1092 - How this hook is used in WordPress core
<?php
1087  		 *
1088  		 * @param bool      $show_button Whether to show Screen Options submit button.
1089  		 *                               Default false.
1090  		 * @param WP_Screen $screen      Current WP_Screen instance.
1091  		 */
1092  		$show_button = apply_filters( 'screen_options_show_submit', false, $this );
1093  
1094  		if ( $show_button ) {
1095  			submit_button( __( 'Apply' ), 'primary', 'screen-options-apply', true );
1096  		}
1097  

PHP Documentation

<?php
/**
		 * Filters whether to show the Screen Options submit button.
		 *
		 * @since 4.4.0
		 *
		 * @param bool      $show_button Whether to show Screen Options submit button.
		 *                               Default false.
		 * @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.