public
Created

bbPress Search Widget plugin v1.1+ -- filters and constants for customizing and branding

  • Download Gist
bbpress-search-widget.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php
 
/** bbPress Search Widget: Remove Search Label */
define( 'BBPSW_SEARCH_LABEL_DISPLAY', false );
 
 
add_filter( 'bbpsw_filter_label_string', 'custom_bbpsw_label_string' );
/**
* bbPress Search Widget: Custom Search Label
*/
function custom_bbpsw_label_string() {
return __( 'Your custom search label text', 'your-theme-textdomain' );
}
 
 
add_filter( 'bbpsw_filter_placeholder_string', 'custom_bbpsw_placeholder_string' );
/**
* bbPress Search Widget: Custom Placeholder Text
*/
function custom_bbpsw_placeholder_string() {
return __( 'Your custom placeholder text', 'your-theme-textdomain' );
}
 
 
add_filter( 'bbpsw_filter_search_string', 'custom_bbpsw_search_string' );
/**
* bbPress Search Widget: Custom Search Button Text
*/
function custom_bbpsw_search_string() {
return __( 'Your custom search button text', 'your-theme-textdomain' );
}
theme_ifeature-lite.css
CSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/* iFeature Lite: bbPress Search Widget
----------------------------------------------------------------------------------------------------*/
 
#bbpsw-form-wrapper {
height: auto !important;
}
 
#bbpsw-form-wrapper .searchform,
#bbpsw-form-wrapper .searchform .s {
height: auto !important;
}
 
#bbpsw-form-wrapper .searchform {
border-radius: 0 !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
box-shadow: 0 0 0 #222222 inset !important;
-moz-box-shadow: 0 0 0 #222222 inset !important;
-webkit-box-shadow: 0 0 0 #222222 inset !important;
width: auto !important;
}
 
#bbpsw-form-wrapper .searchform .s {
background: #f5f5f5;
padding: 3px;
max-width: 100% !important;
}
 
#bbpsw-form-wrapper .searchform .searchsubmit {
display: inline-block;
}
 
#bbpsw-form-wrapper .bbpsw-label {
margin-bottom: -15px !important;
}

Note: The above codes work with plugin version 1.1 or higher!

Extended explanation can be found at the plugin's page "FAQ" section at the bottom:
http://wordpress.org/extend/plugins/bbpress-search-widget/faq/

Download "bbPress Search Widget" plugin at wordpress.org:
http://wordpress.org/extend/plugins/bbpress-search-widget/

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.