Function Reference: geodir_advance_search_button

Summary

This function has not been documented yet.

Filters

‘gd_adv_search_btn_value’ [Line: 1452]

Source File

geodir_advance_search_button() is located in geodir_advance_search_filters/geodirectory_advance_search_function.php [Line: 1442]

Source Code

function geodir_advance_search_button(){
	global $wpdb; 
if(isset($_POST['action']) && $_POST['action'] && isset($_POST['stype']) && $_POST['stype']){$stype=$_POST['stype'];$ajax=true;}else{$stype=false;$ajax=false;}
	if($stype){}
	else{$stype = geodir_get_current_posttype();}	
	if(empty($stype))
		$stype ='gd_place';
		
	$rows = $wpdb->get_var("SELECT count(id) as rows FROM ".GEODIR_ADVANCE_SEARCH_TABLE." where post_type= '".$stype."'");
	if($rows>0){
            $btn_value = apply_filters('gd_adv_search_btn_value', __('Customize My Search',GEODIRADVANCESEARCH_TEXTDOMAIN));
			echo '';
			//echo '';
			//echo '';

	add_filter('body_class', 'geodir_advance_search_body_class'); // let's add a class to the body so we can style the new addition to the search
	}
if($ajax){exit;}	
}