当前位置: 首页>>代码示例>>PHP>>正文


PHP EM_Locations::output方法代码示例

本文整理汇总了PHP中EM_Locations::output方法的典型用法代码示例。如果您正苦于以下问题:PHP EM_Locations::output方法的具体用法?PHP EM_Locations::output怎么用?PHP EM_Locations::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EM_Locations的用法示例。


在下文中一共展示了EM_Locations::output方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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 (is_string($args) && strpos($args, "=")) {
        // allows the use of arguments without breaking the legacy code
        $args = wp_parse_args($args, array());
    } else {
        $args = (array) $args;
    }
    $args['ajax'] = isset($args['ajax']) ? $args['ajax'] : !defined('EM_AJAX') || EM_AJAX;
    $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_locations_default_limit');
    if (empty($args['format']) && empty($args['format_header']) && empty($args['format_footer'])) {
        ob_start();
        if (!empty($args['ajax'])) {
            echo '<div class="em-search-ajax">';
        }
        //open AJAX wrapper
        em_locate_template('templates/locations-list.php', true, array('args' => $args));
        if (!empty($args['ajax'])) {
            echo "</div>";
        }
        //close AJAX wrapper
        $return = ob_get_clean();
    } else {
        //no ajax allowed with custom on-the-fly formats
        $return = EM_Locations::output($args);
    }
    return $return;
}
开发者ID:eresyyl,项目名称:mk,代码行数:33,代码来源:em-template-tags.php

示例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);
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:14,代码来源:em-template-tags.php

示例3: em_get_locations_list_shortcode

/**
 * Returns list of locations according to given specifications. Accepts any location query attribute.
 */
function em_get_locations_list_shortcode($atts, $format = '')
{
    $atts = (array) $atts;
    $atts['format'] = $format != '' || empty($atts['format']) ? $format : $atts['format'];
    $atts['format'] = html_entity_decode($atts['format']);
    //shorcode doesn't accept html
    $atts['page'] = !empty($atts['page']) && is_numeric($atts['page']) ? $atts['page'] : 1;
    $atts['page'] = !empty($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : $atts['page'];
    return EM_Locations::output($atts);
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:13,代码来源:em-shortcode.php

示例4: em_get_locations_list_shortcode

/**
 * Returns list of locations according to given specifications. Accepts any location query attribute.
 */
function em_get_locations_list_shortcode($args, $format = '')
{
    $args = (array) $args;
    $args['ajax'] = isset($args['ajax']) ? $args['ajax'] : !defined('EM_AJAX') || EM_AJAX;
    $args['format'] = $format != '' || empty($args['format']) ? $format : $args['format'];
    $args['format'] = html_entity_decode($args['format']);
    //shorcode doesn't accept html
    $args['limit'] = isset($args['limit']) ? $args['limit'] : get_option('dbem_locations_default_limit');
    if (empty($args['format']) && empty($args['format_header']) && empty($args['format_footer'])) {
        ob_start();
        if (!empty($args['ajax'])) {
            echo '<div class="em-search-ajax">';
        }
        //open AJAX wrapper
        em_locate_template('templates/locations-list.php', true, array('args' => $args));
        if (!empty($args['ajax'])) {
            echo "</div>";
        }
        //close AJAX wrapper
        $return = ob_get_clean();
    } else {
        $args['ajax'] = false;
        $args['page'] = !empty($args['page']) && is_numeric($args['page']) ? $args['page'] : 1;
        $args['page'] = !empty($_GET['pno']) && is_numeric($_GET['pno']) ? $_GET['pno'] : $args['page'];
        $return = EM_Locations::output($args);
    }
    return $return;
}
开发者ID:batruji,项目名称:metareading,代码行数:31,代码来源:em-shortcode.php

示例5: get_option

<?php

/*
 * Default Location List Template
 * This page displays a list of locations, called during the em_content() if this is an events list page.
 * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
 * You can display locations (or whatever) however you wish, there are a few variables made available to you:
 * 
 * $args - the args passed onto EM_Locations::output()
 * 
 */
$locations = EM_Locations::get(apply_filters('em_content_locations_args', $args));
$args['limit'] = get_option('dbem_events_default_limit');
$args['page'] = !empty($_REQUEST['page']) && is_numeric($_REQUEST['page']) ? $_REQUEST['page'] : 1;
if (count($locations) > 0) {
    echo EM_Locations::output($locations, $args);
} else {
    echo get_option('dbem_no_locations_message');
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:19,代码来源:locations-list.php

示例6: get_option

<?php

/*
 * Default Location List Template
 * This page displays a list of locations, called during the em_content() if this is an events list page.
 * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
 * You can display locations (or whatever) however you wish, there are a few variables made available to you:
 * 
 * $args - the args passed onto EM_Locations::output()
 * 
 */
$args['limit'] = get_option('dbem_locations_default_limit');
$args['page'] = !empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) ? $_REQUEST['pno'] : 1;
$args['offset'] = ($args['page'] - 1) * $args['limit'];
$args['pagination'] = true;
echo EM_Locations::output(apply_filters('em_content_locations_args', $args));
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:16,代码来源:locations-list.php


注:本文中的EM_Locations::output方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。