本文整理汇总了PHP中EM_Events::output_grouped方法的典型用法代码示例。如果您正苦于以下问题:PHP EM_Events::output_grouped方法的具体用法?PHP EM_Events::output_grouped怎么用?PHP EM_Events::output_grouped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EM_Events
的用法示例。
在下文中一共展示了EM_Events::output_grouped方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: em_get_events_list_grouped_shortcode
/**
* Creates a grouped list of events by year, month, week or day
* @since 4.213
* @param array $args
* @param string $format
* @return string
*/
function em_get_events_list_grouped_shortcode($args = array(), $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']);
//shortcode doesn't accept html
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/events-list-grouped.php', true, array('args' => $args));
if (!empty($args['ajax'])) {
echo "</div>";
}
//close AJAX wrapper
$return = ob_get_clean();
} else {
$args['ajax'] = false;
$pno = !empty($_GET['pno']) && is_numeric($_GET['pno']) ? $_GET['pno'] : 1;
$args['page'] = !empty($args['page']) && is_numeric($args['page']) ? $args['page'] : $pno;
$return = EM_Events::output_grouped($args);
}
return $return;
}
示例2: apply_filters
<?php
/*
* Default Events List Template
* This page displays a list of events, 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 events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*
*/
$args = apply_filters('em_content_events_args', $args);
if (get_option('dbem_css_evlist')) {
echo "<div class='css-events-list'>";
}
echo EM_Events::output_grouped($args);
//note we're grabbing the content, not em_get_events_list_grouped function
if (get_option('dbem_css_evlist')) {
echo "</div>";
}
示例3: em_get_events_list_grouped
/**
* Generate a grouped list of events by year, month, week or day.
* @since 4.213
* @param array $args
* @return string
*/
function em_get_events_list_grouped($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;
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/events-grouped.php', true, array('args' => $args));
if (!empty($args['ajax'])) {
echo "</div>";
}
//close AJAX wrapper
$return = ob_get_clean();
} else {
$return = EM_Events::output_grouped($args);
}
}