Changeset 6383
- Timestamp:
- 01/12/2018 09:37:09 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 2 edited
-
inc/template-tags.php (modified) (1 diff)
-
reference/template-description.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r6259 r6383 1330 1330 1331 1331 /** 1332 * Gets list of additional resources linked via `@see` tags. 1333 * 1334 * @param null|WP_Post Optional. The post. 1335 * @return array 1336 */ 1337 function get_see_tags( $post = null ) { 1338 $post = get_post( $post ); 1339 1340 $tags = get_post_meta( $post->ID, '_wp-parser_tags', true ); 1341 1342 return wp_list_filter( $tags, array( 'name' => 'see' ) ); 1343 } 1344 1345 /** 1332 1346 * Should the search bar be shown? 1333 1347 * -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-description.php
r3626 r6383 14 14 <h2><?php _e( 'Description', 'wporg' ); ?></h2> 15 15 <?php echo get_description(); ?> 16 17 <?php if ( $see = get_see_tags() ) : ?> 18 <h3><?php _e( 'See also', 'wporg' ); ?></h3> 19 20 <ul> 21 <?php 22 foreach ( $see as $tag ) { 23 $see_ref = ''; 24 if ( ! empty( $tag['refers'] ) ) { 25 $see_ref .= '{@see ' . $tag['refers'] . '}'; 26 } 27 if ( ! empty( $tag['content'] ) ) { 28 if ( $see_ref ) { 29 $see_ref .= ': '; 30 } 31 $see_ref .= $tag['content']; 32 } 33 // Process text for auto-linking, etc. 34 remove_filter( 'the_content', 'wpautop' ); 35 $see_ref = apply_filters( 'the_content', apply_filters( 'get_the_content', $see_ref ) ); 36 add_filter( 'the_content', 'wpautop' ); 37 38 echo '<li>' . $see_ref . "</li>\n"; 39 } 40 ?> 41 </ul> 42 <?php endif; ?> 16 43 </section> 17 44
Note: See TracChangeset
for help on using the changeset viewer.