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 BasketballPlayer( $player_selector )

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

To create a new basketball game object, you’ll need to use the Sports_Bench\Classes\Sports\Basketball\BasketballPlayer namespace and then use new BasketballPlayer( $player_selector ). If you’re using the player_id to create the team object, you must place (int) before the id number.

This class is a child class of the Player class and inherits all of the properties and methods of the Player class. If you’re using basketball as your sport, you should use the BasketballPlayer class in your customizations.

Class Methods


  • string|int $player_selector — The slug or id of the team player create the object for.

Since: 2.0


  • /includes/classes/sports/basketball/basketball-player.php — 31