Make WordPress Core


Ignore:
Timestamp:
05/11/2010 07:52:50 PM (16 years ago)
Author:
nbachiyski
Message:

I18n for custom post type labels. Props demetris, dimadin. Fixes #12968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r14524 r14571  
    1414 * @since 2.7
    1515 *
    16  * Outputs the HTML for the hidden table rows used in Categories, Link Categories and Tags quick edit.
    17  *
    18  * @param string $type "edit-tags", "categories" or "edit-link-categories"
     16 * Outputs the HTML for the hidden table rows used in Categories, Link Caregories and Tags quick edit.
     17 *
     18 * @param string $type "edit-tags", "categoried" or "edit-link-categories"
    1919 * @param string $taxonomy The taxonomy of the row.
    2020 * @return
     
    15671567        $edit_link = get_edit_post_link( $page->ID );
    15681568        ?>
    1569         <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->edit_cap, $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) ? ' | ' . __('Parent Page: ') . esc_html($parent_name) : ''; ?></strong>
     1569        <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->edit_cap, $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 . ' ' . esc_html($parent_name) : ''; ?></strong>
    15701570        <?php
    15711571        $actions = array();
     
    33293329        switch ( $screen->id ) {
    33303330            case $post_type_object->name:
    3331                 $default_action = array('edit.php?post_type=' . $post_type_object->name => array(sprintf(__('Edit %s'), $post_type_object->label), $post_type_object->edit_type_cap));
     3331                $default_action = array('edit.php?post_type=' . $post_type_object->name => array($post_type_object->labels->edit_item, $post_type_object->edit_type_cap));
    33323332                break;
    33333333            case "edit-{$post_type_object->name}":
    3334                 $default_action = array('post-new.php?post_type=' . $post_type_object->name => array(sprintf(__('New %s'), $post_type_object->singular_label), $post_type_object->edit_type_cap));
     3334                $default_action = array('post-new.php?post_type=' . $post_type_object->name => array($post_type_object->labels->new_item, $post_type_object->edit_type_cap));
    33353335                break;
    33363336        }
     
    37473747                $post_type = $_GET['post_type'];
    37483748            $post_type_object = get_post_type_object($post_type);
    3749             $per_page_label = $post_type_object->label;
     3749            $per_page_label = $post_type_object->labels->name;
    37503750            break;
    37513751        case 'ms-sites':
Note: See TracChangeset for help on using the changeset viewer.