WordPress.org

Make WordPress Core

Ticket #45317: 45317.2.diff

File 45317.2.diff, 20.6 KB (added by garrett-eclipse, 8 months ago)

Updated patch with additional Trash verbiage changes, and updates to some comments and qunit tests

  • src/wp-admin/edit.php

     
    239239                                         '<ul>' .
    240240                                                 '<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>' .
    241241                                                 '<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>' .
    242                                                  '<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.' ) . '</li>' .
     242                                                 '<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the Trash, from which you can permanently delete it.' ) . '</li>' .
    243243                                                 '<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&#8217;s status.' ) . '</li>' .
    244244                                         '</ul>',
    245245                )
     
    249249                        'id'      => 'bulk-actions',
    250250                        'title'   => __( 'Bulk Actions' ),
    251251                        'content' =>
    252                                          '<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>' .
     252                                         '<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>' .
    253253                                                         '<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>',
    254254                )
    255255        );
  • src/wp-admin/includes/template.php

     
    524524function wp_comment_trashnotice() {
    525525        ?>
    526526<div class="hidden" id="trash-undo-holder">
    527         <div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
     527        <div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the Trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
    528528</div>
    529529<div class="hidden" id="spam-undo-holder">
    530530        <div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
  • src/wp-admin/options-discussion.php

     
    195195<tr>
    196196<th scope="row"><?php _e( 'Comment Blacklist' ); ?></th>
    197197<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Blacklist' ); ?></span></legend>
    198 <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 &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
     198<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 &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
    199199<p>
    200200<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
    201201</p>
  • src/wp-admin/privacy.php

     
    106106                                'page_for_privacy_policy',
    107107                                sprintf(
    108108                                        /* translators: URL to Pages Trash */
    109                                         __( '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>.' ),
     109                                        __( '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>.' ),
    110110                                        'edit.php?post_status=trash&post_type=page'
    111111                                ),
    112112                                'error'
  • src/wp-admin/upload.php

     
    321321
    322322if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) {
    323323        if ( 1 == $trashed ) {
    324                 $message = __( 'Media file moved to the trash.' );
     324                $message = __( 'Media file moved to the Trash.' );
    325325        } else {
    326326                /* translators: %s: number of media files */
    327                 $message = _n( '%s media file moved to the trash.', '%s media files moved to the trash.', $trashed );
     327                $message = _n( '%s media file moved to the Trash.', '%s media files moved to the Trash.', $trashed );
    328328        }
    329329        $message                = sprintf( $message, number_format_i18n( $trashed ) );
    330330        $message               .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
     
    333333
    334334if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) {
    335335        if ( 1 == $untrashed ) {
    336                 $message = __( 'Media file restored from the trash.' );
     336                $message = __( 'Media file restored from the Trash.' );
    337337        } else {
    338338                /* translators: %s: number of media files */
    339                 $message = _n( '%s media file restored from the trash.', '%s media files restored from the trash.', $untrashed );
     339                $message = _n( '%s media file restored from the Trash.', '%s media files restored from the Trash.', $untrashed );
    340340        }
    341341        $message                = sprintf( $message, number_format_i18n( $untrashed ) );
    342342        $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'untrashed' ), $_SERVER['REQUEST_URI'] );
     
    345345$messages[1] = __( 'Media file updated.' );
    346346$messages[2] = __( 'Media file permanently deleted.' );
    347347$messages[3] = __( 'Error saving media file.' );
    348 $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>';
    349 $messages[5] = __( 'Media file restored from the trash.' );
     348$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>';
     349$messages[5] = __( 'Media file restored from the Trash.' );
    350350
    351351if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
    352352        $message                = $messages[ $_GET['message'] ];
  • src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

     
    9999                                                'force'    => array(
    100100                                                        'type'        => 'boolean',
    101101                                                        'default'     => false,
    102                                                         'description' => __( 'Whether to bypass trash and force deletion.' ),
     102                                                        'description' => __( 'Whether to bypass Trash and force deletion.' ),
    103103                                                ),
    104104                                                'password' => array(
    105105                                                        'description' => __( 'The password for the parent post of the comment (if the post is password protected).' ),
     
    815815                /**
    816816                 * Filters whether a comment can be trashed.
    817817                 *
    818                  * Return false to disable trash support for the post.
     818                 * Return false to disable Trash support for the post.
    819819                 *
    820820                 * @since 4.7.0
    821821                 *
  • src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

     
    117117                                                'force' => array(
    118118                                                        'type'        => 'boolean',
    119119                                                        'default'     => false,
    120                                                         'description' => __( 'Whether to bypass trash and force deletion.' ),
     120                                                        'description' => __( 'Whether to bypass Trash and force deletion.' ),
    121121                                                ),
    122122                                        ),
    123123                                ),
     
    810810                 *
    811811                 * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    812812                 *
    813                  * Pass false to disable trash support for the post.
     813                 * Pass false to disable Trash support for the post.
    814814                 *
    815815                 * @since 4.7.0
    816816                 *
     
    849849                        }
    850850
    851851                        // (Note that internally this falls through to `wp_delete_post` if
    852                         // the trash is disabled.)
     852                        // the Trash is disabled.)
    853853                        $result   = wp_trash_post( $id );
    854854                        $post     = get_post( $id );
    855855                        $response = $this->prepare_item_for_response( $post, $request );
  • src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

     
    417417                 *
    418418                 * @since 4.7.0
    419419                 *
    420                  * @param (mixed) $result The revision object (if it was deleted or moved to the trash successfully)
    421                  *                        or false (failure). If the revision was moved to the trash, $result represents
     420                 * @param (mixed) $result The revision object (if it was deleted or moved to the Trash successfully)
     421                 *                        or false (failure). If the revision was moved to the Trash, $result represents
    422422                 *                        its new state; if it was deleted, $result represents its state before deletion.
    423423                 * @param WP_REST_Request $request The request sent to the API.
    424424                 */
  • src/wp-includes/script-loader.php

     
    11341134                'upload_stopped'            => __( 'Upload stopped.' ),
    11351135                'dismiss'                   => __( 'Dismiss' ),
    11361136                'crunching'                 => __( 'Crunching&hellip;' ),
    1137                 'deleted'                   => __( 'moved to the trash.' ),
     1137                'deleted'                   => __( 'Moved to the Trash.' ),
    11381138                'error_uploading'           => __( '&#8220;%s&#8221; has failed to upload.' ),
    11391139        );
    11401140
  • tests/phpunit/data/formatting/whole-posts.php

     
    5252 Cu bonorum graecis ius. Duo id ancillae probatus. Tota latine pri an. Cum ei iudico semper. Eum in blandit voluptaria.
    5353
    5454 Illud debet vitae ex vis numquam.'),
    55  
     55
    5656/* DIVIDER */
    5757
    5858// based on https://core.trac.wordpress.org/attachment/ticket/29557/ChatTranscript.txt
     
    445445<p class="triangle-right left">A very significant, if unsurprising update.
    446446“blown away”</p>
    447447<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
    448 <p class="triangle-right lefttwo">Blown away by the trash can.</p>
     448<p class="triangle-right lefttwo">Blown away by the Trash can.</p>
    449449<img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" />
    450450<p class="triangle-right left">That is one powerful fan.</p>
    451451<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
     
    470470<p class="triangle-right right">We\'ll even sell you this case that matches to put your drives into!</p>
    471471<img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" />
    472472<p class="triangle-right left">For a single drive.
    473 Who is going to be the first to mod a real trash can with a RAID array to Thunderbolt?</p>
     473Who is going to be the first to mod a real Trash can with a RAID array to Thunderbolt?</p>
    474474<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
    475475<p class="triangle-right right">I can\'t wait to see the enclosures people make to go with this device.</p>
    476476<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
    477 <p class="triangle-right lefttwo">Row of trash cans daisy chained together.</p>
     477<p class="triangle-right lefttwo">Row of Trash cans daisy chained together.</p>
    478478<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
    479479<p class="triangle-right right">Packed and built for expansion.</p>
    480480<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
     
    507507<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.
    508508Should be able to do it.</p>
    509509<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
    510 <p class="triangle-right right">SO RECYCLABLE that you can throw it into the trash... or use it as a trash can.</p>
     510<p class="triangle-right right">SO RECYCLABLE that you can throw it into the Trash... or use it as a Trash can.</p>
    511511<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
    512512<p class="triangle-right lefttwo">30k</p>
    513513<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
  • tests/qunit/fixtures/wp-api-generated.js

     
    688688                        "force": {
    689689                            "required": false,
    690690                            "default": false,
    691                             "description": "Whether to bypass trash and force deletion.",
     691                            "description": "Whether to bypass Trash and force deletion.",
    692692                            "type": "boolean"
    693693                        }
    694694                    }
     
    14971497                        "force": {
    14981498                            "required": false,
    14991499                            "default": false,
    1500                             "description": "Whether to bypass trash and force deletion.",
     1500                            "description": "Whether to bypass Trash and force deletion.",
    15011501                            "type": "boolean"
    15021502                        }
    15031503                    }
     
    22492249                        "force": {
    22502250                            "required": false,
    22512251                            "default": false,
    2252                             "description": "Whether to bypass trash and force deletion.",
     2252                            "description": "Whether to bypass Trash and force deletion.",
    22532253                            "type": "boolean"
    22542254                        }
    22552255                    }
     
    25622562                        "force": {
    25632563                            "required": false,
    25642564                            "default": false,
    2565                             "description": "Whether to bypass trash and force deletion.",
     2565                            "description": "Whether to bypass Trash and force deletion.",
    25662566                            "type": "boolean"
    25672567                        }
    25682568                    }
     
    42104210                        "force": {
    42114211                            "required": false,
    42124212                            "default": false,
    4213                             "description": "Whether to bypass trash and force deletion.",
     4213                            "description": "Whether to bypass Trash and force deletion.",
    42144214                            "type": "boolean"
    42154215                        },
    42164216                        "password": {
  • tests/qunit/index.html

     
    3434                </script>
    3535                <script src="../../build/wp-includes/js/utils.js"></script>
    3636                <script>
    37                         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."};
     37                        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."};
    3838                        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};
    3939                </script>
    4040                <script src="../../build/wp-includes/js/plupload/wp-plupload.js"></script>