attachment_submit_meta_box

The timeline below displays how wordpress function attachment_submit_meta_box has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * Displays attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post Current post object.
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            printf('<a class="submitdelete deletion" href="%1$s">%2$s</a>', get_delete_post_link($post->ID), __('Move to Trash'));
        } else {
            $show_confirmation = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            printf('<a class="submitdelete deletion"%1$s href="%2$s">%3$s</a>', $show_confirmation, get_delete_post_link($post->ID, '', true), __('Delete permanently'));
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 6.3

/**
 * Displays attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post Current post object.
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/manual/datetime.format.php */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            printf('<a class="submitdelete deletion" href="%1$s">%2$s</a>', get_delete_post_link($post->ID), __('Move to Trash'));
        } else {
            $show_confirmation = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            printf('<a class="submitdelete deletion"%1$s href="%2$s">%3$s</a>', $show_confirmation, get_delete_post_link($post->ID, '', true), __('Delete permanently'));
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 6.2

/**
 * Displays attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post Current post object.
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/manual/datetime.format.php */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 6.1

/**
 * Displays attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post Current post object.
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/manual/datetime.format.php */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.6

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/manual/datetime.format.php */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.5

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/date */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/date */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/date */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.4

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/date */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://www.php.net/date */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://www.php.net/date */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.3

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
			<?php 
    $uploaded_on = sprintf(
        /* translators: Publish box date string. 1: Date, 2: Time. See https://secure.php.net/date */
        __('%1$s at %2$s'),
        /* translators: Publish box date format, see https://secure.php.net/date */
        date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)),
        /* translators: Publish box time format, see https://secure.php.net/date */
        date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date))
    );
    /* translators: Attachment information. %s: Date the attachment was uploaded. */
    printf(__('Uploaded on: %s'), '<b>' . $uploaded_on . '</b>');
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.2

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
		<?php 
    $date = date_i18n(
        /* translators: Publish box date format, see https://secure.php.net/date */
        __('M j, Y @ H:i'),
        strtotime($post->post_date)
    );
    printf(
        /* translators: Attachment information. %s: Date the attachment was uploaded */
        __('Uploaded on: %s'),
        '<b>' . $date . '</b>'
    );
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Move to Trash') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 5.1

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp">
		<?php 
    $date = date_i18n(
        /* translators: Publish box date format, see https://secure.php.net/date */
        __('M j, Y @ H:i'),
        strtotime($post->post_date)
    );
    printf(
        /* translators: Attachment information. %s: Date the attachment was uploaded */
        __('Uploaded on: %s'),
        '<b>' . $date . '</b>'
    );
    ?>
		</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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment.
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . _x('Trash', 'verb') . '</a>';
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . '</a>';
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

	<?php 
}

WordPress Version: 4.9

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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">
	<div class="misc-pub-section curtime misc-pub-curtime">
		<span id="timestamp"><?php 
    $date = date_i18n(
        /* translators: Publish box date format, see https://secure.php.net/date */
        __('M j, Y @ H:i'),
        strtotime($post->post_date)
    );
    printf(
        /* translators: Attachment information. %s: Date the attachment was uploaded */
        __('Uploaded on: %s'),
        '<b>' . $date . '</b>'
    );
    ?></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
     * @since 4.9.0 Added the `$post` parameter.
     *
     * @param WP_Post $post WP_Post object for the current attachment. 
     */
    do_action('attachment_submitbox_misc_actions', $post);
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . _x('Trash', 'verb') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 4.7

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . _x('Trash', 'verb') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 4.6

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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'), 'button', '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');
    $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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . _x('Trash', 'verb') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 4.5

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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'), 'button', 'save');
    ?>
</div>


<div id="misc-publishing-actions">
	<?php 
    /* translators: Publish box date format, see http://php.net/date */
    $datef = __('M j, Y @ H:i');
    $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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . _x('Trash', 'verb') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 4.2

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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'), 'button', 'save');
    ?>
</div>


<div id="misc-publishing-actions">
	<?php 
    /* translators: Publish box date format, see http://php.net/date */
    $datef = __('M j, Y @ H:i');
    $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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 4.0

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
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'), 'button', 'save');
    ?>
</div>


<div id="misc-publishing-actions">
	<?php 
    /* translators: Publish box date format, see http://php.net/date */
    $datef = __('M j, Y @ G:i');
    $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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" accesskey="p" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 3.9

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
function attachment_submit_meta_box($post)
{
    global $action;
    $post_type = $post->post_type;
    $post_type_object = get_post_type_object($post_type);
    $can_publish = current_user_can($post_type_object->cap->publish_posts);
    ?>
<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'), 'button', 'save');
    ?>
</div>


<div id="misc-publishing-actions">
	<?php 
    /* translators: Publish box date format, see http://php.net/date */
    $datef = __('M j, Y @ G:i');
    $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><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" accesskey="p" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}

WordPress Version: 3.7

/**
 * Display attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param object $post
 */
function attachment_submit_meta_box($post)
{
    global $action;
    $post_type = $post->post_type;
    $post_type_object = get_post_type_object($post_type);
    $can_publish = current_user_can($post_type_object->cap->publish_posts);
    ?>
<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'), 'button', 'save');
    ?>
</div>


<div id="misc-publishing-actions">
	<?php 
    // translators: Publish box date format, see http://php.net/date
    $datef = __('M j, Y @ G:i');
    $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 
    do_action('attachment_submitbox_misc_actions');
    ?>
</div><!-- #misc-publishing-actions -->
<div class="clear"></div>
</div><!-- #minor-publishing -->

<div id="major-publishing-actions">
	<div id="delete-action">
	<?php 
    if (current_user_can('delete_post', $post->ID)) {
        if (EMPTY_TRASH_DAYS && MEDIA_TRASH) {
            echo "<a class='submitdelete deletion' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
        } else {
            $delete_ays = (!MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
            echo "<a class='submitdelete deletion'{$delete_ays} href='" . get_delete_post_link($post->ID, null, true) . "'>" . __('Delete Permanently') . "</a>";
        }
    }
    ?>
	</div>

	<div id="publishing-action">
		<span class="spinner"></span>
		<input name="original_publish" type="hidden" id="original_publish" value="<?php 
    esc_attr_e('Update');
    ?>" />
		<input name="save" type="submit" class="button-primary button-large" id="publish" accesskey="p" value="<?php 
    esc_attr_e('Update');
    ?>" />
	</div>
	<div class="clear"></div>
</div><!-- #major-publishing-actions -->

</div>

<?php 
}