Use global linking options per post type
This commit is contained in:
@@ -15,7 +15,7 @@ $defaults = array(
|
||||
'status' => 'default',
|
||||
'date' => 'default',
|
||||
'number' => -1,
|
||||
'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
|
||||
'rows' => get_option( 'sportspress_calendar_rows', 10 ),
|
||||
'order' => 'default',
|
||||
|
||||
@@ -16,8 +16,8 @@ $defaults = array(
|
||||
'status' => 'default',
|
||||
'date' => 'default',
|
||||
'number' => -1,
|
||||
'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'link_venues' => get_option( 'sportspress_calendar_link_venues', 'yes' ) == 'yes' ? true : false,
|
||||
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'link_venues' => get_option( 'sportspress_link_venues', 'yes' ) == 'yes' ? true : false,
|
||||
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
|
||||
|
||||
@@ -27,7 +27,7 @@ $teams = get_post_meta( $id, 'sp_team', false );
|
||||
$status = $event->status();
|
||||
|
||||
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false;
|
||||
$link_posts = get_option( 'sportspress_event_link_players', 'yes' ) == 'yes' ? true : false;
|
||||
$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false;
|
||||
$sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false;
|
||||
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
||||
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
|
||||
|
||||
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
$defaults = array(
|
||||
'id' => get_the_ID(),
|
||||
'index' => 0,
|
||||
'link_posts' => get_option( 'sportspress_event_link_staff', 'yes' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_link_staff', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
$staff = array_filter( sp_array_between( (array)get_post_meta( $id, 'sp_staff', false ), 0, $index ) );
|
||||
|
||||
@@ -18,7 +18,7 @@ if ( ! $venues )
|
||||
return;
|
||||
|
||||
$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
|
||||
$link_venues = get_option( 'sportspress_event_link_venues', 'no' ) == 'yes' ? true : false;
|
||||
$link_venues = get_option( 'sportspress_link_venues', 'no' ) == 'yes' ? true : false;
|
||||
|
||||
foreach( $venues as $venue ):
|
||||
$t_id = $venue->term_id;
|
||||
|
||||
@@ -15,7 +15,7 @@ $defaults = array(
|
||||
'columns' => null,
|
||||
'show_full_table_link' => false,
|
||||
'show_team_logo' => get_option( 'sportspress_table_show_logos', 'yes' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_table_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
|
||||
|
||||
@@ -16,7 +16,7 @@ $defaults = array(
|
||||
'captiontag' => 'dd',
|
||||
'caption' => null,
|
||||
'size' => 'thumbnail',
|
||||
'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
extract( $defaults, EXTR_SKIP );
|
||||
|
||||
@@ -22,7 +22,7 @@ $defaults = array(
|
||||
'columns' => 3,
|
||||
'size' => 'thumbnail',
|
||||
'show_all_players_link' => false,
|
||||
'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
);
|
||||
|
||||
extract( $defaults, EXTR_SKIP );
|
||||
|
||||
@@ -18,8 +18,8 @@ $defaults = array(
|
||||
'orderby' => 'default',
|
||||
'order' => 'ASC',
|
||||
'show_all_players_link' => false,
|
||||
'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
'link_teams' => get_option( 'sportspress_list_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
||||
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
||||
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
|
||||
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
|
||||
|
||||
Reference in New Issue
Block a user