Changeset 4532
- Timestamp:
- 06/19/2011 02:50:06 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4506 r4532 295 295 296 296 /** Search Form ***************************************************************/ 297 298 /**299 * bp_search_form_available()300 *301 * Only show the search form if there are available objects to search for.302 *303 * @uses function_exists304 * @uses is_multisite()305 * @return bool Filterable result306 */307 function bp_search_form_enabled() {308 if ( bp_is_active( 'xprofile' )309 || bp_is_active( 'groups' )310 || ( bp_is_active( 'blogs' ) && is_multisite() )311 || ( bp_is_active( 'forums' ) && !bp_forum_directory_is_disabled() )312 ) {313 $search_enabled = true;314 } else {315 $search_enabled = false;316 }317 318 return apply_filters( 'bp_search_form_enabled', $search_enabled );319 }320 297 321 298 function bp_search_form_action() { -
trunk/bp-core/deprecated/1.3.php
r4309 r4532 370 370 _deprecated_function( __FUNCTION__, '1.3', 'bp_loggedin_user_link' ); 371 371 bp_loggedin_user_link(); 372 } 373 374 /** 375 * Only show the search form if there are available objects to search for. 376 * Deprecated in 1.3; not used anymore. 377 * 378 * @return bool 379 */ 380 function bp_search_form_enabled() { 381 _deprecated_function( __FUNCTION__, '1.3', 'No longer required.' ); 382 return apply_filters( 'bp_search_form_enabled', true ); 372 383 } 373 384 -
trunk/bp-themes/bp-default/header.php
r4455 r4532 28 28 <h1 id="logo" role="banner"><a href="<?php echo home_url(); ?>" title="<?php echo _x( 'Home', 'Home page banner link title', 'buddypress' ); ?>"><?php bp_site_name(); ?></a></h1> 29 29 30 <?php if ( bp_search_form_enabled() ) : ?>31 32 30 <form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form"> 33 31 <label for="search-terms" class="accessibly-hidden"><?php _e( 'Search for:', 'buddypress' ); ?></label> … … 41 39 42 40 </form><!-- #search-form --> 43 44 <?php endif; ?>45 41 46 42 <?php do_action( 'bp_search_login_bar' ) ?>
Note: See TracChangeset
for help on using the changeset viewer.