Add heading option to calendars, league tables, and player lists
This commit is contained in:
@@ -53,8 +53,13 @@ if ( $order != 'default' )
|
||||
$data = $calendar->data();
|
||||
$usecolumns = $calendar->columns;
|
||||
|
||||
if ( $show_title && false === $title && $id )
|
||||
$title = get_the_title( $id );
|
||||
if ( $show_title && false === $title && $id ):
|
||||
$caption = $calendar->caption;
|
||||
if ( $caption )
|
||||
$title = $caption;
|
||||
else
|
||||
$title = get_the_title( $id );
|
||||
endif;
|
||||
|
||||
if ( isset( $columns ) ) {
|
||||
$usecolumns = $columns;
|
||||
|
||||
@@ -62,8 +62,13 @@ if ( isset( $columns ) ):
|
||||
$usecolumns = explode( ',', $columns );
|
||||
endif;
|
||||
|
||||
if ( $show_title && false === $title && $id )
|
||||
$title = get_the_title( $id );
|
||||
if ( $show_title && false === $title && $id ):
|
||||
$caption = $calendar->caption;
|
||||
if ( $caption )
|
||||
$title = $caption;
|
||||
else
|
||||
$title = get_the_title( $id );
|
||||
endif;
|
||||
?>
|
||||
<div class="sp-template sp-template-event-list">
|
||||
<?php if ( $title ) { ?>
|
||||
|
||||
@@ -31,8 +31,13 @@ if ( ! isset( $highlight ) ) $highlight = get_post_meta( $id, 'sp_highlight', tr
|
||||
|
||||
$table = new SP_League_Table( $id );
|
||||
|
||||
if ( $show_title && false === $title && $id )
|
||||
$title = get_the_title( $id );
|
||||
if ( $show_title && false === $title && $id ):
|
||||
$caption = $table->caption;
|
||||
if ( $caption )
|
||||
$title = $caption;
|
||||
else
|
||||
$title = get_the_title( $id );
|
||||
endif;
|
||||
|
||||
$output = '';
|
||||
|
||||
|
||||
@@ -74,8 +74,13 @@ $output = '';
|
||||
if ( $grouping === 'position' ):
|
||||
$groups = get_terms( 'sp_position', array( 'orderby' => 'slug' ) );
|
||||
else:
|
||||
if ( $show_title && false === $title && $id )
|
||||
get_the_title( $id );
|
||||
if ( $show_title && false === $title && $id ):
|
||||
$caption = $list->caption;
|
||||
if ( $caption )
|
||||
$title = $caption;
|
||||
else
|
||||
$title = get_the_title( $id );
|
||||
endif;
|
||||
if ( $title )
|
||||
$output .= '<' . $grouptag . ' class="sp-table-caption">' . $title . '</' . $grouptag . '>';
|
||||
$group = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user