WordPress.org

Making WordPress.org

Changeset 5022


Ignore:
Timestamp:
03/01/2017 04:30:36 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Properly set up bbPress search form for international forums.

Fixes #2450.

File:
1 edited

Legend:

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

    r4248 r5022  
    22namespace WordPressdotorg\Forums;
    33?>
     4
     5<?php if ( bb_is_intl_forum() ) : ?>
     6
     7<form role="search" method="get" class="search-form" action="<?php bbp_search_url(); ?>">
     8    <label for="s" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg-forums' ); ?></label>
     9    <input type="hidden" name="action" value="bbp-search-request" />
     10    <input type="search" id="s" class="search-field" placeholder="<?php echo esc_attr_x( 'Search forums', 'placeholder', 'wporg-forums' ); ?>" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" />
     11    <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php _e( 'Search forums', 'wporg-forums' ); ?></span></button>
     12</form>
     13
     14<?php else : ?>
     15
    416<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    517    <label for="s" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg-forums' ); ?></label>
     
    719    <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php _e( 'Search forums', 'wporg-forums' ); ?></span></button>
    820</form>
     21
     22<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.