WordPress.org

Make WordPress Core

Ticket #13444: 13444_1.diff

File 13444_1.diff, 6.0 KB (added by michaelh, 4 years ago)

correct strings for post_type in wp-admin/includes/template.php

  • wp-admin/includes/template.php

     
    13491349 
    13501350                        $actions = array(); 
    13511351                        if ( current_user_can($post_type_object->cap->edit_post, $post->ID) && 'trash' != $post->post_status ) { 
    1352                                 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>'; 
    1353                                 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick&nbsp;Edit') . '</a>'; 
     1352                                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(sprintf(__('Edit this %s'),$post->post_type)) . '">' . __('Edit') . '</a>'; 
     1353                                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(sprintf(__('Edit this %s inline'),$post->post_type)) . '">' . __('Quick&nbsp;Edit') . '</a>'; 
    13541354                        } 
    13551355                        if ( current_user_can($post_type_object->cap->delete_post, $post->ID) ) { 
    13561356                                if ( 'trash' == $post->post_status ) 
    1357                                         $actions['untrash'] = "<a title='" . esc_attr(__('Restore this post from the Trash')) . "' href='" . wp_nonce_url( admin_url( sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __('Restore') . "</a>"; 
     1357                                        $actions['untrash'] = "<a title='" . esc_attr(sprintf(__('Restore this %s from the Trash'),$post->post_type)) . "' href='" . wp_nonce_url( admin_url( sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __('Restore') . "</a>"; 
    13581358                                elseif ( EMPTY_TRASH_DAYS ) 
    1359                                         $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>"; 
     1359                                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(sprintf(__('Move this %s to the Trash'),$post->post_type)) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>"; 
    13601360                                if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) 
    1361                                         $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>"; 
     1361                                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(sprintf(__('Delete this %s permanently'),$post->post_type)) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>"; 
    13621362                        } 
    13631363                        if ( in_array($post->post_status, array('pending', 'draft')) ) { 
    13641364                                if ( current_user_can($post_type_object->cap->edit_post, $post->ID) ) 
     
    15701570                <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name) : ''; ?></strong> 
    15711571                <?php 
    15721572                $actions = array(); 
    1573                 if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { 
    1574                         $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>'; 
    1575                         $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>'; 
     1573                if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && 'trash' != $post->post_status ) { 
     1574                                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(sprintf(__('Edit this %s'),$post->post_type)) . '">' . __('Edit') . '</a>'; 
     1575                                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(sprintf(__('Edit this %s inline'),$post->post_type)) . '">' . __('Quick&nbsp;Edit') . '</a>'; 
    15761576                } 
    15771577                if ( current_user_can($post_type_object->cap->delete_post, $page->ID) ) { 
    15781578                        if ( $post->post_status == 'trash' ) 
    1579                                 $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=untrash&amp;post=$page->ID", 'untrash-' . $post->post_type . '_' . $page->ID) . "'>" . __('Restore') . "</a>"; 
     1579                                $actions['untrash'] = "<a title='" . esc_attr(sprintf(__('Restore this %s from the Trash'),$post->post_type)) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=untrash&amp;post=$page->ID", 'untrash-' . $post->post_type . '_' . $page->ID) . "'>" . __('Restore') . "</a>"; 
    15801580                        elseif ( EMPTY_TRASH_DAYS ) 
    1581                                 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>"; 
     1581                                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(sprintf(__('Move this %s to the Trash'),$post->post_type)) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>"; 
    15821582                        if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS ) 
    1583                                 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=delete&amp;post=$page->ID", 'delete-' . $post->post_type . '_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>"; 
     1583                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(sprintf(__('Delete this %s permanently'),$post->post_type)) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&amp;action=delete&amp;post=$page->ID", 'delete-' . $post->post_type . '_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>"; 
    15841584                } 
    15851585                if ( in_array($post->post_status, array('pending', 'draft')) ) { 
    15861586                        if ( current_user_can($post_type_object->cap->edit_post, $page->ID) )