WordPress.org

Making WordPress.org

Changeset 5597


Ignore:
Timestamp:
06/27/17 21:59:38 (5 months ago)
Author:
coffee2code
Message:

developer.wordpress.org: Omit amending parentheses to class names in signatures and related items.

Props pbiron.
Fixes #2801.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r5580 r5597  
    535535        $types        = array(); 
    536536 
     537        if ( 'wp-parser-class' === get_post_type( $post_id ) ) { 
     538            return $signature; 
     539        } 
     540 
    537541        if ( $tags ) { 
    538542            foreach ( $tags as $tag ) { 
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-related.php

    r3811 r5597  
    3030                        <li> 
    3131                            <span><?php echo esc_attr( get_source_file() ); ?>:</span> 
    32                             <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( 'wp-parser-hook' !== get_post_type() ) : ?>()<?php endif; ?></a> 
     32                            <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 
    3333                        </li> 
    3434                    <?php endwhile; wp_reset_postdata(); ?> 
     
    5959                    <li> 
    6060                        <span><?php echo esc_attr( get_source_file() ); ?>:</span> 
    61                         <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( 'wp-parser-hook' !== get_post_type() ) : ?>()<?php endif; ?></a> 
     61                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 
    6262                    </li> 
    6363                <?php endwhile; wp_reset_postdata(); ?> 
Note: See TracChangeset for help on using the changeset viewer.