Shortcodes – Arguments for Sliders & Tickers

The shortcode arguments and their defaults for all the League Manager Sliders & Tickers are very similar. Below we start by listing the League Slider shortcode arguments and defaults, because they apply to all sliders and tickers with very few exceptions. Then we describe the few difference defaults for specific sliders and tickers types.

[If you are not a coder, please ignore the strange format below. For accuracy, the default arguments were cut directly from the code.
The strange looking strings, for example, __( ‘Results & Schedule’, ‘mstw-league-manager’ ), allow the WordPress translation engine to work. So these strings can be changed through the shortcode arguments, or via translation.]

League Slider Arguments

Almost all the arguments for league sliders apply to all slider and ticker types.

$defaults = array( 
  //
  // one of these is always required, 
  //	depending on slider type
  //
  'league'          => '',
  'school'          => '',
  'sport'           => '',
  'team'            => '',
	
  // 
  // (at least one) season is required. defaults to current year
  //
  'season'          => current_time( 'Y' ),
		
  //
  // Slider header settings
  //	the 'header' is the info bar at the top of the slider
  //
  'show_header'     => 1, // 0|1
	
  // the 'title' is on the left of the header
  'title'           => __( 'Results & Schedule', 'mstw-league-manager' ),
	
  // the 'link_label' is next to the title and, 'link' is the link's URL
  'show_link'       => 0,  // 0|1
  'link_label'      => '',
  'link'            => '',
	
  //
  // The 'message' appears on the far right of the header.
  // If show_message == 1, message_text will be displayed if not empty,
  //	ELSE the current date (WP date, not system date) will be displayed
  //	in the specified the message_format
  //
  'show_message'    => 1, // 0|1
  'message_text'    => '',
  //
  // Any legal PHP date/time format 
  // The default looks like 'Thu, 07 Dec 8:33 pm'
  //
  'message_format'  => 'D, d M g:i a',
	
  //
  // Show ALL games in the season by default
  //	0 eliminates any games marked as non-league
  //	This is a change for version 2.0
  //
  'show_nonleague'  => 1, // 0|1
	
  //
  // Show sport for each game
  // (Doesn't make sense for every slider type)
  //
  'show_sport'      => 0, // 0|1
	
  //
  // Show only completed games with final scores
  //
  'show_final_only' => 0, // 0|1
	
  //
  // Slider date-time controls
  //	Read the man page on date-time control
  //
  'first_dtg'       => '1970:01:01 00:00:00',	// only display games after this date & time
  'last_dtg'        => '2038:01:19 00:00:00',   // only display games before this date & time 
  'interval_days'   => '',
  'future_days'     => '',
  'past_days'       => '',
	
  //
  // Any valid PHP date format
  //	The default is Thu, 07 Dec
  //
  'date_format'     => 'D, d M',
	
  //
  // Any valid PHP time format
  //	The default is 7:30pm
  //
  'time_format'     => 'g:i a',
	
  //
  //	The game time is "To Be Announced" or "To Be Determined"
  //
  'tba_format'      => __( 'TBA', 'mstw-league-manager' ),						
 
  //
  // Team identification
  //
  'show_logos'      => 1, // 0|1
  'name_format'     => 'name-mascot', // name|short-name|mascot|name-mascot|hide	
						
  //
  // The location is the same as the venue. // It's pulled from the locations/venues database
  //	
  'show_location'   => 1, // 0|1
  'location_format' => 'stadium_city_state', // stadium|stadium_city|stadium_city_state
  );

School Slider Arguments

The school slider shows all the sports for a school. So if the sport display is turned off (show_sport = 0), the display will make no sense.

$school_defaults = array( 
  'title'           => __( 'School Schedule & Results', 'mstw-league-manager' ),
  //shows game sport by default
  'show_sport'      => 1,
  );

Sport Slider Arguments

Only the default header title changes.

$sport_defaults = array( 
  'title'           => __( 'Sport Schedule & Results', 'mstw-league-manager' ),
  );

Team Slider Arguments

Only the default header title changes.

$team_defaults = array( 
  'title'           => __( 'Team Schedule & Results', 'mstw-league-manager' ),
  );

Ticker Arguments

The changes for tickers all make the display smaller.

 $ticker_defaults = array( 						
  // Game block formatting - use shorter date & time formats than sliders
  
  'date_format'     => 'd M', // Any valid PHP date format. The default is 07 Dec 
  
  'time_format'     => 'g:i a', // Any valid PHP time format. The default is 8:30 pm
  // Note game times only appear for "today's" games
					   
  // Show the team logo, the short name, or no name(just the logo)
  'show_logos'    => 0,  // 0|1
  'name_format'   => 'short', // short | hide
   );