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 Team( $team_selector )

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

To create a new series object, you’ll need to use the Sports_Bench\Classes\Base\Team namespace and then use new Team( $team_selector ). If you’re using the team_id to create the team object, you must place (int) before the id number.

Properties

  • $team_id
  • $team_name
  • $team_location
  • $team_nickname
  • $team_abbreviation
  • $team_active
  • $team_location_line_one
  • $team_location_line_two
  • $team_city
  • $team_state
  • $team_location_country
  • $team_location_zip_code
  • $team_stadium
  • $team_stadium_capacity
  • $team_head_coach
  • $team_logo
  • $team_photo
  • $team_division
  • $team_primary_color
  • $team_secondary_color
  • $team_slug

Class Methods

Parameters

  • string|int $team_selector — The team slug or id needed to create the team object.

Since: 2.0

Source

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