screen_options_show_submit хук-фильтрWP 4.4.0

Filters whether to show the Screen Options submit button.

Использование

add_filter( 'screen_options_show_submit', 'wp_kama_screen_options_show_submit_filter', 10, 2 );

/**
 * Function for `screen_options_show_submit` filter-hook.
 * 
 * @param bool      $show_button Whether to show Screen Options submit button.
 * @param WP_Screen $screen      Current WP_Screen instance.
 *
 * @return bool
 */
function wp_kama_screen_options_show_submit_filter( $show_button, $screen ){

	// filter...
	return $show_button;
}
$show_button(true|false)
Whether to show Screen Options submit button.
По умолчанию: false
$screen(WP_Screen)
Current WP_Screen instance.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

WP_Screen::render_screen_options()
screen_options_show_submit
wp-admin/includes/class-wp-screen.php 1092
$show_button = apply_filters( 'screen_options_show_submit', false, $this );

Где используется хук в WordPress

wp-admin/includes/class-wp-screen.php 1274
add_filter( 'screen_options_show_submit', '__return_true' );
wp-admin/includes/class-wp-screen.php 1328
add_filter( 'screen_options_show_submit', '__return_true' );