本文整理汇总了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();
}