Making WordPress.org


Ignore:
Timestamp:
06/12/2016 07:58:50 AM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Update category styles in meta widget.

See #1573.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

    r3226 r3337  
    2727     */
    2828    public function widget( $args, $instance ) {
     29        $post = get_post();
     30
    2931        echo $args['before_widget'];
    3032        ?>
     
    4244            <li><?php printf( __( 'Last updated: %s ago', 'wporg-plugins' ), '<span itemprop="dateModified" content="' . esc_attr( get_post_modified_time( 'c' ) ) . '">' . human_time_diff( get_post_modified_time() ) . '</span>' ); ?></li>
    4345            <li><?php printf( __( 'Active installs: %s', 'wporg-plugins' ), Template::active_installs( false ) ); ?></li>
    44             <li><?php printf( __( 'Category: %s', 'wporg-plugins' ), get_the_term_list( get_post()->ID, 'plugin_category', '', ', ' ) ); ?></li>
    45             <?php if ( $built_for = get_the_term_list( get_post()->ID, 'plugin_built_for', '', ', ' ) ) : ?>
     46            <?php if ( $categories = get_the_term_list( $post, 'plugin_category', '<div class="tags">', '', '</div>' ) ) : ?>
     47                <li><?php printf( __( 'Category: %s', 'wporg-plugins' ), $categories ); ?></li>
     48            <?php endif; ?>
     49            <?php if ( $built_for = get_the_term_list( $post, 'plugin_built_for', '', ', ' ) ) : ?>
    4650                <li><?php printf( __( 'Designed to work with: %s', 'wporg-plugins' ), $built_for ); ?></li>
    4751            <?php endif; ?>
    48             <?php if ( $business_model = get_the_term_list( get_post()->ID, 'plugin_business_model', '', ', ' ) ) : ?>
     52            <?php if ( $business_model = get_the_term_list( $post, 'plugin_business_model', '', ', ' ) ) : ?>
    4953                <li><?php printf( __( 'Business Model: %s', 'wporg-plugins' ), $business_model ); ?></li>
    5054            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.