add_contextual_help

函式
add_contextual_help ( $screen, $help )
引數
  • (string) $screen The handle for the screen to add help to. This is usually the hook name returned by the `add_*_page()` functions.
    Required:
  • (string) $help The content of an 'Overview' help tab.
    Required:
相關
  • WP_Screen::add_help_tab()
定義位置
相關方法
add_comment_metaadd_comments_pagefeed_content_typeadd_object_pagecontent_url
引入
2.7.0
棄用
3.3.0

add_contextual_help: 這個函式用於向WordPress管理頁面新增上下文幫助: 該函式需要兩個引數:螢幕ID,和一個幫助選項陣列。

為一個頁面新增上下文幫助文字。

建立一個’概覽’幫助標籤。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function add_contextual_help( $screen, $help ) {
_deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
WP_Screen::add_old_compat_help( $screen, $help );
}
function add_contextual_help( $screen, $help ) { _deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' ); if ( is_string( $screen ) ) $screen = convert_to_screen( $screen ); WP_Screen::add_old_compat_help( $screen, $help ); }
function add_contextual_help( $screen, $help ) {
	_deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );

	if ( is_string( $screen ) )
		$screen = convert_to_screen( $screen );

	WP_Screen::add_old_compat_help( $screen, $help );
}

常見問題

FAQs
檢視更多 >