screen_options

函式
screen_options ( $screen )
相關
  • WP_Screen::render_per_page_options()
定義位置
相關方法
set_screen_optionsadd_screen_optionscreen_iconget_screen_iconget_option
引入
2.8.0
棄用
3.3.0

screen_options: 這是一個WordPress函式,顯示WordPress管理區中當前螢幕的螢幕選項。它通常用於定製螢幕選項,如每頁顯示的專案數量: 這個函式需要一個引數,就是螢幕的名稱。

返回螢幕的每頁選項。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function screen_options( $screen ) {
_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
$current_screen = get_current_screen();
if ( ! $current_screen )
return '';
ob_start();
$current_screen->render_per_page_options();
return ob_get_clean();
}
function screen_options( $screen ) { _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' ); $current_screen = get_current_screen(); if ( ! $current_screen ) return ''; ob_start(); $current_screen->render_per_page_options(); return ob_get_clean(); }
function screen_options( $screen ) {
	_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );

	$current_screen = get_current_screen();

	if ( ! $current_screen )
		return '';

	ob_start();
	$current_screen->render_per_page_options();
	return ob_get_clean();
}

常見問題

FAQs
檢視更多 >