So, I am trying to create an events list shortcode that the visual editor can't mess with (see above). This means that I need all the html to build within the shortcode.
Can you help me with the syntax?
This is as far as I got (copying your shortcode code):
function em_my_get_events_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 '<ul class="myeventlist">' . EM_Events::output( $atts ) . '</ul>';
}
add_shortcode ( 'my_events_list', 'em_my_get_events_list_shortcode' );
The shortcode should look like this:
[my_events_list category="5"]
instead of this:
<ul class="myeventlist">[my_events_list category="5"]<li>#_EVENTDATES: #_EVENTLINK</li>[/events_list]</ul>
and the output should look like this:
<ul class="myeventlist">
<li>31/01/2012: <a href="#">An Event</a></li>
<li>12/02/2012: <a href="#">Another Event</a></li>
</ul>