Making WordPress.org

Changeset 3926


Ignore:
Timestamp:
09/02/2016 12:40:18 AM (8 years ago)
Author:
jmdodd
Message:

Forums Theme: Differentiate between international and support forum search.

Fixes regression introduced in [3918].

See #347.

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

Legend:

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

    r3918 r3926  
    400400}
    401401add_action( 'bbp_template_after_topics_loop', 'bb_base_after_topics_loop' );
     402
     403function bb_is_intl_forum() {
     404    return get_locale() != 'en_US';
     405}
     406
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/page-homepage.php

    r3918 r3926  
    3232            <h3><?php _e( 'Search the Support Forums', 'wporg-forums' ); ?></h3>
    3333            <p><?php _e( 'Enter a few words that describe the problem you&rsquo;re having.', 'wporg-forums' ); ?></p>
    34             <?php bb_base_search_form(); ?>
     34            <?php
     35                if ( bb_is_intl_forum() ) :
     36                    bbp_get_template_part( 'form', 'search' );
     37                else :
     38                    bb_base_search_form();
     39                endif;
     40            ?>
    3541            <h3><?php _e( 'Hot Topics', 'wporg-forums' ); ?></h3>
    3642            <p class="frontpageheatmap">
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/sidebar.php

    r3923 r3926  
    33    <?php if ( function_exists( 'is_bbpress' ) && ( is_bbpress() ) || is_page( 'new-topic' ) ) : ?>
    44
    5         <?php if ( bbp_is_single_forum() ) : ?>
     5        <?php if ( bbp_is_single_forum() || ( bb_is_intl_forum() && bb_base_topic_search_query( false ) ) ) : ?>
    66
    77            <div>
     
    1313
    1414            <div>
    15                 <?php bb_base_search_form(); ?>
     15                <?php
     16                    if ( bb_is_intl_forum() ) :
     17                        bb_base_topic_search_form();
     18                    else :
     19                        bb_base_search_form();
     20                    endif;
     21                ?>
    1622            </div>
    1723
     
    4854
    4955            <div>
    50                 <?php bb_base_search_form(); ?>
     56                <?php
     57                    if ( bb_is_intl_forum() ) :
     58                        bbp_base_reply_search_form();
     59                    else :
     60                        bb_base_search_form();
     61                    endif;
     62                ?>
    5163            </div>
    5264
Note: See TracChangeset for help on using the changeset viewer.