Administration: Capitalize `Trash` consistently in various messages and comments.
When used as a noun referring to the "virtual" place, `Trash` should be capitalized. Props garrett-eclipse, aandrewdixon, Presskopp. Fixes #45317. Built from https://develop.svn.wordpress.org/trunk@47233 git-svn-id: http://core.svn.wordpress.org/trunk@47033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02ae343849
commit
a6949956d1
|
@ -93,7 +93,7 @@ require_once ABSPATH . 'wp-admin/includes/admin.php';
|
||||||
|
|
||||||
auth_redirect();
|
auth_redirect();
|
||||||
|
|
||||||
// Schedule trash collection.
|
// Schedule Trash collection.
|
||||||
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) {
|
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) {
|
||||||
wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' );
|
wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ if ( $doaction ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'delete_all' === $doaction ) {
|
if ( 'delete_all' === $doaction ) {
|
||||||
// Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
|
// Prepare for deletion of all posts with a specified post status (i.e. Empty Trash).
|
||||||
$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
|
$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
|
||||||
// Validate the post status exists.
|
// Validate the post status exists.
|
||||||
if ( get_post_status_object( $post_status ) ) {
|
if ( get_post_status_object( $post_status ) ) {
|
||||||
|
@ -256,7 +256,7 @@ if ( 'post' === $post_type ) {
|
||||||
'<ul>' .
|
'<ul>' .
|
||||||
'<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.' ) . '</li>' .
|
'<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.' ) . '</li>' .
|
||||||
'<li>' . __( '<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.' ) . '</li>' .
|
'<li>' . __( '<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.' ) . '</li>' .
|
||||||
'<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.' ) . '</li>' .
|
'<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the Trash, from which you can permanently delete it.' ) . '</li>' .
|
||||||
'<li>' . __( '<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post’s status.' ) . '</li>' .
|
'<li>' . __( '<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post’s status.' ) . '</li>' .
|
||||||
'</ul>',
|
'</ul>',
|
||||||
)
|
)
|
||||||
|
@ -266,7 +266,7 @@ if ( 'post' === $post_type ) {
|
||||||
'id' => 'bulk-actions',
|
'id' => 'bulk-actions',
|
||||||
'title' => __( 'Bulk Actions' ),
|
'title' => __( 'Bulk Actions' ),
|
||||||
'content' =>
|
'content' =>
|
||||||
'<p>' . __( 'You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.' ) . '</p>' .
|
'<p>' . __( 'You can also edit or move multiple posts to the Trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.' ) . '</p>' .
|
||||||
'<p>' . __( 'When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.' ) . '</p>',
|
'<p>' . __( 'When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.' ) . '</p>',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -716,7 +716,7 @@ function wp_ajax_delete_comment() {
|
||||||
|
|
||||||
$r = wp_untrash_comment( $comment );
|
$r = wp_untrash_comment( $comment );
|
||||||
|
|
||||||
// Undo trash, not in trash.
|
// Undo trash, not in Trash.
|
||||||
if ( ! isset( $_POST['comment_status'] ) || 'trash' !== $_POST['comment_status'] ) {
|
if ( ! isset( $_POST['comment_status'] ) || 'trash' !== $_POST['comment_status'] ) {
|
||||||
$delta = 1;
|
$delta = 1;
|
||||||
}
|
}
|
||||||
|
@ -861,7 +861,7 @@ function wp_ajax_delete_post( $action ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajax handler for sending a post to the trash.
|
* Ajax handler for sending a post to the Trash.
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*
|
*
|
||||||
|
@ -897,7 +897,7 @@ function wp_ajax_trash_post( $action ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajax handler to restore a post from the trash.
|
* Ajax handler to restore a post from the Trash.
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -493,7 +493,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return if the post type doesn't have post formats, or there are no posts using formats,
|
* Return if the post type doesn't have post formats, or there are no posts using formats,
|
||||||
* or if we're in the trash.
|
* or if we're in the Trash.
|
||||||
*/
|
*/
|
||||||
if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || ! $used_post_formats || $this->is_trash ) {
|
if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || ! $used_post_formats || $this->is_trash ) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -525,7 +525,7 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output 'undo move to trash' text for comments
|
* Output 'undo move to Trash' text for comments
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*/
|
*/
|
||||||
|
@ -535,7 +535,7 @@ function wp_comment_trashnotice() {
|
||||||
<div class="trash-undo-inside">
|
<div class="trash-undo-inside">
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: Comment author, filled by AJAX. */
|
/* translators: %s: Comment author, filled by AJAX. */
|
||||||
printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' );
|
printf( __( 'Comment by %s moved to the Trash.' ), '<strong></strong>' );
|
||||||
?>
|
?>
|
||||||
<span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span>
|
<span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1864,7 +1864,7 @@
|
||||||
removedControl.container.remove();
|
removedControl.container.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move widget to inactive widgets sidebar (move it to trash) if has been previously saved.
|
// Move widget to inactive widgets sidebar (move it to Trash) if has been previously saved.
|
||||||
// This prevents the inactive widgets sidebar from overflowing with throwaway widgets.
|
// This prevents the inactive widgets sidebar from overflowing with throwaway widgets.
|
||||||
if ( api.Widgets.savedWidgetIds[removedWidgetId] ) {
|
if ( api.Widgets.savedWidgetIds[removedWidgetId] ) {
|
||||||
inactiveWidgets = api.value( 'sidebars_widgets[wp_inactive_widgets]' )().slice();
|
inactiveWidgets = api.value( 'sidebars_widgets[wp_inactive_widgets]' )().slice();
|
||||||
|
|
|
@ -538,7 +538,7 @@ window.setCommentsList = function() {
|
||||||
// The comment is currently pending.
|
// The comment is currently pending.
|
||||||
} else if ( unapproved ) {
|
} else if ( unapproved ) {
|
||||||
pendingDiff = -1;
|
pendingDiff = -1;
|
||||||
// The comment was in the trash.
|
// The comment was in the Trash.
|
||||||
} else if ( trashed ) {
|
} else if ( trashed ) {
|
||||||
trashDiff = -1;
|
trashDiff = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ printf(
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Comment Blocklist' ); ?></th>
|
<th scope="row"><?php _e( 'Comment Blocklist' ); ?></th>
|
||||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Blocklist' ); ?></span></legend>
|
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Blocklist' ); ?></span></legend>
|
||||||
<p><label for="blacklist_keys"><?php _e( 'When a comment contains any of these words in its content, name, URL, email, or IP address, it will be put in the trash. One word or IP address per line. It will match inside words, so “press” will match “WordPress”.' ); ?></label></p>
|
<p><label for="blacklist_keys"><?php _e( 'When a comment contains any of these words in its content, name, URL, email, or IP address, it will be put in the Trash. One word or IP address per line. It will match inside words, so “press” will match “WordPress”.' ); ?></label></p>
|
||||||
<p>
|
<p>
|
||||||
<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
|
<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -101,7 +101,7 @@ if ( ! empty( $privacy_policy_page_id ) ) {
|
||||||
'page_for_privacy_policy',
|
'page_for_privacy_policy',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %s: URL to Pages Trash. */
|
/* translators: %s: URL to Pages Trash. */
|
||||||
__( 'The currently selected Privacy Policy page is in the trash. Please create or select a new Privacy Policy page or <a href="%s">restore the current page</a>.' ),
|
__( 'The currently selected Privacy Policy page is in the Trash. Please create or select a new Privacy Policy page or <a href="%s">restore the current page</a>.' ),
|
||||||
'edit.php?post_status=trash&post_type=page'
|
'edit.php?post_status=trash&post_type=page'
|
||||||
),
|
),
|
||||||
'error'
|
'error'
|
||||||
|
|
|
@ -328,10 +328,10 @@ if ( ! empty( $_GET['deleted'] ) && absint( $_GET['deleted'] ) ) {
|
||||||
if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
|
if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
|
||||||
$trashed = absint( $_GET['trashed'] );
|
$trashed = absint( $_GET['trashed'] );
|
||||||
if ( 1 == $trashed ) {
|
if ( 1 == $trashed ) {
|
||||||
$message = __( 'Media file moved to the trash.' );
|
$message = __( 'Media file moved to the Trash.' );
|
||||||
} else {
|
} else {
|
||||||
/* translators: %s: Number of media files. */
|
/* translators: %s: Number of media files. */
|
||||||
$message = _n( '%s media file moved to the trash.', '%s media files moved to the trash.', $trashed );
|
$message = _n( '%s media file moved to the Trash.', '%s media files moved to the Trash.', $trashed );
|
||||||
}
|
}
|
||||||
$message = sprintf( $message, number_format_i18n( $trashed ) );
|
$message = sprintf( $message, number_format_i18n( $trashed ) );
|
||||||
$message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
|
$message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
|
||||||
|
@ -341,10 +341,10 @@ if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
|
||||||
if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
|
if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
|
||||||
$untrashed = absint( $_GET['untrashed'] );
|
$untrashed = absint( $_GET['untrashed'] );
|
||||||
if ( 1 == $untrashed ) {
|
if ( 1 == $untrashed ) {
|
||||||
$message = __( 'Media file restored from the trash.' );
|
$message = __( 'Media file restored from the Trash.' );
|
||||||
} else {
|
} else {
|
||||||
/* translators: %s: Number of media files. */
|
/* translators: %s: Number of media files. */
|
||||||
$message = _n( '%s media file restored from the trash.', '%s media files restored from the trash.', $untrashed );
|
$message = _n( '%s media file restored from the Trash.', '%s media files restored from the Trash.', $untrashed );
|
||||||
}
|
}
|
||||||
$message = sprintf( $message, number_format_i18n( $untrashed ) );
|
$message = sprintf( $message, number_format_i18n( $untrashed ) );
|
||||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
||||||
|
@ -353,8 +353,8 @@ if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
|
||||||
$messages[1] = __( 'Media file updated.' );
|
$messages[1] = __( 'Media file updated.' );
|
||||||
$messages[2] = __( 'Media file permanently deleted.' );
|
$messages[2] = __( 'Media file permanently deleted.' );
|
||||||
$messages[3] = __( 'Error saving media file.' );
|
$messages[3] = __( 'Error saving media file.' );
|
||||||
$messages[4] = __( 'Media file moved to the trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
|
$messages[4] = __( 'Media file moved to the Trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
|
||||||
$messages[5] = __( 'Media file restored from the trash.' );
|
$messages[5] = __( 'Media file restored from the Trash.' );
|
||||||
|
|
||||||
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
||||||
$message = $messages[ $_GET['message'] ];
|
$message = $messages[ $_GET['message'] ];
|
||||||
|
|
|
@ -2541,7 +2541,7 @@ final class WP_Customize_Manager {
|
||||||
$this->dismiss_user_auto_draft_changesets();
|
$this->dismiss_user_auto_draft_changesets();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that if the changeset status was publish, then it will get set to trash if revisions are not supported.
|
// Note that if the changeset status was publish, then it will get set to Trash if revisions are not supported.
|
||||||
$response['changeset_status'] = $changeset_post->post_status;
|
$response['changeset_status'] = $changeset_post->post_status;
|
||||||
if ( $is_publish && 'trash' === $response['changeset_status'] ) {
|
if ( $is_publish && 'trash' === $response['changeset_status'] ) {
|
||||||
$response['changeset_status'] = 'publish';
|
$response['changeset_status'] = 'publish';
|
||||||
|
|
|
@ -250,7 +250,7 @@ final class WP_Post_Type {
|
||||||
/**
|
/**
|
||||||
* Whether to delete posts of this type when deleting a user.
|
* Whether to delete posts of this type when deleting a user.
|
||||||
*
|
*
|
||||||
* If true, posts of this type belonging to the user will be moved to trash when then user is deleted.
|
* If true, posts of this type belonging to the user will be moved to Trash when then user is deleted.
|
||||||
* If false, posts of this type belonging to the user will *not* be trashed or deleted.
|
* If false, posts of this type belonging to the user will *not* be trashed or deleted.
|
||||||
* If not set (the default), posts are trashed if post_type_supports( 'author' ).
|
* If not set (the default), posts are trashed if post_type_supports( 'author' ).
|
||||||
* Otherwise posts are not trashed or deleted. Default null.
|
* Otherwise posts are not trashed or deleted. Default null.
|
||||||
|
|
|
@ -3644,7 +3644,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
/**
|
/**
|
||||||
* Delete a comment.
|
* Delete a comment.
|
||||||
*
|
*
|
||||||
* By default, the comment will be moved to the trash instead of deleted.
|
* By default, the comment will be moved to the Trash instead of deleted.
|
||||||
* See wp_delete_comment() for more information on this behavior.
|
* See wp_delete_comment() for more information on this behavior.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
|
|
|
@ -1364,8 +1364,8 @@ function wp_count_comments( $post_id = 0 ) {
|
||||||
/**
|
/**
|
||||||
* Trashes or deletes a comment.
|
* Trashes or deletes a comment.
|
||||||
*
|
*
|
||||||
* The comment is moved to trash instead of permanently deleted unless trash is
|
* The comment is moved to Trash instead of permanently deleted unless Trash is
|
||||||
* disabled, item is already in the trash, or $force_delete is true.
|
* disabled, item is already in the Trash, or $force_delete is true.
|
||||||
*
|
*
|
||||||
* The post comment count will be updated if the comment was approved and has a
|
* The post comment count will be updated if the comment was approved and has a
|
||||||
* post ID available.
|
* post ID available.
|
||||||
|
@ -1375,7 +1375,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||||
* @global wpdb $wpdb WordPress database abstraction object.
|
* @global wpdb $wpdb WordPress database abstraction object.
|
||||||
*
|
*
|
||||||
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
|
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
|
||||||
* @param bool $force_delete Whether to bypass trash and force deletion. Default is false.
|
* @param bool $force_delete Whether to bypass Trash and force deletion. Default is false.
|
||||||
* @return bool True on success, false on failure.
|
* @return bool True on success, false on failure.
|
||||||
*/
|
*/
|
||||||
function wp_delete_comment( $comment_id, $force_delete = false ) {
|
function wp_delete_comment( $comment_id, $force_delete = false ) {
|
||||||
|
@ -1445,7 +1445,7 @@ function wp_delete_comment( $comment_id, $force_delete = false ) {
|
||||||
/**
|
/**
|
||||||
* Moves a comment to the Trash
|
* Moves a comment to the Trash
|
||||||
*
|
*
|
||||||
* If trash is disabled, comment is permanently deleted.
|
* If Trash is disabled, comment is permanently deleted.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -9113,7 +9113,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the trash state on an attachment, or destroys the model itself.
|
* Sets the Trash state on an attachment, or destroys the model itself.
|
||||||
*
|
*
|
||||||
* If the mediaTrash setting is set to true, trashes the attachment.
|
* If the mediaTrash setting is set to true, trashes the attachment.
|
||||||
* Otherwise, the model itself is destroyed.
|
* Otherwise, the model itself is destroyed.
|
||||||
|
@ -9131,7 +9131,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
|
||||||
|
|
||||||
this.getFocusableElements();
|
this.getFocusableElements();
|
||||||
|
|
||||||
// When in the Media Library and the Media trash is enabled.
|
// When in the Media Library and the Media Trash is enabled.
|
||||||
if ( wp.media.view.settings.mediaTrash &&
|
if ( wp.media.view.settings.mediaTrash &&
|
||||||
'edit-metadata' === this.controller.content.mode() ) {
|
'edit-metadata' === this.controller.content.mode() ) {
|
||||||
|
|
||||||
|
|
|
@ -1448,7 +1448,7 @@ function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $clas
|
||||||
*
|
*
|
||||||
* @param int|WP_Post $id Optional. Post ID or post object. Default is the global `$post`.
|
* @param int|WP_Post $id Optional. Post ID or post object. Default is the global `$post`.
|
||||||
* @param string $deprecated Not used.
|
* @param string $deprecated Not used.
|
||||||
* @param bool $force_delete Optional. Whether to bypass trash and force deletion. Default false.
|
* @param bool $force_delete Optional. Whether to bypass Trash and force deletion. Default false.
|
||||||
* @return string|void The delete post link URL for the given post.
|
* @return string|void The delete post link URL for the given post.
|
||||||
*/
|
*/
|
||||||
function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
|
function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
|
||||||
|
@ -1481,7 +1481,7 @@ function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false
|
||||||
*
|
*
|
||||||
* @param string $link The delete link.
|
* @param string $link The delete link.
|
||||||
* @param int $post_id Post ID.
|
* @param int $post_id Post ID.
|
||||||
* @param bool $force_delete Whether to bypass the trash and force deletion. Default false.
|
* @param bool $force_delete Whether to bypass the Trash and force deletion. Default false.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-post_{$post->ID}" ), $post->ID, $force_delete );
|
return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-post_{$post->ID}" ), $post->ID, $force_delete );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1399,7 +1399,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||||
* ?{query_var_string}={post_slug} will be valid.
|
* ?{query_var_string}={post_slug} will be valid.
|
||||||
* @type bool $can_export Whether to allow this post type to be exported. Default true.
|
* @type bool $can_export Whether to allow this post type to be exported. Default true.
|
||||||
* @type bool $delete_with_user Whether to delete posts of this type when deleting a user. If true,
|
* @type bool $delete_with_user Whether to delete posts of this type when deleting a user. If true,
|
||||||
* posts of this type belonging to the user will be moved to trash
|
* posts of this type belonging to the user will be moved to Trash
|
||||||
* when then user is deleted. If false, posts of this type belonging
|
* when then user is deleted. If false, posts of this type belonging
|
||||||
* to the user will *not* be trashed or deleted. If not set (the default),
|
* to the user will *not* be trashed or deleted. If not set (the default),
|
||||||
* posts are trashed if post_type_supports('author'). Otherwise posts
|
* posts are trashed if post_type_supports('author'). Otherwise posts
|
||||||
|
@ -1639,7 +1639,7 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
||||||
* - `view_items` - Label for viewing post type archives. Default is 'View Posts' / 'View Pages'.
|
* - `view_items` - Label for viewing post type archives. Default is 'View Posts' / 'View Pages'.
|
||||||
* - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
|
* - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
|
||||||
* - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
|
* - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
|
||||||
* - `not_found_in_trash` - Label used when no items are in the trash. Default is 'No posts found in Trash' /
|
* - `not_found_in_trash` - Label used when no items are in the Trash. Default is 'No posts found in Trash' /
|
||||||
* 'No pages found in Trash'.
|
* 'No pages found in Trash'.
|
||||||
* - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
|
* - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
|
||||||
* post types. Default is 'Parent Page:'.
|
* post types. Default is 'Parent Page:'.
|
||||||
|
@ -2926,8 +2926,8 @@ function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) {
|
||||||
* it is deleted also. This includes comments, post meta fields, and terms
|
* it is deleted also. This includes comments, post meta fields, and terms
|
||||||
* associated with the post.
|
* associated with the post.
|
||||||
*
|
*
|
||||||
* The post or page is moved to trash instead of permanently deleted unless
|
* The post or page is moved to Trash instead of permanently deleted unless
|
||||||
* trash is disabled, item is already in the trash, or $force_delete is true.
|
* Trash is disabled, item is already in the Trash, or $force_delete is true.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
|
@ -2936,7 +2936,7 @@ function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) {
|
||||||
* @see wp_trash_post()
|
* @see wp_trash_post()
|
||||||
*
|
*
|
||||||
* @param int $postid Optional. Post ID. Default 0.
|
* @param int $postid Optional. Post ID. Default 0.
|
||||||
* @param bool $force_delete Optional. Whether to bypass trash and force deletion.
|
* @param bool $force_delete Optional. Whether to bypass Trash and force deletion.
|
||||||
* Default false.
|
* Default false.
|
||||||
* @return WP_Post|false|null Post data on success, false or null on failure.
|
* @return WP_Post|false|null Post data on success, false or null on failure.
|
||||||
*/
|
*/
|
||||||
|
@ -2966,7 +2966,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
|
||||||
*
|
*
|
||||||
* @param bool|null $delete Whether to go forward with deletion.
|
* @param bool|null $delete Whether to go forward with deletion.
|
||||||
* @param WP_Post $post Post object.
|
* @param WP_Post $post Post object.
|
||||||
* @param bool $force_delete Whether to bypass the trash.
|
* @param bool $force_delete Whether to bypass the Trash.
|
||||||
*/
|
*/
|
||||||
$check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
|
$check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
|
||||||
if ( null !== $check ) {
|
if ( null !== $check ) {
|
||||||
|
@ -3103,7 +3103,7 @@ function _reset_front_page_settings_for_post( $post_id ) {
|
||||||
/**
|
/**
|
||||||
* Move a post or page to the Trash
|
* Move a post or page to the Trash
|
||||||
*
|
*
|
||||||
* If trash is disabled, the post or page is permanently deleted.
|
* If Trash is disabled, the post or page is permanently deleted.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3142,7 +3142,7 @@ function wp_trash_post( $post_id = 0 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires before a post is sent to the trash.
|
* Fires before a post is sent to the Trash.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*
|
*
|
||||||
|
@ -3167,7 +3167,7 @@ function wp_trash_post( $post_id = 0 ) {
|
||||||
wp_trash_post_comments( $post_id );
|
wp_trash_post_comments( $post_id );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after a post is sent to the trash.
|
* Fires after a post is sent to the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3211,7 +3211,7 @@ function wp_untrash_post( $post_id = 0 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires before a post is restored from the trash.
|
* Fires before a post is restored from the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3238,7 +3238,7 @@ function wp_untrash_post( $post_id = 0 ) {
|
||||||
wp_untrash_post_comments( $post_id );
|
wp_untrash_post_comments( $post_id );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after a post is restored from the trash.
|
* Fires after a post is restored from the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3250,7 +3250,7 @@ function wp_untrash_post( $post_id = 0 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves comments for a post to the trash.
|
* Moves comments for a post to the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3270,7 +3270,7 @@ function wp_trash_post_comments( $post = null ) {
|
||||||
$post_id = $post->ID;
|
$post_id = $post->ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires before comments are sent to the trash.
|
* Fires before comments are sent to the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3296,7 +3296,7 @@ function wp_trash_post_comments( $post = null ) {
|
||||||
clean_comment_cache( array_keys( $statuses ) );
|
clean_comment_cache( array_keys( $statuses ) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after comments are sent to the trash.
|
* Fires after comments are sent to the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3309,7 +3309,7 @@ function wp_trash_post_comments( $post = null ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore comments for a post from the trash.
|
* Restore comments for a post from the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3335,7 +3335,7 @@ function wp_untrash_post_comments( $post = null ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires before comments are restored for a post from the trash.
|
* Fires before comments are restored for a post from the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -3363,7 +3363,7 @@ function wp_untrash_post_comments( $post = null ) {
|
||||||
delete_post_meta( $post_id, '_wp_trash_meta_comments_status' );
|
delete_post_meta( $post_id, '_wp_trash_meta_comments_status' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after comments are restored for a post from the trash.
|
* Fires after comments are restored for a post from the Trash.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -5574,15 +5574,15 @@ function wp_insert_attachment( $args, $file = false, $parent = 0, $wp_error = fa
|
||||||
* Deletion removes all post meta fields, taxonomy, comments, etc. associated
|
* Deletion removes all post meta fields, taxonomy, comments, etc. associated
|
||||||
* with the attachment (except the main post).
|
* with the attachment (except the main post).
|
||||||
*
|
*
|
||||||
* The attachment is moved to the trash instead of permanently deleted unless trash
|
* The attachment is moved to the Trash instead of permanently deleted unless Trash
|
||||||
* for media is disabled, item is already in the trash, or $force_delete is true.
|
* for media is disabled, item is already in the Trash, or $force_delete is true.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*
|
*
|
||||||
* @global wpdb $wpdb WordPress database abstraction object.
|
* @global wpdb $wpdb WordPress database abstraction object.
|
||||||
*
|
*
|
||||||
* @param int $post_id Attachment ID.
|
* @param int $post_id Attachment ID.
|
||||||
* @param bool $force_delete Optional. Whether to bypass trash and force deletion.
|
* @param bool $force_delete Optional. Whether to bypass Trash and force deletion.
|
||||||
* Default false.
|
* Default false.
|
||||||
* @return WP_Post|false|null Post data on success, false or null on failure.
|
* @return WP_Post|false|null Post data on success, false or null on failure.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -99,7 +99,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||||
'force' => array(
|
'force' => array(
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'description' => __( 'Whether to bypass trash and force deletion.' ),
|
'description' => __( 'Whether to bypass Trash and force deletion.' ),
|
||||||
),
|
),
|
||||||
'password' => array(
|
'password' => array(
|
||||||
'description' => __( 'The password for the parent post of the comment (if the post is password protected).' ),
|
'description' => __( 'The password for the parent post of the comment (if the post is password protected).' ),
|
||||||
|
@ -955,7 +955,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||||
/**
|
/**
|
||||||
* Filters whether a comment can be trashed.
|
* Filters whether a comment can be trashed.
|
||||||
*
|
*
|
||||||
* Return false to disable trash support for the post.
|
* Return false to disable Trash support for the post.
|
||||||
*
|
*
|
||||||
* @since 4.7.0
|
* @since 4.7.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -116,7 +116,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||||
'force' => array(
|
'force' => array(
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'description' => __( 'Whether to bypass trash and force deletion.' ),
|
'description' => __( 'Whether to bypass Trash and force deletion.' ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -886,7 +886,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
|
* The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
|
||||||
*
|
*
|
||||||
* Pass false to disable trash support for the post.
|
* Pass false to disable Trash support for the post.
|
||||||
*
|
*
|
||||||
* @since 4.7.0
|
* @since 4.7.0
|
||||||
*
|
*
|
||||||
|
@ -937,7 +937,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
// (Note that internally this falls through to `wp_delete_post()`
|
// (Note that internally this falls through to `wp_delete_post()`
|
||||||
// if the trash is disabled.)
|
// if the Trash is disabled.)
|
||||||
$result = wp_trash_post( $id );
|
$result = wp_trash_post( $id );
|
||||||
$post = get_post( $id );
|
$post = get_post( $id );
|
||||||
$response = $this->prepare_item_for_response( $post, $request );
|
$response = $this->prepare_item_for_response( $post, $request );
|
||||||
|
|
|
@ -475,8 +475,8 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @since 4.7.0
|
* @since 4.7.0
|
||||||
*
|
*
|
||||||
* @param WP_Post|false|null $result The revision object (if it was deleted or moved to the trash successfully)
|
* @param WP_Post|false|null $result The revision object (if it was deleted or moved to the Trash successfully)
|
||||||
* or false or null (failure). If the revision was moved to the trash, $result represents
|
* or false or null (failure). If the revision was moved to the Trash, $result represents
|
||||||
* its new state; if it was deleted, $result represents its state before deletion.
|
* its new state; if it was deleted, $result represents its state before deletion.
|
||||||
* @param WP_REST_Request $request The request sent to the API.
|
* @param WP_REST_Request $request The request sent to the API.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -926,7 +926,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
'upload_stopped' => __( 'Upload stopped.' ),
|
'upload_stopped' => __( 'Upload stopped.' ),
|
||||||
'dismiss' => __( 'Dismiss' ),
|
'dismiss' => __( 'Dismiss' ),
|
||||||
'crunching' => __( 'Crunching…' ),
|
'crunching' => __( 'Crunching…' ),
|
||||||
'deleted' => __( 'moved to the trash.' ),
|
'deleted' => __( 'moved to the Trash.' ),
|
||||||
/* translators: %s: File name. */
|
/* translators: %s: File name. */
|
||||||
'error_uploading' => __( '“%s” has failed to upload.' ),
|
'error_uploading' => __( '“%s” has failed to upload.' ),
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-47232';
|
$wp_version = '5.4-alpha-47233';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue