Exemplo n.º 1
0
}
// end class ec3_ec3xml
/*@header('Content-type: text/xml; charset=' . get_option('blog_charset'));
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'" standalone="yes"?>'."\n";*/
// Turn off EC's content filtering.
@header('Content-type: text/xml; charset=UTF-8');
$xml = '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" standalone="yes" ?>';
remove_filter('the_content', 'ec3_filter_the_content', 20);
remove_filter('get_the_excerpt', 'ec3_get_the_excerpt');
add_filter('get_the_excerpt', 'wp_trim_excerpt');
global $ec3, $wp_query;
$options = array();
if ($wp_query->is_month) {
    $options['num_months'] = 1;
}
$calobj = new ec3_ec3xml($options);
switch (ec3_get_listing_q($wp_query)) {
    case 'E':
        $calobj->add_events($wp_query);
        break;
    case 'P':
        $calobj->add_posts($wp_query, !$ec3->advanced);
        break;
    default:
        $calobj->add_events($wp_query);
        $calobj->add_posts($wp_query, !$ec3->advanced);
}
ob_clean();
$xml .= '<calendar>';
$xml .= $calobj->generate();
$xml .= '<details id="details">';