Making WordPress.org


Ignore:
Timestamp:
06/14/2016 10:00:52 AM (10 years ago)
Author:
obenland
Message:

Plugin Directory: Add a plural form for when there are more than one category.

See #1573.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

    r3337 r3351  
    4444                        <li><?php printf( __( 'Last updated: %s ago', 'wporg-plugins' ), '<span itemprop="dateModified" content="' . esc_attr( get_post_modified_time( 'c' ) ) . '">' . human_time_diff( get_post_modified_time() ) . '</span>' ); ?></li>
    4545                        <li><?php printf( __( 'Active installs: %s', 'wporg-plugins' ), Template::active_installs( false ) ); ?></li>
    46                         <?php if ( $categories = get_the_term_list( $post, 'plugin_category', '<div class="tags">', '', '</div>' ) ) : ?>
    47                                 <li><?php printf( __( 'Category: %s', 'wporg-plugins' ), $categories ); ?></li>
     46                        <?php if ( $categories = get_the_term_list( $post->ID, 'plugin_category', '<div class="tags">', '', '</div>' ) ) : ?>
     47                                <li><?php printf( _n( 'Category: %s', 'Categories: %s', count( get_the_terms( $post, 'plugin_category' ) ), 'wporg-plugins' ), $categories ); ?></li>
    4848                        <?php endif; ?>
    49                         <?php if ( $built_for = get_the_term_list( $post, 'plugin_built_for', '', ', ' ) ) : ?>
     49                        <?php if ( $built_for = get_the_term_list( $post->ID, 'plugin_built_for', '', ', ' ) ) : ?>
    5050                                <li><?php printf( __( 'Designed to work with: %s', 'wporg-plugins' ), $built_for ); ?></li>
    5151                        <?php endif; ?>
    52                         <?php if ( $business_model = get_the_term_list( $post, 'plugin_business_model', '', ', ' ) ) : ?>
     52                        <?php if ( $business_model = get_the_term_list( $post->ID, 'plugin_business_model', '', ', ' ) ) : ?>
    5353                                <li><?php printf( __( 'Business Model: %s', 'wporg-plugins' ), $business_model ); ?></li>
    5454                        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.