Add table heading option to widgets

This commit is contained in:
Brian Miyaji
2015-07-17 15:32:29 +10:00
parent f3c6a6878b
commit f7742a69cd
18 changed files with 162 additions and 53 deletions

View File

@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$defaults = array(
'team' => null,
'id' => null,
'title' => null,
'live' => get_option( 'sportspress_enable_live_countdowns', 'yes' ) == 'yes' ? true : false,
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
@@ -31,6 +32,9 @@ extract( $defaults, EXTR_SKIP );
if ( ! isset( $post ) ) return;
if ( $title )
echo '<h4 class="sp-table-caption">' . $title . '</h4>';
$title = $post->post_title;
if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false, true ) . '">' . $title . '</a>';
?>