Making WordPress.org

Ticket #2012: meta-2012.patch

File meta-2012.patch, 1.7 KB (added by SergeyBiryukov, 9 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php

     
    182182        return mysql2date( __( 'F jS, Y', 'wporg-forums' ), $user->user_registered );
    183183}
    184184
     185/**
     186 * Check if the current page is a single review.
     187 */
     188function wporg_support_is_single_review() {
     189        if ( ! class_exists( 'WordPressdotorg\Forums\Plugin' ) || ! bbp_is_single_topic() ) {
     190                return false;
     191        }
     192
     193        return ( WordPressdotorg\Forums\Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id() );
     194}
     195
    185196/** bb Base *******************************************************************/
    186197
    187198function bb_base_search_form() {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/sidebar.php

     
    3838                        <?php do_action( 'wporg_compat_single_topic_sidebar_pre' ); ?>
    3939
    4040                        <div>
    41                                 <h3><?php _e( 'Topic Info', 'wporg-forums' ); ?></h3>
     41                                <?php if ( wporg_support_is_single_review() ) : ?>
     42                                        <h3><?php _e( 'Review Info', 'wporg-forums' ); ?></h3>
     43                                <?php else : ?>
     44                                        <h3><?php _e( 'Topic Info', 'wporg-forums' ); ?></h3>
     45                                <?php endif; ?>
     46
    4247                                <ul class="topic-info">
    4348                                        <?php bb_base_single_topic_description(); ?>
    4449                                </ul>