WordPress.org

Making WordPress.org

Changeset 3616


Ignore:
Timestamp:
07/01/2016 07:47:01 PM (3 years ago)
Author:
jmdodd
Message:

Forums Theme: Add WordPress version to topic sidebar.

See #1544.

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

Legend:

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

    r2429 r3616  
    3939        get_template_directory_uri() . '/style.css',
    4040        array( 'bb-base' ),
    41         '20160129'
     41        '20160701'
    4242    );
    4343
     
    255255    $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, 'wporg-forums' ), bbp_number_format( $voice_count ) );
    256256    $last_reply  = bbp_get_topic_last_active_id( $topic_id );
     257
     258    // WP version
     259    $wp_version = '';
     260    if ( function_exists( 'WordPressdotorg\Forums\Version_Dropdown\get_topic_version' ) ) {
     261        $wp_version = WordPressdotorg\Forums\Version_Dropdown\get_topic_version( $topic_id );
     262    }
    257263
    258264    ?>
     
    269275        <li class="topic-subscribe"><?php bbp_topic_subscription_link( array( 'before' => '', 'topic_id' => $_topic_id ) ); ?></li>
    270276        <li class="topic-favorite"><?php bbp_topic_favorite_link( array( 'topic_id' => $_topic_id ) ); ?></li>
    271     <?php endif;
     277    <?php endif; ?>
     278    <?php if ( ! empty( $wp_version ) ) : ?>
     279        <li class="wp-version"><?php echo esc_html( $wp_version ); ?></li>
     280    <?php endif; ?>
     281
     282    <?php
    272283}
    273284
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/style.css

    r2428 r3616  
    216216}
    217217
     218.sidebar .topic-info li.wp-version:before {
     219    content: "\f120";
     220}
     221
    218222/* Sticky topics */
    219223#bbpress-forums ul.sticky li.bbp-topic-title a.bbp-topic-permalink:before,
Note: See TracChangeset for help on using the changeset viewer.