Changeset 12050 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-related.php
- Timestamp:
- 09/05/2022 05:14:31 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-related.php
r7491 r12050 17 17 $used_by_to_show = 5; 18 18 19 if ( $has_uses ) { 20 $uses_to_show = min( $uses_to_show, split_uses_by_frequent_funcs( $uses->posts ) ); 21 } 22 19 23 if ( $has_uses || $has_used_by ) : 20 24 ?> … … 26 30 <article class="uses"> 27 31 <h3><?php _e( 'Uses', 'wporg' ); ?></h3> 28 <table id="uses-table" >32 <table id="uses-table" data-show="<?php echo esc_attr( $uses_to_show ) ?>"> 29 33 <caption class="screen-reader-text"><?php esc_html_e( 'Uses', 'wporg' ); ?></caption> 30 34 <thead> … … 37 41 <?php while ( $uses->have_posts() ) : $uses->the_post(); ?> 38 42 <tr> 39 <td> 40 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 43 <td class="related-title"> 41 44 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ), true ) ) : ?>()<?php endif; ?></a> 45 <span><?php echo esc_attr( get_source_file() ); ?></span> 42 46 </td> 43 47 <td class="related-desc"> … … 52 56 <a href="#" class="show-more"><?php 53 57 /* translators: %d: remaining 'uses' count */ 54 printf( _n( 'Show % d more use', 'Show %dmore uses', $uses->post_count - $uses_to_show, 'wporg' ),58 printf( _n( 'Show %s more use', 'Show %s more uses', $uses->post_count - $uses_to_show, 'wporg' ), 55 59 number_format_i18n( $uses->post_count - $uses_to_show ) 56 60 ); … … 66 70 <article class="used-by"> 67 71 <h3><?php esc_html_e( 'Used By', 'wporg' ); ?></h3> 68 <table id="used-by-table" >72 <table id="used-by-table" data-show="<?php echo esc_attr( $used_by_to_show ) ?>"> 69 73 <caption class="screen-reader-text"><?php esc_html_e( 'Used By', 'wporg' ); ?></caption> 70 74 <thead> … … 77 81 <?php while ( $used_by->have_posts() ) : $used_by->the_post(); ?> 78 82 <tr> 79 <td> 80 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 83 <td class="related-title"> 81 84 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ), true ) ) : ?>()<?php endif; ?></a> 85 <span><?php echo esc_attr( get_source_file() ); ?></span> 82 86 </td> 83 87 <td class="related-desc"> … … 92 96 <a href="#" class="show-more"><?php 93 97 /* translators: %d: remaining 'used by' count */ 94 printf( _n( 'Show % d more used by', 'Show %dmore used by', $used_by->post_count - $used_by_to_show, 'wporg' ),98 printf( _n( 'Show %s more used by', 'Show %s more used by', $used_by->post_count - $used_by_to_show, 'wporg' ), 95 99 number_format_i18n( $used_by->post_count - $used_by_to_show ) 96 100 );
Note: See TracChangeset
for help on using the changeset viewer.