attachment_submit_meta_box() - WordPress 函数参考中文文档

返回介绍

attachment_submit_meta_box()

发布于 2017-09-10 字数2490 浏览 1125 评论 0

attachment_submit_meta_box( object $post )

Display attachment submit form fields.


描述


参数

$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><!--

更新日志

Version 描述
3.5.0 Introduced.

相关函数

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!