media_upload_header

函数
media_upload_header ( No parameters )

media_upload_header函数是一个WordPress动作,用于显示媒体上传器的标题。开发者可以使用这个动作在媒体上传器的标题上添加自己的自定义内容。

输出传统媒体上传标题。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function media_upload_header() {
$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>';
if ( empty( $_GET['chromeless'] ) ) {
echo '<div id="media-upload-header">';
the_media_upload_tabs();
echo '</div>';
}
}
function media_upload_header() { $post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0; echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>'; if ( empty( $_GET['chromeless'] ) ) { echo '<div id="media-upload-header">'; the_media_upload_tabs(); echo '</div>'; } }
function media_upload_header() {
	$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;

	echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>';

	if ( empty( $_GET['chromeless'] ) ) {
		echo '<div id="media-upload-header">';
		the_media_upload_tabs();
		echo '</div>';
	}
}

常见问题

FAQs
查看更多 >