From 023d4b2796a1353779e595a59e4043f353e070dd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 10 Feb 2020 04:10:09 +0000 Subject: [PATCH] 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 --- src/js/_enqueues/admin/edit-comments.js | 2 +- src/js/_enqueues/wp/customize/widgets.js | 2 +- src/js/media/views/attachment/details.js | 4 +- src/wp-admin/admin.php | 2 +- src/wp-admin/edit.php | 6 +-- src/wp-admin/includes/ajax-actions.php | 6 +-- .../includes/class-wp-posts-list-table.php | 2 +- src/wp-admin/includes/template.php | 4 +- src/wp-admin/options-discussion.php | 2 +- src/wp-admin/options-privacy.php | 2 +- src/wp-admin/upload.php | 12 +++--- .../class-wp-customize-manager.php | 2 +- src/wp-includes/class-wp-post-type.php | 2 +- src/wp-includes/class-wp-xmlrpc-server.php | 2 +- src/wp-includes/comment.php | 8 ++-- src/wp-includes/link-template.php | 4 +- src/wp-includes/post.php | 40 +++++++++---------- .../class-wp-rest-comments-controller.php | 4 +- .../class-wp-rest-posts-controller.php | 6 +-- .../class-wp-rest-revisions-controller.php | 4 +- src/wp-includes/script-loader.php | 2 +- tests/phpunit/data/formatting/whole-posts.php | 10 ++--- tests/qunit/fixtures/wp-api-generated.js | 10 ++--- tests/qunit/index.html | 2 +- 24 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js index 1a64268b6a..88004e913d 100644 --- a/src/js/_enqueues/admin/edit-comments.js +++ b/src/js/_enqueues/admin/edit-comments.js @@ -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; } diff --git a/src/js/_enqueues/wp/customize/widgets.js b/src/js/_enqueues/wp/customize/widgets.js index 8738c13b73..4c91944b5d 100644 --- a/src/js/_enqueues/wp/customize/widgets.js +++ b/src/js/_enqueues/wp/customize/widgets.js @@ -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(); diff --git a/src/js/media/views/attachment/details.js b/src/js/media/views/attachment/details.js index b406818683..b9cf51445e 100644 --- a/src/js/media/views/attachment/details.js +++ b/src/js/media/views/attachment/details.js @@ -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() ) { diff --git a/src/wp-admin/admin.php b/src/wp-admin/admin.php index 287027f4f6..8f0e761255 100644 --- a/src/wp-admin/admin.php +++ b/src/wp-admin/admin.php @@ -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' ); } diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php index b6ea9e8d94..1fb89e1e95 100644 --- a/src/wp-admin/edit.php +++ b/src/wp-admin/edit.php @@ -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 ) { '', ) @@ -266,7 +266,7 @@ if ( 'post' === $post_type ) { 'id' => 'bulk-actions', 'title' => __( 'Bulk Actions' ), 'content' => - '

' . __( '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.' ) . '

' . + '

' . __( '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.' ) . '

' . '

' . __( '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.' ) . '

', ) ); diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index aa68c95f59..3eb27a324c 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -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 * diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index d36cce08fe..5587e8ecf4 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -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; diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 5cf9246a67..a6f74722cf 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -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() {
' ); + printf( __( 'Comment by %s moved to the Trash.' ), '' ); ?>
diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php index 8a76460a95..e80105eadb 100644 --- a/src/wp-admin/options-discussion.php +++ b/src/wp-admin/options-discussion.php @@ -206,7 +206,7 @@ printf(
-

+

diff --git a/src/wp-admin/options-privacy.php b/src/wp-admin/options-privacy.php index 364071dbac..9c707840ea 100644 --- a/src/wp-admin/options-privacy.php +++ b/src/wp-admin/options-privacy.php @@ -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 restore the current page.' ), + __( 'The currently selected Privacy Policy page is in the Trash. Please create or select a new Privacy Policy page or restore the current page.' ), 'edit.php?post_status=trash&post_type=page' ), 'error' diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php index b8207ecb98..43d192aa12 100644 --- a/src/wp-admin/upload.php +++ b/src/wp-admin/upload.php @@ -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 .= ' ' . __( 'Undo' ) . ''; @@ -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.' ) . ' ' . __( 'Undo' ) . ''; -$messages[5] = __( 'Media file restored from the trash.' ); +$messages[4] = __( 'Media file moved to the Trash.' ) . ' ' . __( 'Undo' ) . ''; +$messages[5] = __( 'Media file restored from the Trash.' ); if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { $message = $messages[ $_GET['message'] ]; diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index cdc5bd6b7e..8f4c9c55d7 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -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'; diff --git a/src/wp-includes/class-wp-post-type.php b/src/wp-includes/class-wp-post-type.php index 09ada7c4a2..8ea1c2822a 100644 --- a/src/wp-includes/class-wp-post-type.php +++ b/src/wp-includes/class-wp-post-type.php @@ -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. diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 1177923133..8fce283325 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -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 diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 8e9dc80952..e191e8fe06 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -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 * diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 7e4b29dea1..4d47a8fae4 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -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 ); } diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 357a6b67c7..fedb085497 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -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. */ diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index fc9f03822b..c154c5550d 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -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 * diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 0f27070c3b..c251b57dad 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -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 ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index c676882d97..f5fd0dda84 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -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. */ diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index f56142be00..cdb479c547 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -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.' ), ); diff --git a/tests/phpunit/data/formatting/whole-posts.php b/tests/phpunit/data/formatting/whole-posts.php index ae646e294b..3a4f13c648 100644 --- a/tests/phpunit/data/formatting/whole-posts.php +++ b/tests/phpunit/data/formatting/whole-posts.php @@ -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!

A very significant, if unsurprising update. “blown away”

-

Blown away by the trash can.

+

Blown away by the Trash can.

That is one powerful fan.

@@ -470,11 +470,11 @@ Yup, spinning rust taps out at about 120 MB/sec.

We\'ll even sell you this case that matches to put your drives into!

For a single drive. -Who is going to be the first to mod a real trash can with a RAID array to Thunderbolt?

+Who is going to be the first to mod a real Trash can with a RAID array to Thunderbolt?

I can\'t wait to see the enclosures people make to go with this device.

-

Row of trash cans daisy chained together.

+

Row of Trash cans daisy chained together.

Packed and built for expansion.

@@ -507,7 +507,7 @@ This is going to get expensive fast.

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.

-

SO RECYCLABLE that you can throw it into the trash... or use it as a trash can.

+

SO RECYCLABLE that you can throw it into the Trash... or use it as a Trash can.

30k

diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 9c130539b7..3465aeae8e 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -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": { diff --git a/tests/qunit/index.html b/tests/qunit/index.html index 46b8403861..3b8ca8fa83 100644 --- a/tests/qunit/index.html +++ b/tests/qunit/index.html @@ -36,7 +36,7 @@