WordPress.org

Make WordPress Core

Ticket #45317: 45317.patch

File 45317.patch, 7.3 KB (added by aandrewdixon, 7 months ago)

Patch to change instances of "trash" to "Trash" where required.

  • 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'] ];