Making WordPress.org


Ignore:
Timestamp:
04/25/2014 08:55:11 PM (12 years ago)
Author:
coffee2code
Message:

Code Reference:

  • List 14 new things in the 'New in' widget, to make it match length of API widget
  • Remove blank space in function parentheses when there are no arguments
  • List methods for a class on the class's page
  • Only show signature and excerpt in search results for listed matches
File:
1 edited

Legend:

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

    r554 r561  
    88                <?php the_excerpt(); ?>
    99        </section>
     10
     11<?php if ( is_single() ) : ?>
     12
    1013        <section class="long-description">
    1114                <?php the_content(); ?>
    … …  
    3235        <section class="meta">Used by TODO | Uses TODO | TODO Examples</section>
    3336<?php endif; */ ?>
    34 <?php if ( is_single() ) : ?>
     37
    3538        <!--
    3639        <hr/>
    … …  
    8689        </section>
    8790        -->
     91
     92        <?php if ( 'wp-parser-class' === get_post_type() ) :
     93                if ( $children = get_children( array( 'post_parent' => get_the_ID(), 'post_status' => 'publish' ) ) ) :
     94                        usort( $children, __NAMESPACE__ . '\\compare_objects_by_name' );
     95        ?>
     96                <hr/>
     97                <section class="class-methods">
     98                <h2><?php _e( 'Methods', 'wporg' ); ?></h2>
     99                <ul>
     100                        <?php foreach ( $children as $child ) : ?>
     101                                <li><a href="<?php echo get_permalink( $child->ID ); ?>">
     102                                <?php
     103                                        $title = get_the_title( $child );
     104                                        $pos = ( $i = strpos( $title, ':' ) ) ? $i + 2 : 0;
     105                                        echo substr( $title, $pos );
     106                                ?></a>
     107                                <?php if ( $excerpt = apply_filters( 'get_the_excerpt', $child->post_excerpt ) ) {
     108                                        echo '&mdash; ' . sanitize_text_field( $excerpt );
     109                                } ?>
     110                                </li>
     111                        <?php endforeach; ?>
     112                </ul>
     113                </section>
     114                <?php endif;
     115        endif; ?>
     116
    88117<?php endif; ?>
    89118
Note: See TracChangeset for help on using the changeset viewer.