Documentation

The codex has been updated for Sports Bench 2.0 which is slated for an early September release. This is to help those who have made their own customizations get ready for the 2.0 release which will be radically different from a code perspective. Learn more about the changes you can expect with the code in Sports Bench 2.0.

new Game( $game_id )

Used to create a Game object in the Sports Bench Plugin.

To create a new series object, you’ll need to use the Sports_Bench\Classes\Base\Game namespace and then use new Game( $game_id ).

Properties

  • $game_id
  • $game_week
  • $game_season
  • $game_day
  • $game_home_id
  • $game_home_final
  • $game_away_id
  • $game_away_final
  • $game_attendance
  • $game_status
  • $game_current_time
  • $game_current_period
  • $game_current_home_score
  • $game_current_away_score
  • $preview_link
  • $recap_link
  • $game_neutral_site
  • $game_location_stadium
  • $game_location_line_one
  • $game_location_line_two
  • $game_location_city
  • $game_location_state
  • $game_location_country
  • $game_location_zip_code

Class Methods

Parameters

  • int $game_id — The ID of the game to create the object for.

Since: 2.0

Source

  • /includes/classes/base/class-game.php — 37