Add option to show/hide event list title
This commit is contained in:
@@ -191,6 +191,14 @@ class SportsPress_Calendars {
|
||||
),
|
||||
|
||||
apply_filters( 'sportspress_event_list_options', array(
|
||||
array(
|
||||
'title' => __( 'Title', 'sportspress' ),
|
||||
'desc' => __( 'Display calendar title', 'sportspress' ),
|
||||
'id' => 'sportspress_event_list_show_title',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'desc' => __( 'Display logos', 'sportspress' ),
|
||||
|
||||
@@ -27,6 +27,7 @@ $defaults = array(
|
||||
'order' => 'default',
|
||||
'columns' => null,
|
||||
'show_all_events_link' => false,
|
||||
'show_title' => get_option( 'sportspress_event_list_show_title', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
extract( $defaults, EXTR_SKIP );
|
||||
@@ -54,7 +55,7 @@ if ( isset( $columns ) ):
|
||||
$usecolumns = explode( ',', $columns );
|
||||
endif;
|
||||
|
||||
if ( $id ) {
|
||||
if ( $show_title && $id ) {
|
||||
echo '<h4 class="sp-table-caption">' . get_the_title( $id ) . '</h4>';
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user