Changeset 2040
- Timestamp:
- 11/05/2015 06:42:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/content-reference.php
r1269 r2040 135 135 <?php 136 136 $used_by = get_used_by(); 137 $used_by_to_show = 5; 137 138 while ( $used_by->have_posts() ) : $used_by->the_post(); 138 139 ?> … … 142 143 </li> 143 144 <?php endwhile; wp_reset_postdata(); ?> 144 <?php if ( $used_by->post_count > 5 ) : ?> 145 <a href="#" class="show-more"><?php printf( _n( 'Show 1 more used by', 'Show %d more used by', $used_by->post_count, 'wporg' ), $used_by->post_count ); ?></a> 145 <?php if ( $used_by->post_count > $used_by_to_show ) : ?> 146 <a href="#" class="show-more"><?php 147 /* translators: %d: remaining 'used by' count */ 148 printf( _n( 'Show %d more used by', 'Show %d more used by', $used_by->post_count - $used_by_to_show, 'wporg' ), 149 number_format_i18n( $used_by->post_count - $used_by_to_show ) 150 ); 151 ?></a> 146 152 <a href="#" class="hide-more"><?php _e( 'Hide more used by', 'wporg' ); ?></a> 147 153 <?php endif; ?> … … 154 160 <?php 155 161 $uses = get_uses(); 162 $uses_to_show = 5; 156 163 while ( $uses->have_posts() ) : $uses->the_post() 157 164 ?> … … 161 168 </li> 162 169 <?php endwhile; wp_reset_postdata(); ?> 163 <?php if ( $uses->post_count > 5 ) : ?> 164 <a href="#" class="show-more"><?php printf( _n( 'Show 1 more use', 'Show %d more uses', $uses->post_count, 'wporg' ), $uses->post_count ); ?></a> 170 <?php if ( $uses->post_count > $uses_to_show ) : ?> 171 <a href="#" class="show-more"><?php 172 /* translators: %d: remaining 'uses' count */ 173 printf( _n( 'Show %d more use', 'Show %d more uses', $uses->post_count - $uses_to_show, 'wporg' ), 174 number_format_i18n( $uses->post_count - $uses_to_show ) 175 ); 176 ?></a> 165 177 <a href="#" class="hide-more"><?php _e( 'Hide more uses', 'wporg' ); ?></a> 166 178 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.