本文整理匯總了PHP中EM_Locations::get_default_search方法的典型用法代碼示例。如果您正苦於以下問題:PHP EM_Locations::get_default_search方法的具體用法?PHP EM_Locations::get_default_search怎麽用?PHP EM_Locations::get_default_search使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EM_Locations
的用法示例。
在下文中一共展示了EM_Locations::get_default_search方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: em_get_locations_map_shortcode
/**
* Generates a map of locations that match given query attributes. Accepts any location query attributes.
* @param unknown_type $atts
* @return string
*/
function em_get_locations_map_shortcode($atts)
{
$clean_atts = EM_Locations::get_default_search($atts);
$clean_atts['width'] = !empty($atts['width']) ? $atts['width'] : 450;
$clean_atts['height'] = !empty($atts['height']) ? $atts['height'] : 300;
return EM_Map::get_global($atts);
}
示例2: em_get_locations
/**
* Returns a html list of locations filtered by the array or query-string of arguments supplied.
* @param array|string $args
* @return string
*/
function em_get_locations($args = array())
{
if (strpos($args, "=")) {
// allows the use of arguments without breaking the legacy code
$defaults = EM_Locations::get_default_search();
$args = wp_parse_args($args, $defaults);
}
return EM_Locations::output($args);
}
示例3: em_get_locations_map_shortcode
/**
* Generates a map of locations that match given query attributes. Accepts any location query attributes.
* @param unknown_type $atts
* @return string
*/
function em_get_locations_map_shortcode($atts)
{
$clean_atts = EM_Locations::get_default_search($atts);
$clean_atts['width'] = !empty($atts['width']) ? $atts['width'] : 450;
$clean_atts['height'] = !empty($atts['height']) ? $atts['height'] : 300;
ob_start();
em_locate_template('templates/map-global.php', true, array('args' => $atts));
return ob_get_clean();
}