Consistently use event prefix for calendar and list templates

Retain backwards compatibility
This commit is contained in:
Brian Miyaji
2014-03-22 17:21:56 +11:00
parent d433a58eb0
commit c30b7eb664
11 changed files with 45 additions and 110 deletions

View File

@@ -38,10 +38,10 @@ function sportspress_default_calendar_content( $content ) {
$format = get_post_meta( $id, 'sp_format', true );
switch ( $format ):
case 'list':
$calendar = sportspress_events_list( $id );
$calendar = sportspress_event_list( $id );
break;
default:
$calendar = sportspress_events_calendar( $id, false );
$calendar = sportspress_event_calendar( $id, false );
break;
endswitch;
$content = $calendar . $content;

View File

@@ -1,6 +1,6 @@
<?php
function sportspress_widget_text( $content ) {
if ( ! preg_match( '/\[[\r\n\t ]*(countdown|league-table|events-(calendar|list)|player-(list|gallery))?[\r\n\t ].*?\]/', $content ) )
if ( ! preg_match( '/\[[\r\n\t ]*(countdown|league-table|event(s)-(calendar|list)|player-(list|gallery))?[\r\n\t ].*?\]/', $content ) )
return $content;
$content = do_shortcode( $content );