wp_caption_input_textarea

函式
wp_caption_input_textarea ( $edit_post )
引數
  • (WP_Post) $edit_post Attachment WP_Post object.
    Required:
返回值
  • (string) HTML markup for the textarea element.
定義位置
相關方法
wp_transition_post_statuswp_count_termswp_print_inline_script_tagesc_textareawp_assign_widget_to_sidebar
引入
3.4.0
棄用
-

wp_caption_input_textarea: 這個函式用於生成使用者可以輸入圖片標題的輸入欄位的HTML。它通常在媒體管理器中使用。

輸出一個用於輸入附件標題的textarea元素。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_caption_input_textarea( $edit_post ) {
// Post data is already escaped.
$name = "attachments[{$edit_post->ID}][post_excerpt]";
return '<textarea name="' . $name . '" id="' . $name . '">' . $edit_post->post_excerpt . '</textarea>';
}
function wp_caption_input_textarea( $edit_post ) { // Post data is already escaped. $name = "attachments[{$edit_post->ID}][post_excerpt]"; return '<textarea name="' . $name . '" id="' . $name . '">' . $edit_post->post_excerpt . '</textarea>'; }
function wp_caption_input_textarea( $edit_post ) {
	// Post data is already escaped.
	$name = "attachments[{$edit_post->ID}][post_excerpt]";

	return '<textarea name="' . $name . '" id="' . $name . '">' . $edit_post->post_excerpt . '</textarea>';
}

常見問題

FAQs
檢視更多 >