本文整理汇总了PHP中bbp_search_url函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_search_url函数的具体用法?PHP bbp_search_url怎么用?PHP bbp_search_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_search_url函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: st_add_live_search
/**
* Add live search JavaScript to the footer
*/
function st_add_live_search()
{
if (of_get_option('st_live_search') == '0') {
if (class_exists('bbPress')) {
if (get_post_type() == 'forum' || get_post_type() == 'topic' || get_post_type() == 'reply' || bbp_is_search()) {
// If BBPRess
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#live-search #s').liveSearch({url: '<?php
bbp_search_url();
?>
/?ajax=on&bbp_search='});
});
</script>
<?php
}
} else {
// If KB
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#live-search #s').liveSearch({url: '<?php
echo home_url();
?>
/?ajax=on&post_type=st_kb&s='});
});
</script>
<?php
}
}
}
示例2: bbp_search_url
<?php
/**
* Search
*
* @package bbPress
* @subpackage Theme
*/
?>
<form role="search" method="get" class="searchform bbp-search-form search-form" action="<?php
bbp_search_url();
?>
">
<div class="search-table">
<label class="screen-reader-text hidden" for="bbp_search"><?php
_e('Search for:', 'bbpress');
?>
</label>
<input type="hidden" name="action" value="bbp-search-request" />
<div class="search-field">
<input tabindex="<?php
bbp_tab_index();
?>
" type="text" value="<?php
echo esc_attr(bbp_get_search_terms());
?>
" placeholder="<?php
_e('Search the Forum...', 'Avada');
?>
" name="bbp_search" id="bbp_search" />
示例3: add_search_page_search_form
/**
* Render a special "new search" form on top of the search results page.
*/
public function add_search_page_search_form()
{
?>
<div class="search-page-search-form search-page-search-form-top">
<h2><?php
echo __('Need a new search?', 'Avada');
?>
</h2>
<p><?php
echo __('If you didn\'t find what you were looking for, try a new search!', 'Avada');
?>
</p>
<form role="search" method="get" class="bbp-search-form seach-form searchform" action="<?php
bbp_search_url();
?>
">
<div class="search-table">
<label class="screen-reader-text hidden" for="bbp_search"><?php
_e('Search for:', 'bbpress');
?>
</label>
<input type="hidden" name="action" value="bbp-search-request" />
<div class="search-field">
<input tabindex="<?php
bbp_tab_index();
?>
" type="text" value="<?php
echo esc_attr(bbp_get_search_terms());
?>
" placeholder="<?php
_e('Search the Forum...', 'Avada');
?>
" name="bbp_search" id="bbp_search" />
</div>
<div class="search-button">
<input tabindex="<?php
bbp_tab_index();
?>
" class="fusion-button button submit" type="submit" id="bbp_search_submit" value="" />
</div>
</div>
</form>
</div>
<?php
}