Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/28/2013 11:12:36 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Allow the search feature to be toggled on and off. Introduces new setting and supporting function to get and override the option easily in third party plugins. Fixes #2342.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/shortcodes.php

    r4917 r4971  
    621621    public function display_search_form() {
    622622
     623        // Bail if search is disabled
     624        if ( ! bbp_allow_search() ) {
     625            return;
     626        }
     627
    623628        // Start output buffer
    624629        $this->start( 'bbp_search_form' );
     
    645650
    646651        // Sanity check required info
    647         if ( !empty( $content ) )
     652        if ( !empty( $content ) ) {
    648653            return $content;
     654        }
     655
     656        // Bail if search is disabled
     657        if ( ! bbp_allow_search() ) {
     658            return;
     659        }
    649660
    650661        // Trim search attribute if it's set
Note: See TracChangeset for help on using the changeset viewer.