Making WordPress.org


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

Forums Theme: Add WordPress version to topic sidebar.

See #1544.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.