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. git-svn-id: https://develop.svn.wordpress.org/trunk@47233 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5302cd6514
commit
023d4b2796
@ -538,7 +538,7 @@ window.setCommentsList = function() {
|
||||
// The comment is currently pending.
|
||||
} else if ( unapproved ) {
|
||||
pendingDiff = -1;
|
||||
// The comment was in the trash.
|
||||
// The comment was in the Trash.
|
||||
} else if ( trashed ) {
|
||||
trashDiff = -1;
|
||||
}
|
||||
|
@ -1864,7 +1864,7 @@
|
||||
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.
|
||||
if ( api.Widgets.savedWidgetIds[removedWidgetId] ) {
|
||||
inactiveWidgets = api.value( 'sidebars_widgets[wp_inactive_widgets]' )().slice();
|
||||
|
@ -120,7 +120,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.
|
||||
* Otherwise, the model itself is destroyed.
|
||||
@ -138,7 +138,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
|
||||
|
||||
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 &&
|
||||
'edit-metadata' === this.controller.content.mode() ) {
|
||||
|
||||
|
@ -93,7 +93,7 @@ require_once ABSPATH . 'wp-admin/includes/admin.php';
|
||||
|
||||
auth_redirect();
|
||||
|
||||
// Schedule trash collection.
|
||||
// Schedule Trash collection.
|
||||
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) {
|
||||
wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' );
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ if ( $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'] );
|
||||
// Validate the post status exists.
|
||||
if ( get_post_status_object( $post_status ) ) {
|
||||
@ -256,7 +256,7 @@ if ( 'post' === $post_type ) {
|
||||
'<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>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>' .
|
||||
'</ul>',
|
||||
)
|
||||
@ -266,7 +266,7 @@ if ( 'post' === $post_type ) {
|
||||
'id' => 'bulk-actions',
|
||||
'title' => __( 'Bulk Actions' ),
|
||||
'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>',
|
||||
)
|
||||
);
|
||||
|
@ -716,7 +716,7 @@ function wp_ajax_delete_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'] ) {
|
||||
$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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
|
@ -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,
|
||||
* 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 ) {
|
||||
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
|
||||
*/
|
||||
@ -535,7 +535,7 @@ function wp_comment_trashnotice() {
|
||||
<div class="trash-undo-inside">
|
||||
<?php
|
||||
/* 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>
|
||||
</div>
|
||||
|
@ -206,7 +206,7 @@ printf(
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Comment Blocklist' ); ?></th>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -101,7 +101,7 @@ if ( ! empty( $privacy_policy_page_id ) ) {
|
||||
'page_for_privacy_policy',
|
||||
sprintf(
|
||||
/* 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'
|
||||
),
|
||||
'error'
|
||||
|
@ -328,10 +328,10 @@ if ( ! empty( $_GET['deleted'] ) && absint( $_GET['deleted'] ) ) {
|
||||
if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
|
||||
$trashed = absint( $_GET['trashed'] );
|
||||
if ( 1 == $trashed ) {
|
||||
$message = __( 'Media file moved to the trash.' );
|
||||
$message = __( 'Media file moved to the Trash.' );
|
||||
} else {
|
||||
/* 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 .= ' <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'] ) ) {
|
||||
$untrashed = absint( $_GET['untrashed'] );
|
||||
if ( 1 == $untrashed ) {
|
||||
$message = __( 'Media file restored from the trash.' );
|
||||
$message = __( 'Media file restored from the Trash.' );
|
||||
} else {
|
||||
/* 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 ) );
|
||||
$_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[2] = __( 'Media file permanently deleted.' );
|
||||
$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[5] = __( 'Media file restored from the trash.' );
|
||||
$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.' );
|
||||
|
||||
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
||||
$message = $messages[ $_GET['message'] ];
|
||||
|
@ -2541,7 +2541,7 @@ final class WP_Customize_Manager {
|
||||
$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;
|
||||
if ( $is_publish && 'trash' === $response['changeset_status'] ) {
|
||||
$response['changeset_status'] = 'publish';
|
||||
|
@ -250,7 +250,7 @@ final class WP_Post_Type {
|
||||
/**
|
||||
* 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 not set (the default), posts are trashed if post_type_supports( 'author' ).
|
||||
* Otherwise posts are not trashed or deleted. Default null.
|
||||
|
@ -3644,7 +3644,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @since 2.7.0
|
||||
|
@ -1364,8 +1364,8 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
/**
|
||||
* Trashes or deletes a comment.
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* The post comment count will be updated if the comment was approved and has a
|
||||
* post ID available.
|
||||
@ -1375,7 +1375,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
* @global wpdb $wpdb WordPress database abstraction 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.
|
||||
*/
|
||||
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
|
||||
*
|
||||
* If trash is disabled, comment is permanently deleted.
|
||||
* If Trash is disabled, comment is permanently deleted.
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
|
@ -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 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.
|
||||
*/
|
||||
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 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 );
|
||||
}
|
||||
|
@ -1399,7 +1399,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||
* ?{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 $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
|
||||
* to the user will *not* be trashed or deleted. If not set (the default),
|
||||
* 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'.
|
||||
* - `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_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'.
|
||||
* - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
|
||||
* 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
|
||||
* associated with the post.
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
@ -2936,7 +2936,7 @@ function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) {
|
||||
* @see wp_trash_post()
|
||||
*
|
||||
* @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.
|
||||
* @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 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 );
|
||||
if ( null !== $check ) {
|
||||
@ -3103,7 +3103,7 @@ function _reset_front_page_settings_for_post( $post_id ) {
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
@ -3167,7 +3167,7 @@ function wp_trash_post( $post_id = 0 ) {
|
||||
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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
@ -3238,7 +3238,7 @@ function wp_untrash_post( $post_id = 0 ) {
|
||||
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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
@ -3270,7 +3270,7 @@ function wp_trash_post_comments( $post = null ) {
|
||||
$post_id = $post->ID;
|
||||
|
||||
/**
|
||||
* Fires before comments are sent to the trash.
|
||||
* Fires before comments are sent to the Trash.
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
@ -3296,7 +3296,7 @@ function wp_trash_post_comments( $post = null ) {
|
||||
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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
@ -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
|
||||
*
|
||||
@ -3363,7 +3363,7 @@ function wp_untrash_post_comments( $post = null ) {
|
||||
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
|
||||
*
|
||||
@ -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
|
||||
* with the attachment (except the main post).
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @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.
|
||||
* @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(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'description' => __( 'Whether to bypass trash and force deletion.' ),
|
||||
'description' => __( 'Whether to bypass Trash and force deletion.' ),
|
||||
),
|
||||
'password' => array(
|
||||
'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.
|
||||
*
|
||||
* Return false to disable trash support for the post.
|
||||
* Return false to disable Trash support for the post.
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
|
@ -116,7 +116,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
'force' => array(
|
||||
'type' => 'boolean',
|
||||
'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.
|
||||
*
|
||||
* Pass false to disable trash support for the post.
|
||||
* Pass false to disable Trash support for the post.
|
||||
*
|
||||
* @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()`
|
||||
// if the trash is disabled.)
|
||||
// if the Trash is disabled.)
|
||||
$result = wp_trash_post( $id );
|
||||
$post = get_post( $id );
|
||||
$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
|
||||
*
|
||||
* @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
|
||||
* @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
|
||||
* its new state; if it was deleted, $result represents its state before deletion.
|
||||
* @param WP_REST_Request $request The request sent to the API.
|
||||
*/
|
||||
|
@ -926,7 +926,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'upload_stopped' => __( 'Upload stopped.' ),
|
||||
'dismiss' => __( 'Dismiss' ),
|
||||
'crunching' => __( 'Crunching…' ),
|
||||
'deleted' => __( 'moved to the trash.' ),
|
||||
'deleted' => __( 'moved to the Trash.' ),
|
||||
/* translators: %s: File name. */
|
||||
'error_uploading' => __( '“%s” has failed to upload.' ),
|
||||
);
|
||||
|
@ -52,7 +52,7 @@ array('[Lorem ipsum dolor sit amet, quo id ignota repudiare, ius iracundia ratio
|
||||
Cu bonorum graecis ius. Duo id ancillae probatus. Tota latine pri an. Cum ei iudico semper. Eum in blandit voluptaria.
|
||||
|
||||
Illud debet vitae ex vis numquam.'),
|
||||
|
||||
|
||||
/* DIVIDER */
|
||||
|
||||
// Based on https://core.trac.wordpress.org/attachment/ticket/29557/ChatTranscript.txt
|
||||
@ -445,7 +445,7 @@ BLAH!</p>
|
||||
<p class="triangle-right left">A very significant, if unsurprising update.
|
||||
“blown away”</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right lefttwo">Blown away by the trash can.</p>
|
||||
<p class="triangle-right lefttwo">Blown away by the Trash can.</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right left">That is one powerful fan.</p>
|
||||
<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
|
||||
@ -470,11 +470,11 @@ Yup, spinning rust taps out at about 120 MB/sec.</p>
|
||||
<p class="triangle-right right">We\'ll even sell you this case that matches to put your drives into!</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right left">For a single drive.
|
||||
Who is going to be the first to mod a real trash can with a RAID array to Thunderbolt?</p>
|
||||
Who is going to be the first to mod a real Trash can with a RAID array to Thunderbolt?</p>
|
||||
<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right right">I can\'t wait to see the enclosures people make to go with this device.</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right lefttwo">Row of trash cans daisy chained together.</p>
|
||||
<p class="triangle-right lefttwo">Row of Trash cans daisy chained together.</p>
|
||||
<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right right">Packed and built for expansion.</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
|
||||
@ -507,7 +507,7 @@ This is going to get expensive fast.</p>
|
||||
<p class="triangle-right left">Not terrible. However, now I need to price out the TOP OF THE LINE model and find out if it can cost more than my house.
|
||||
Should be able to do it.</p>
|
||||
<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right right">SO RECYCLABLE that you can throw it into the trash... or use it as a trash can.</p>
|
||||
<p class="triangle-right right">SO RECYCLABLE that you can throw it into the Trash... or use it as a Trash can.</p>
|
||||
<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
|
||||
<p class="triangle-right lefttwo">30k</p>
|
||||
<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
|
||||
|
@ -709,7 +709,7 @@ mockedApiResponse.Schema = {
|
||||
"force": {
|
||||
"required": false,
|
||||
"default": false,
|
||||
"description": "Whether to bypass trash and force deletion.",
|
||||
"description": "Whether to bypass Trash and force deletion.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@ -1536,7 +1536,7 @@ mockedApiResponse.Schema = {
|
||||
"force": {
|
||||
"required": false,
|
||||
"default": false,
|
||||
"description": "Whether to bypass trash and force deletion.",
|
||||
"description": "Whether to bypass Trash and force deletion.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@ -2306,7 +2306,7 @@ mockedApiResponse.Schema = {
|
||||
"force": {
|
||||
"required": false,
|
||||
"default": false,
|
||||
"description": "Whether to bypass trash and force deletion.",
|
||||
"description": "Whether to bypass Trash and force deletion.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@ -2658,7 +2658,7 @@ mockedApiResponse.Schema = {
|
||||
"force": {
|
||||
"required": false,
|
||||
"default": false,
|
||||
"description": "Whether to bypass trash and force deletion.",
|
||||
"description": "Whether to bypass Trash and force deletion.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
@ -4312,7 +4312,7 @@ mockedApiResponse.Schema = {
|
||||
"force": {
|
||||
"required": false,
|
||||
"default": false,
|
||||
"description": "Whether to bypass trash and force deletion.",
|
||||
"description": "Whether to bypass Trash and force deletion.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"password": {
|
||||
|
@ -36,7 +36,7 @@
|
||||
</script>
|
||||
<script src="../../build/wp-includes/js/utils.js"></script>
|
||||
<script>
|
||||
window.pluploadL10n = {"queue_limit_exceeded":"You have attempted to queue too many files.","file_exceeds_size_limit":"%s exceeds the maximum upload size for this site.","zero_byte_file":"This file is empty. Please try another.","invalid_filetype":"Sorry, this file type is not permitted for security reasons.","not_an_image":"This file is not an image. Please try another.","image_memory_exceeded":"Memory exceeded. Please try another smaller file.","image_dimensions_exceeded":"This is larger than the maximum size. Please try another.","default_error":"An error occurred in the upload. Please try again later.","missing_upload_url":"There was a configuration error. Please contact the server administrator.","upload_limit_exceeded":"You may only upload 1 file.","http_error":"HTTP error.","upload_failed":"Upload failed.","big_upload_failed":"Please try uploading this file with the %1$sbrowser uploader%2$s.","big_upload_queued":"%s exceeds the maximum upload size for the multi-file uploader when used in your browser.","io_error":"IO error.","security_error":"Security error.","file_cancelled":"File canceled.","upload_stopped":"Upload stopped.","dismiss":"Dismiss","crunching":"Crunching\u2026","deleted":"moved to the trash.","error_uploading":"\u201c%s\u201d has failed to upload."};
|
||||
window.pluploadL10n = {"queue_limit_exceeded":"You have attempted to queue too many files.","file_exceeds_size_limit":"%s exceeds the maximum upload size for this site.","zero_byte_file":"This file is empty. Please try another.","invalid_filetype":"Sorry, this file type is not permitted for security reasons.","not_an_image":"This file is not an image. Please try another.","image_memory_exceeded":"Memory exceeded. Please try another smaller file.","image_dimensions_exceeded":"This is larger than the maximum size. Please try another.","default_error":"An error occurred in the upload. Please try again later.","missing_upload_url":"There was a configuration error. Please contact the server administrator.","upload_limit_exceeded":"You may only upload 1 file.","http_error":"HTTP error.","upload_failed":"Upload failed.","big_upload_failed":"Please try uploading this file with the %1$sbrowser uploader%2$s.","big_upload_queued":"%s exceeds the maximum upload size for the multi-file uploader when used in your browser.","io_error":"IO error.","security_error":"Security error.","file_cancelled":"File canceled.","upload_stopped":"Upload stopped.","dismiss":"Dismiss","crunching":"Crunching\u2026","deleted":"moved to the Trash.","error_uploading":"\u201c%s\u201d has failed to upload."};
|
||||
window._wpPluploadSettings = {"defaults":{"runtimes":"html5,flash,silverlight,html4","file_data_name":"async-upload","url":"\/wp-admin\/async-upload.php","flash_swf_url":"http:\/\/src.wordpress-develop.dev\/wp-includes\/js\/plupload\/plupload.flash.swf","silverlight_xap_url":"http:\/\/src.wordpress-develop.dev\/wp-includes\/js\/plupload\/plupload.silverlight.xap","filters":{"max_file_size":"2097152b","mime_types":[{"extensions":"jpg,jpeg,jpe,gif,png,bmp,tiff,tif,ico,asf,asx,wmv,wmx,wm,avi,divx,flv,mov,qt,mpeg,mpg,mpe,mp4,m4v,ogv,webm,mkv,3gp,3gpp,3g2,3gp2,txt,asc,c,cc,h,srt,csv,tsv,ics,rtx,css,vtt,dfxp,mp3,m4a,m4b,ra,ram,wav,ogg,oga,mid,midi,wma,wax,mka,rtf,js,pdf,class,tar,zip,gz,gzip,rar,7z,psd,xcf,doc,pot,pps,ppt,wri,xla,xls,xlt,xlw,mdb,mpp,docx,docm,dotx,dotm,xlsx,xlsm,xlsb,xltx,xltm,xlam,pptx,pptm,ppsx,ppsm,potx,potm,ppam,sldx,sldm,onetoc,onetoc2,onetmp,onepkg,oxps,xps,odt,odp,ods,odg,odc,odb,odf,wp,wpd,key,numbers,pages"}]},"multipart_params":{"action":"upload-attachment","_wpnonce":"87fa5740b8"}},"browser":{"mobile":false,"supported":true},"limitExceeded":false};
|
||||
</script>
|
||||
<script src="../../build/wp-includes/js/plupload/wp-plupload.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user