返回介绍

attachment_submit_meta_box()

发布于 2017-09-10 21:31:46 字数 2491 浏览 1226 评论 0 收藏 0

attachment_submit_meta_box( object $post )

Display attachment submit form fields.


description


参数

$post

(object) (Required)


源代码

File: wp-admin/includes/meta-boxes.php

function attachment_submit_meta_box( $post ) {
?>
<div class="submitbox" id="submitpost">

<div id="minor-publishing">

<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
<div style="display:none;">
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
</div>


<div id="misc-publishing-actions">
	<?php
	/* translators: Publish box date format, see https://secure.php.net/date */
	$datef = __( 'M j, Y @ H:i' );
	/* translators: Attachment information. 1: Date the attachment was uploaded */
	$stamp = __('Uploaded on: <b>%1$s</b>');
	$date = date_i18n( $datef, strtotime( $post->post_date ) );
	?>
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp"><?php printf($stamp, $date); ?></span>
	</div><!-- .misc-pub-section -->

	<?php
	/**
	 * Fires after the 'Uploaded on' section of the Save meta box
	 * in the attachment editing screen.
	 *
	 * @since 3.5.0
	 */
	do_action( 'attachment_submitbox_misc_actions' );
	?>
</div><!--

更新日志

Versiondescription
3.5.0Introduced.

相关函数

Uses

  • wp-admin/includes/template.php: submit_button()
  • wp-admin/includes/meta-boxes.php: attachment_submitbox_misc_actions
  • wp-includes/capabilities.php: current_user_can()
  • wp-includes/l10n.php: __()
  • wp-includes/l10n.php: _x()
  • wp-includes/l10n.php: esc_attr_e()
  • wp-includes/functions.php: date_i18n()
  • wp-includes/link-template.php: get_delete_post_link()
  • wp-includes/plugin.php: do_action()
  • Show 4 more uses Hide more uses

User Contributed Notes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文