Add search widget

This commit is contained in:
jonfalcon
2016-03-17 15:09:49 -07:00
parent f962c285a8
commit 4ee94204ab
8 changed files with 179 additions and 5 deletions
+17
View File
@@ -13,6 +13,7 @@ class UM_Shortcodes {
add_shortcode('um_loggedin', array(&$this, 'um_loggedin'));
add_shortcode('um_loggedout', array(&$this, 'um_loggedout'));
add_shortcode('um_show_content', array(&$this, 'um_shortcode_show_content_for_role') );
add_shortcode('ultimatemember_searchform', array(&$this, 'ultimatemember_searchform') );
add_filter('body_class', array(&$this, 'body_class'), 0);
@@ -570,4 +571,20 @@ class UM_Shortcodes {
return '';
}
public function ultimatemember_searchform($args = array(), $content = "") {
// turn off buffer
ob_start();
// load template
$this->load_template( 'searchform' );
// get the buffer
$template = ob_get_contents();
// clear the buffer
ob_end_clean();
return $template;
}
}