wp_update_php_annotation

函式
wp_update_php_annotation ( $before = '<p class="description">', $after = '</p>' )
引數
  • (string) $before Markup to output before the annotation. Default `<p class="description">`.
    Required:
    Default: '<p class="description">'
  • (string) $after Markup to output after the annotation. Default `</p>`.
    Required:
    Default: '</p>'
定義位置
相關方法
wp_get_update_php_annotationwp_update_postwp_update_pluginupdate_optionwp_update_link
引入
5.1.0
棄用
-

wp_update_php_annotation: 這個函式用來更新用於記錄WordPress程式碼的PHP docblock註釋。它通常被開發人員用來新增或更新WordPress中的函式、類或方法的文件。

列印虛擬主機改變”Update PHP” 頁面URL時的預設註釋。

這個函式要在{@see}之後使用,以便在虛擬主機改變了預設的”Update PHP”頁面URL時顯示一個一致的註釋。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>' ) {
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
echo $before . $annotation . $after;
}
}
function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>' ) { $annotation = wp_get_update_php_annotation(); if ( $annotation ) { echo $before . $annotation . $after; } }
function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>' ) {
	$annotation = wp_get_update_php_annotation();

	if ( $annotation ) {
		echo $before . $annotation . $after;
	}
}

常見問題

FAQs
檢視更多 >