Make WordPress Core


Ignore:
Timestamp:
10/29/2010 01:12:14 PM (14 years ago)
Author:
nbachiyski
Message:

Introduce and use translate_nooped_plural(). Fixes #13996

  • _n_noop() and _nx_noop() now return associative arrays for greater clarity
  • translate_nooped_plural() takes one such associative array and translates it
  • it works on both the result from _n_noop() and from _nx_noop()
  • this breaks backwards compatibility, but I doubt any plugin uses it (I will do a global grep to confirm)
  • translate_nooped_plural() is applied where applicable
File:
1 edited

Legend:

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

    r16061 r16073  
    18641864        $class = ' class="current"';
    18651865
    1866     $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
     1866    $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
    18671867}
    18681868echo implode(' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
Note: See TracChangeset for help on using the changeset viewer.