Changeset 3811
- Timestamp:
- 08/15/2016 07:52:04 PM (8 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
r3809 r3811 10 10 11 11 if ( show_usage_info() ) : 12 13 $has_uses = ( post_type_has_uses_info() && ( $uses = get_uses() ) && $uses->have_posts() ); 14 $has_used_by = ( post_type_has_usage_info() && ( $used_by = get_used_by() ) && $used_by->have_posts() ); 15 16 if ( $has_uses || $has_used_by ) : 12 17 ?> 13 18 <hr /> … … 15 20 <h2><?php _e( 'Related', 'wporg' ); ?></h2> 16 21 17 <?php if ( post_type_has_uses_info()) : ?>22 <?php if ( $has_uses ) : ?> 18 23 <article class="uses"> 19 24 <h3><?php _e( 'Uses', 'wporg' ); ?></h3> 20 25 <ul> 21 26 <?php 22 $uses = get_uses();23 27 $uses_to_show = 5; 24 if ( $uses ) :while ( $uses->have_posts() ) : $uses->the_post()28 while ( $uses->have_posts() ) : $uses->the_post() 25 29 ?> 26 30 <li> … … 37 41 ?></a> 38 42 <a href="#" class="hide-more"><?php _e( 'Hide more uses', 'wporg' ); ?></a> 39 <?php endif; endif;?>43 <?php endif; ?> 40 44 </ul> 41 45 </article> 42 46 <?php endif; ?> 43 47 44 <hr /> 48 <?php if ( $has_used_by ) : ?> 49 50 <?php if ( $has_uses ) { ?><hr /><?php } ?> 51 45 52 <article class="used-by"> 46 53 <h3><?php _e( 'Used By', 'wporg' ); ?></h3> 47 54 <ul> 48 55 <?php 49 $used_by = get_used_by();50 56 $used_by_to_show = 5; 51 57 while ( $used_by->have_posts() ) : $used_by->the_post(); … … 67 73 </ul> 68 74 </article> 75 <?php endif; ?> 76 69 77 </section> 78 <?php endif; ?> 70 79 <?php endif; ?> 71
Note: See TracChangeset
for help on using the changeset viewer.