/** * Output property search form * * @param array $atts * @return string */ public static function property_search_form($atts) { $atts = shortcode_atts(array('id' => 'shortcode'), $atts); $form_controls = ph_get_search_form_fields(); $form_controls = apply_filters('propertyhive_search_form_fields_' . $atts['id'], $form_controls); ob_start(); ph_get_template('global/search-form.php', array('form_controls' => $form_controls, 'id' => $atts['id'])); return ob_get_clean(); }
/** * Main function for drawing entire property search form. We give the ability for an ID to be passed so differently formatted forms can be used * (ie. a homepage search form might be different from a search form on search results) * * @param string $id * @return void */ function ph_get_search_form($id = 'default') { $form_controls = ph_get_search_form_fields(); $form_controls = apply_filters('propertyhive_search_form_fields_' . $id, $form_controls); ph_get_template('global/search-form.php', array('form_controls' => $form_controls, 'id' => $id)); }