function widget($args, $instance)
    {
        // outputs the content of the widget
        extract($args);
        // Make before_widget, etc available.
        $bps_name = empty($instance['title']) ? __('BuddyPress Search', TEMPLATE_DOMAIN) : apply_filters('widget_title', $instance['title']);
        $unique_id = $args['widget_id'];
        echo $before_widget;
        echo $before_title . $bps_name . $after_title;
        do_action('bp_before_blog_search_form');
        ?>
<form action="<?php 
        echo bp_search_form_action();
        ?>
" class="bp-searchform" method="post" id="search-form">
<input type="text" id="search-terms" name="search-terms" onfocus="if (this.value == '<?php 
        _e('Start Searching...', TEMPLATE_DOMAIN);
        ?>
') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php 
        _e('Start Searching...', TEMPLATE_DOMAIN);
        ?>
';}" />
<?php 
        echo bp_search_form_type_select();
        ?>
&nbsp;<input type="submit" name="search-submit" id="search-submit" value="<?php 
        _e('Search', TEMPLATE_DOMAIN);
        ?>
" />
<?php 
        wp_nonce_field('bp_search_form');
        do_action('bp_blog_search_form');
        ?>
</form>
<?php 
        do_action('bp_after_blog_search_form');
        echo $after_widget;
    }
Ejemplo n.º 2
0
</h3>
					<div class="skip-link assistive-text"><a href="#content" title="<?php 
esc_attr_e('Skip to content', 'logicalboneshug');
?>
"><?php 
_e('Skip to content', 'logicalboneshug');
?>
</a></div>
					<?php 
wp_nav_menu(array('theme_location' => 'top', 'menu_class' => 'top_menu', 'container' => ''));
?>
				</nav>
			</div>
			<div id="search-bar">
					<form action="<?php 
echo bp_search_form_action();
?>
" method="post" id="search-form">
							<label for="search-terms" class="accessibly-hidden"><?php 
_e('Search for:', 'logicalboneshug');
?>
</label>
							<input type="text" id="search-terms" name="search-terms" value="<?php 
echo isset($_REQUEST['s']) ? esc_attr($_REQUEST['s']) : '';
?>
" />

							<?php 
echo bp_search_form_type_select();
?>
function bp_search_form()
{
    $form = '
		<form action="' . bp_search_form_action() . '" method="post" id="search-form">
			<input type="text" id="search-terms" name="search-terms" value="" /> 
			' . bp_search_form_type_select() . '
		
			<input type="submit" name="search-submit" id="search-submit" value="' . __('Search', 'buddypress') . '" />
			' . wp_nonce_field('bp_search_form') . '
		</form>
	';
    echo apply_filters('bp_search_form', $form);
}
Ejemplo n.º 4
0
/**
 * Last used by core in BP 1.1. The markup was merged into DTheme's header.php template.
 */
function bp_search_form()
{
    _deprecated_function(__FUNCTION__, '1.1', 'No longer required.');
    $form = '
		<form action="' . bp_search_form_action() . '" method="post" id="search-form">
			<input type="text" id="search-terms" name="search-terms" value="" />
			' . bp_search_form_type_select() . '

			<input type="submit" name="search-submit" id="search-submit" value="' . __('Search', 'buddypress') . '" />
			' . nxt_nonce_field('bp_search_form') . '
		</form>
	';
    echo apply_filters('bp_search_form', $form);
}
Ejemplo n.º 5
0
					<li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
						<a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a>
					</li>
				<?php endif; ?>

				<?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>

				<?php do_action( 'bp_nav_items' ); ?>
			</ul><!-- #nav -->

			<div id="search-bar">
				<div class="padder">

				<?php if ( bp_search_form_enabled() ) : ?>

					<form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
						<input type="text" id="search-terms" name="search-terms" value="" />
						<?php echo bp_search_form_type_select() ?>

						<input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
						<?php wp_nonce_field( 'bp_search_form' ) ?>
					</form><!-- #search-form -->

				<?php endif; ?>

				<?php do_action( 'bp_search_login_bar' ) ?>

				</div><!-- .padder -->
			</div><!-- #search-bar -->

			<?php do_action( 'bp_header' ) ?>
								<br>
						
							</div>
				        <?php 
}
?>
	


						<?php 
if (function_exists('bp_is_active')) {
    ?>
							<div class="search">

						     	<form action="<?php 
    print bp_search_form_action();
    ?>
" method="post" id="search-form">
									<input type="text" id="search-terms" name="search-terms" placeholder="Buscar..." value="<?php 
    print get_search_query();
    ?>
" />
									<?php 
    print bp_search_form_type_select();
    ?>
									<button type="submit" name="search-submit" id="search-submit"><span class="icon"></span></button>

									<?php 
    wp_nonce_field('bp_search_form');
    ?>
								</form>
Ejemplo n.º 7
0
    /**
     * header: add a search field in the header
     *
     * located: header.php do_action( 'bp_after_header_nav' )
     *
     * @package Custom Community
     * @since 1.8.3
     */
    function menue_enable_search()
    {
        global $cap;
        if (defined('BP_VERSION')) {
            if ($cap->menue_enable_search) {
                ?>
			<div id="search-bar" role="search">
				<div class="padder">

						<form action="<?php 
                echo bp_search_form_action();
                ?>
" method="post" id="search-form">
							<input type="text" id="search-terms" name="search-terms" value="<?php 
                echo isset($_REQUEST['s']) ? esc_attr($_REQUEST['s']) : '';
                ?>
" />
							<?php 
                echo bp_search_form_type_select();
                ?>

							<input type="submit" name="search-submit" id="search-submit" value="<?php 
                _e('Search', 'cc');
                ?>
" />

							<?php 
                wp_nonce_field('bp_search_form');
                ?>

						</form><!-- #search-form -->

				<?php 
                do_action('bp_search_login_bar');
                ?>

				</div><!-- .padder -->
			</div><!-- #search-bar -->
			<?php 
            }
        }
    }