Sports Bench WordPress Package

Sports Bench comes in two parts — a plugin and a theme. Both the plugin and theme work on their own; however, it’s suggested that you use both to get the most out of both products.

Plugin

Creating and keeping up with sports league stats on the internet can be a hassle. Fortunately, the Sports Bench plugin takes all of the hard work away from you. After a simple five-minute (or less) setup, you’re ready to start entering teams, players, games and even division and then watch the plugin do all of the other stuff for you. Sports Bench takes care of accumulating the stats you enter as well as the standings and schedules.

The plugin has the ability to display the standings, a scoreboard of all game for the current season and statistical leaderboards. Show off game stats next to a recap of a game. Easily create pages for teams and players. And shortcodes allow you to show game, player or team information in any post. And if you use the theme, all of this comes with minimal front-end coding work for you. You have enough to worry about with managing your sports league; let us take care of the hard part.

Theme

The Sports Bench theme is the perfect way to use the Sports Bench plugin out of the box with no need to add any code to make the core functionality work. The Sports Bench theme includes page templates for the standings, scoreboard, stats leaderboards, teams and players. It also includes the scoreboard bar, a featured post slideshow, infinite scrolling posts on the homepage and implements the longform post feature included in the Sports Bench plugin.

Sports Supported:

  • Baseball
  • Basketball
  • Football
  • Hockey
  • Rugby
  • Soccer
  • Volleyball

Details

Requires at least: 4.7
Tested up to: 4.9.8
Stable tag: 1.7

Features

Team Page

Plugin

Sports Bench makes it easy for you to have a centralized location for each team in the league with team pages. If you’re using the Sports Bench theme, this requires no setup. But even if you’re not, our functions and guides will have you setup with a team page template that will match your theme in no time.

Player Page

Plugin

This plugin also makes it easy for you to have a centralized location for each player in the league with player pages. If you’re using the Sports Bench theme, this requires no setup. But even if you’re not, our functions and guides will have you setup with a player page template that will match your theme in no time.

Playoffs

Plugin

You can now easily create playoff brackets to show who your league’s champion is. Create a 2, 4, 6, 8, 12, 16, 32 or 64 team single elimination bracket or a four-team double elimination bracket. And the front end display is easy. Just select the playoff shortcode, select the bracket and watch it do its work. The display is written to work with any size screen, so all of your readers will be able to see who the true champion is.

Divisions

Plugin

Sports Bench makes it easy to organize teams via conferences and/or divisions. Simply add the division or conference and then sort the teams into them.

Standings

Plugin

Show where teams are in the standings with ease. The plugin keeps track of the standings with minimal need for user input. You can show league, conference or division standings, whichever works for you.

Scoreboard

Plugin

Display upcoming, current or completed games with an easy-to-use scoreboard. You can create a separate scoreboard page with only the need to call one function, or you can add a scoreboard bar to the top of your header.

Stats Leaderboard

Plugin

Show who’s the best in different statistical categories with Sports Bench’s stats leaderboard. Simply select which stats you wish to show and they’ll show up on the page. The stats show the top ten players, but users can load more for each stat with a simple click.

Stat Search

Need to figure out what the record is for a particular stat? Need to see if anybody’s done something before? You and your visitors can search for stats with an easy-to-use player stat search. This can be used on the front and back end so anyone can look up just about any stat.

Game Recaps

Plugin

Show off stats from a game in a nice sidebar area to go along with a post. It’s perfect for a game recap, where the text or even video recap can be in the main area with the stats off to the side. The recap stats are made to be used with any sidebar to match the theme you are using.

Widgets

Plugin

Sports Bench comes with three ready-to-go widgets to display in the sidebar. You can display standings, the scoreboard and the leaderboard for a stat in the sidebar. The widgets are also created to blend with you sidebar to match the theme.

Gutenberg Blocks

Plugin

The plugin comes with custom Gutenberg blocks ready to go when the new Gutenberg editor is rolled into WordPress core. These blocks can be used to show page templates, games, playoff brackets, rivalries and more!

Shortcodes

Plugin

The plugin also comes with 11 different shortcodes that you can use to display information in a post. In the post editor, click the ‘SB’ logo to open up a modal where you can select between a game, team, player, scoreboard, standings, stats, playoff bracket, rivalry, player page, team page or game recap shortcode to display information to add to your posts.

WP REST API Integration

Plugin

JavaScript frameworks and the WP REST API are the hot thing in web development. If you’re creating a site that uses the REST API and any of the popular frameworks, Sports Bench has the tools to help you.

CSV Upload

Plugin

Already have a database set up for your league? Well we make it easy for you to bring it over and set up with Sports Bench. Simply export each table you need – divisions, games, game info, game stats, players, brackets, series and teams – and use our CSV uploaded to add the information. The CSV import page will walk you through the process to make sure you’re all set. And if you need to migrate your site, you can also export each of the tables into a CSV file to safely move the data to another site with Sports Bench or just for safe keeping.

Sports Bench Plugin Integration

Theme

The Sports Bench theme is designed and coded with the Sports Bench plugin in mind. While the theme works on its own like any other WordPress theme, it works best with the plugin. This is perfect for users with no coding experience as everything has already been taken care of. Simply activate the theme and plugin, setup the plugin options and you’re on your way.

Homepage Slider

Theme

Show off your best or most important stories with the featured post slider on the homepage. Simply select a category in the theme options and add posts to that category to see them displayed in the full-width slider. You can control how many posts are shown on the slider. The preferred image ratio is 2.56:1, with a relatively large image so that it stretches across the page.

Customizable Homepage

Theme

Readers won’t have to go very far to find your stories when they come to your website. In addition to showing your latest posts, you can also add tabs for selected categories so readers can peruse them without leaving the homepage.

Infinite Scroll

Theme

Your readers won’t have to worry about the hassle of navigating through pages of posts to find their favorite stories thanks to infinite scroll. Readers will just have to keep scrolling down in order to load more posts rather than wait for a new page to load, saving them time and frustration. This works on the home and archive pages.

Custom Header

Theme

Add your personal branding to the website with a custom logo. The logo displays on the left side of the top menu. The suggested size for the header is 200px by 40px.

Site Logo

Theme

In addition to the site header, you can also add branding with a custom site logo. The logo will appear down in the footer and can also be added into templates wherever you need it. WordPress advises that the site logo be 512px by 512px.

Social Media Links

Theme

Show off links to your social media sites in the header with ease. Simply enter the URL for the desired social media platform in the theme options and the image and links will automatically appear in the header.

Longform Template

Theme

Have a special story that you want to tell in a special way? Sports Bench makes that easy with the longform feature. Select the longform post template in the “Post Attributes” section of the post editor to see your story displayed in a unique way.

Home Page
Single Post
Single Recap Template
Single Preview Template
Playoffs
Standings Page
Scoreboard Page
Stats Page
Teams Page
Single Team Page
Players Page
Single Player Page
Admin Divisions Page
A screenshot of a cell phone
Admin Teams Page
Admin Single Team
A screenshot of a cell phone
Admin Players Page
A screenshot of a cell phone
Admin Single Player
Admin Games Page
Admin Single Game
A screenshot of a cell phone
A screenshot of a cell phone
A screenshot of a cell phone

How To's

Installation

Plugin

Via WordPress Dashboard
  1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the plugin only, ignore this step.
  2. In the WordPress admin area, go to Plugins->Add New. Then hit “Upload Plugin” at the top of the subsequent page.
  3. Select the zipped plugin directory (i.e. sports-bench-1.0.zip) and hit “Install Now”.
  4. After the plugin is installed, click “Activate” to start using the theme.
  5. Go to the “Setup” section of this ReadMe file to get the plugin rolling for your use.
VIia FTP Upload
  1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the plugin only, ignore this step.
  2. Unzip the zipped plugin directory (i.e. sports-bench-1.0.zip).
  3. Upload the sports-bench directory inside the now-unzipped directory to the plugin directory on your site (located inside of the wp-content directory).
  4. In the WordPress admin area, go to the Plugins page and hit “Activate” underneath the Sports Bench listing on the page to begin using the theme.
  5. Go to the “Setup” section of this ReadMe file to get the plugin rolling for your use.

Theme

Via WordPress Dashboard
  1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the theme only, ignore this step.
  2. In the WordPress admin area, go to Appearance->Themes. Click the “Add New” button at the top of the page and then hit “Upload Theme” at the top of the subsequent page.
  3. Select the zipped theme directory (i.e. sports-bench-1.0.zip) and hit Install now.
  4. After the theme is installed, click “Activate” to start using the theme.
Via FTP Upload
  1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the theme only, ignore this step.
  2. Unzip the zipped theme directory (i.e. sports-bench-1.0.zip).
  3. Upload the sports-bench directory inside the now-unzipped directory to the themes directory on your site (located inside of the wp-content directory).
  4. In the WordPress admin area, go to Appearance->Theme and hit “Activate” underneath the Sports Bench listing on the page to begin using the theme.

Setting Up Sports Bench

So now you’ve got the plugin installed and activated. Before we get too far along, we need to set up a few plugin settings so that you’re ready to go.

  1. Go to the Sports Bench Options page after activating the plugin. The link can be found in the admin menu on the left side.
  2. First, select a sport. Currently, baseball, basketball, (American) Football, Hockey and Soccer (Football) are supported. Please note that if you select a sport, comeback to the option and change it, all games will be lost.
  3. Add the current season. The default is the current year. Please make note of how you format the year(s) here. You’ll need it when you start to create games later on. Make sure to update this setting when you start a new season.
  4. Determine whether or not you want to display games by week or not. This option determines how games are shown on the scoreboard. If you don’t select this option, you can disregard the “Week” field when creating games. Otherwise, next enter the current week of the season. You’ll update this setting a lot.
  5. If you have a or want a page to show team pages, select the page that is using the team page template. This will direct team links to this page. If you haven’t created the page for the teams, you can come back to this later. We’ll get into more detail later on in the guide.
  6. If you have a or want a page to show player pages, select the page that is using the player page template. This will direct player links to this page. If you haven’t created the page for the players, you can come back to this later. We’ll get into more detail later on in the guide.

Creating a Division

All right, now we’ve got our settings taken care of we can start adding some data. At first you’ll probably be tempted to create teams right now, but most leagues divide their teams up into divisions, conferences or leagues, so let’s start there first. This way it will be much easier once we start adding teams.

  1. To start adding divisions, hover over the “Teams” item in the menu in the admin area of your site. Then click on “Divisions” in the submenu that appears.
  2. The divisions page is set up nearly identical to the categories page in WordPress where the divisions are listed on the right and you can add divisions or conferences on the left.
  3. To add a division or conference, first fill out the name of the division or conference.
  4. Then select if this is a division or a conference.
  5. If this is a conference, select the color for the conference. This is optional, but the color appears a border between the table head and table body wherever the standings appear.
  6. If this is a division, select the conference the division belongs to. The recommended practice is to add conferences first and then add divisions, if that is your set up.
  7. Then hit save. The page will reload and your new item will show up on the left. Repeat this process until all of your divisions and conferences are added.

Creating a Team

At this point we’ve installed the plugin, got the settings taken care of and added our conferences and divisions. Now it’s finally time to add in the teams.

  1. To start adding teams, hover over the “Teams” item in the admin area of your site. Then click “Add New” in the submenu that appears.
  2. Starting at the top, add the full team name (i.e. Texas Rangers, Seattle Seahawks, FC Dallas).
  3. Then enter the team location. If the team has a location and nickname, put just the city or state (i.e. Texas, Seattle). If the team has no nickname, like FC Dallas or D.C. United, put the full name here again and leave the nickname field next blank.
  4. Enter in the nickname of the team if there is one (i.e. Ranger, Seahawks).
  5. Next enter the three or four letter abbreviation of the team (i.e. TEX, SEA, FCD).
  6. Next select whether the team is active or inactive. The default setting is always active. This only changes to inactive if the team takes a hiatus or folds.
  7. Then enter the city and the state where the team is located.
  8. Next enter the stadium name and the capacity of the stadium.
  9. Then enter the name of the head coach.
  10. Next select what division or conference the team is placed in.
  11. Then enter the primary and secondary colors for the team.
  12. Next, on the right hand side, upload the team’s logo.
  13. Then you can add a photo of the team below the logo. This is an optional item.
  14. Finally, hit save at the bottom. You’ve now created your first team. Congrats! Now repeat these steps to add your remaining teams.

Creating a Player

So we’ve added our teams. Now it’s time to add our players to these teams.

  1. To start adding players, hover over the “Players” item in the admin area of your site. Then click “Add New” in the submenu that appears.
  2. Enter in the first and last name of the player.
  3. Then select the team the player plays for, or select “Free Agent” if the player has no team.
  4. Next use the date picker to select the player’s birthday.
  5. Then either enter or select the position the player page.
  6. Next add the height and weight of the player if you want to.
  7. Then enter the city and state name of the player’s hometown if you so wish.
  8. Add a photo of the player on the right side of the page, if you wish.
  9. Finally, hit save at the bottom. You’ve now created your first player. Congrats. Now repeat these steps to add your remaining players.

Creating a Game

So we’ve added our teams and their players. Now it’s time to add games to the schedule. This is the most complicated of the admin pages associated with the plugin, but if you follow these steps, you’ll have no issue adding games and game stats.

  1. To start adding games, hover over the “Games” item in the admin area of your site. Then click “Add New” in the submenu that appears.
  2. Select the home and away teams for the game.
  3. Then select whether this game is a scheduled game, a game in progress or a game that is final.
  4. If this is a game that’s in progress, another section will appear below. Here you’ll enter the current score for the home and away teams and the current time and period (or minute of the match for soccer or inning for baseball) of the game.
  5. In the game information row, enter the season the game is taking place in. If you’re sorting your games by week, add the week number. Then add the date and time of the game and the attendance of the game (if applicable).
    • If this game is listed as a scheduled game, you don’t need to go any further. Hit save right here and you’re done! You’ve added your first game. Otherwise, continue on.
  6. In this next section, add the scoreline for the game. If this is a baseball game, enter in the runs, hits, errors and men/women left on base. Otherwise, enter the scoring by quarter, period or half. The final column on the right will automatically add up the total for each team.
  7. Next add the game/match events for the game. This differs from sport to sport, but the column headings wil point you in the right direction. You can add as many game events as needed with the button at the bottom. You can also remove game events with the remove button at the end of each row.
    • Note: Basketball games do not have this section.
    • If this game is listed as an in-progress game, you don’t need to go any further. Hit save right here and you’re done! You’ve added your first game. Otherwise, continue on.
  8. Then add in the team stats for the game. Again, this differs depending on the sport, but the titles in the center will help you along.
  9. Next add in the individual player stats for the home and away teams. The players will be loaded in a dropdown on the left when you select the teams at the top. Again, the stats you’ll need to enter differ depending on the sport, but the column headings will guide you along. You can add as many players as you need with the button at the bottom of each section. You can also remove players with the remove button at the end of each row.
  10. Finally, hit the save button at the bottom of the page. You’ve now created your first game complete with all of the stats. Congrats! Now just repeat the process whenever you need to add or edit games.

Creating a Playoff Bracket

Okay so now an entire season has gone by and it’s time for playoffs. (And yes Jim Mora, we’re talking about playoffs). Sports Bench makes it easy for you to create playoff brackets to show off who your one true champion really is.

  • To add a playoff bracket, hover over the “Playoffs” item in the admin area of your site. Then click “Add New” in the submenu that appears.
  • Next give the bracket a name. Then select the number of teams that will be in the tournament, select whether it’s a single or double elimination tournament and then select the season the bracket takes place in.
  • For each playoff match up, select both teams from the dropdowns provided. Give each of them their seeding (if applicable). Then select whether this is a one, two, three, five or seven game series. Finally, select the game that applies to each game in the series from the dropdowns below.
  • Repeat the previous step until the bracket is filled out as much as it can be. The score section on the right will update automatically, but you will have to select the winners by hand like the previous step.
  • When you’re done, hit save. And that’s it. You’ve created your first playoff bracket!

Adding Scoreboard, Standings and Stats Pages

All right, so we’ve got the plugin installed and setup. We have our divisions, teams, players and some games. Now how will we display this data. Fortunately, Sports Bench makes it easy for you to display standings, scoreboards and stats leaderboards on pages (and even posts) thanks to shortcodes. This section will take you through how to do that.

  • First start a new page or post. Then click the “SB” logo near the top of the visual editor. This will open up a modal where you can select a number of different shortcodes.
  • If you want to add a scoreboard, select “Scoreboard” and then hit insert. Now when you view the page or post, a scoreboard will be displayed.
  • If you want to add standings, select “Standings” and then hit insert. Then a few options will appear below the editor. If it doesn’t appear right away, give it a few seconds. In the options, you can show league, conference and division standings and show home, away, division and conference records and points for and against and points differential. You can add and remove items if you need to using the buttons in the options.
  • If you want to add a stats leaderboard, select “Stats” and then hit insert. Then an options panel will appear below the editor. Here, you can chose which stats show up on the page. You can add as many stats as you like to the page.
  • That’s it. You can create pages that show a scoreboard, standings and stats without writing a single line of code!

Using the Shortcodes

But your shortcode options aren’t just limited to standings, you can also use shortcodes to show playoff brackets, game information, players and teams.

  • To begin using a shortcodes, first start a new page or post. Then click the “SB” logo near the top of the visual editor. This will open up a modal where you can select a number of different shortcodes.
  • If you want to add a game shortcode, select “Game” and then select a season. From there, select a game from that season. The shortcode will then show the teams competing in the game as well as the time, date and location of the game. If the game is finished and has a recap, a link to the recap will show as well.
  • If you want to add a player shortcode, select “Player” and then select a player from the list that appears. The shortcode will display the player’s photo and information and their recent stats.
  • If you want to add a team shortcode, select “Team” and then select a team from the list that appears. The shortcode will display the team’s logo and information and their recent games and upcoming schedule.
  • If you want to add a playoff shortcode, select “Playoff Brackets” and then select a playoff bracket from the list that appears. This will display the bracket in table form on the front end.
  • If you want to add a rivalry shortcode, select “Rivalry” and then select the two teams that you want to display stats for. This will display the series records between the two teams and their recent results against each other.
  • If you want to add a team page shortcode, select “Team Page”. Next, please find the “Creating a Team Page” section of the guide and follow those instructions.
  • If you want to add a player page shortcode, select “Player Page”. Next, please find the “Creating a Player Page” section of the guide and follow those instructions.
  • If you want to add a game recap shortcode, select “Game Recap” and then select the game you want to show a recap for.
  • That’s it. You can now display a lot of cool information in your posts and pages without writing a single line of code!

Using the Widgets

Want to display information that appears in the sidebar wherever your viewers go? Sports Bench has widgets so you can display a scoreboard, standings and stats on every page with a widget area.

  • Navigate to the Widgets page in the admin area.
  • To add a scoreboard widget, click and drag the “Sports Bench Scoreboard” widget to the desired widget area. Give it a title and hit “Save”. That’s it.
  • To add a standings widget, click and drag the “Sports Bench Standings” widget to the desired widget area. Give it a title, select whether it will show the league, conference or division standings and then hit “Save”. That’s it.
  • To add a stats widget, click and drag the “Sports Bench Statistic” widget to the desired widget area. Give it a title, select which statistic to show and then hit “Save”. That’s it.

Setting Up the Teams Page Template

Okay so you’ve created a new page template and shown player information. Now we’re going to do the same for teams, but the level of difficulty is going to go up a bit. But don’t worry. Once again, if you follow these directions, you’ll be feeling like a real programmer by the time it’s over. And if you want, there’s a shortcode you can use to create the team page instead.

Using the Team Page Shortcode

  1. First, create a new page. Then in the new page create a new shortcode. To do this, click the “SB” button in the TinyMCE editor at the top.
  2. In the window that now appears, select “Team Page” and then insert. Then hit “Publish”.
  3. Next, navigate to the Sports Bench Options page. It should be in the menu on the left in the admin.
  4. In the options page, select your new page for the Team Page option and then hit save.
  5. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
  6. And that’s it. Your team page is ready to go. And you didn’t even need to write a single line of code.

Using a Team Page Template

Introducing the Team Class

Before we get going too far, let’s introduce the Sports_Bench_Team class.

Once again, if you’re not too familiar with PHP or object-oriented programming, just know that adding the following to your code essentially calls the team from the database and populates it attributes without you having to write more code.

<?php $team = new Sports_Bench_Team( (int){{team_id}} ); ?>

Note that the team id will need to be an actual integer number.

From here, you can get the team name, location and so much more. In fact, here’s a list of the available attributes you can call, plus one function we’ll use to set up this page.

  • $team->team_id
  • $team->team_name
  • $team->team_location
  • $team->team_nickname
  • $team->team_abbreviation
  • $team->team_active
  • $team->team_city
  • $team->team_state
  • $team->team_stadium
  • $team->team_stadium_capacity
  • $team->team_head_coach
  • $team->team_logo
  • $team->team_photo
  • $team->team_division
  • $team->team_primary_color
  • $team->team_secondary_color
  • $team->player_slug
  • $team->team_slug
  • $team->get_schedule()
  • $team->get_roster()
  • $team->get_team_photo()
  • $team->get_division_name()

So now that we’ve gone over something we’ll be using here, let’s start building the player page, shall we? If you want to learn more about the Player class and the other classes, please visit the codex page on the Sports Bench website.

Building the Team Page

Like the player page, creating the team page involves creating a new page template. It’s a simple concept in WordPress, but if you’re unfamiliar with it, you can read this, this and this tutorial on how to do that. Otherwise, let’s get started.

  1. So first off, create a new page template in your theme’s main directory. Name it page-team.php
  2. Next, copy the contents of your theme’s page.php file and paste it into this new page template file.
  3. At the top underneath the opening php tag, paste the following:
    Template Name: Team
  4. Now, this is where things get a bit trickier. In this file, look for the get_sidebar() function. If this is wrapped in a div tag that has a class or id of “widget” or sidebar, then don’t do anything with it. Otherwise, find your theme’s sidebar.php In this file look for a div tag with a class or id of “widget” or “sidebar”. Copy this div and paste it in the new template file above the get_sidebar function. Make sure the closing </div> tag is there as well.
  5. Once you’ve done that, take a quick breather. We’re going to divide the rest of this into two parts: the main body and the sidebar.

Building the Main Body of the Page

  1. Like the player page, find the loop and delete everything within either a main or article div. Then inside of that, paste the following lines of code:
    					<?php if ( class_exists( 'Sports_Bench_Team' ) ) { ?>
    						<?php if ( get_query_var( 'team_slug' ) ) { ?>
    						<?php } else { ?>
    						<?php } ?>
    					<?php } ?>
    
  2. Then inside the else part of the statement, paste the following code: <?php echo sports_bench_show_team_listing(); ?>.
  3. The rest of this section will deal with code going inside the <?php if ( class_exists( 'Sports_Bench_Team' ) ) { ?> section.
  4. To show the team photo, insert the following lines:
    				<div class="team-photo">
                    	<?php echo $team->get_team_photo( 'team-photo' ); ?>
    				</div>
    
  5. To show the team logo, insert the following lines:
    					<div class="team-logo">
    						<?php echo $team->get_team_photo( 'team-logo' ); ?>
    					</div>
    
  6. To show the team name, insert the following lines:
    					<div class="team-name">
    						<h1 class="team-title" style="color:<?php echo $team->team_primary_color; ?>"><?php echo $team->team_name ?></h1>
    					</div>
    
  7. Then, to show the team stats, insert the following lines:
    				<div id="team-stats" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
    					<h4><?php echo get_option( 'sports-bench-season-year' ) . ' ' . __( 'Stats', 'sports-bench' ); ?></h4>
    					<?php echo sports_bench_get_players_stats_table( sports_bench_get_players_stats( $team->team_id,  '"' . get_option( 'sports-bench-season-year' ) . '"' ) ); ?>
    				</div>
    
  8. Finally, to show the team’s roster, insert the following lines:
    				<div id="team-roster" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
    					<h4><?php _e( 'Roster', 'sports-bench' ); ?></h4>
    					<?php echo sports_bench_show_roster( $team->team_id ); ?>
    				</div>
    
  9. All right, that’s it for the main body of the page template. Now let’s finish off the template with the sidebar.

Adding in the Sidebar

This part will be a bit challenging, but again, if you follow the directions here, you’ll do just fine. If you want, you can use this code to sort of give you a guide through what it should look like.

  1. First we need to add a conditional to see if this is a page for a single team or not. So where the get_sidebar function is in your page template, place the lines of code below. If the function is wrapped in a div with a class of “widgets” or “sidebar”, place this code inside that div and disregard that same div in the following code.
    				<?php if ( isset( $team ) ) { ?>
    					<div id="sidebar1" class="sidebar">
    					</div>
    				<?php } else { ?>
    					<?php get_sidebar(); ?>
    				<?php } ?>
    

    It should go without saying that this will replace the original get_sidebar function in your template file.

  2. The remainder of the code will go inside the <?php if ( isset( $team ) ) { ?> section. Now, to show the schedule, place the following lines of code:
    				<aside id="schedule-info" class="widget" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
                    	<h4 class="widgettitle"><?php echo $team->team_name . ' ' . get_theme_mod( 'sports-bench-season-year' ) . ' ' . __( 'Schedule', 'sports-bench' ); ?></h4>
    					<?php echo sports_bench_show_team_schedule( $team->team_id ); ?>
                    </aside>
    
  3. To show the division or conference standings for the team, place the following lines of code:
    				<aside id="standings" class="widget" style="border-top: 2px solid <?php echo $team->team_secondary_color; ?>">
                        <?php global $wpdb;
                        $table = $wpdb->prefix . 'sb_divisions';
                        $querystr = "SELECT * FROM $table WHERE division_id = $team->team_division;";
                        $division = $wpdb->get_results($querystr);
                        $division_title = $division[ 0 ]->division_name . ' ' . __( 'Standings', 'sports-bench' ); ?>
                        <h4 class="widgettitle"><?php echo $division_title; ?></h4>
    					<?php echo sports_bench_team_division_standings( $team->team_division ); ?>
                    </aside>
    
  4. Finally, to show some more team information, add the following lines of code:
    				<aside id="team-info" class="widget clearfix" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
                        <h4 class="widgettitle"><?php _e( 'Team Info', 'sports-bench' ); ?></h4>
    					<?php echo sports_bench_show_team_info( $team->team_id ); ?>
                    </aside>
    

Setting up the Team Template

Okay, we’re almost done with the team page template, but now we need to add the actual page to the site.

  1. Create a new page and name it “Teams”.
  2. On the right-hand side, look for “Page Attributes”. Then select “Team”. Then hit publish.
  3. Next, go to Sports Bench Settings. Find the Team Page setting and then select this newly created page. Hit “Publish”.
  4. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
  5. Now navigate to your newly created team page and enjoy your hard work. You deserve it.

That’s it! You’ve now completed creating a template for the teams in your league. It’s now a one-stop-shop for all team information. Confidence in your coding skills continuing to go up? Great! We’re about to take another step up in difficulty. But you’ll do fine.

Setting Up the Players Page Template

Okay, so you’re almost complete getting everything going with your website and Sports Bench. But now we’re getting into the challenging part. However, there’s good news. With Sports Bench 1.3, you can add a player page template with a simple shortcode. Or you can learn and dig into the code and do it that way. Both ways will be shown here.

Using the Player Page Shortcode

  1. First, create a new page. Then in the new page create a new shortcode. To do this, click the “SB” button in the TinyMCE editor at the top.
  2. In the window that now appears, select “Player Page” and then insert. Then hit “Publish”.
  3. Next, navigate to the Sports Bench Options page. It should be in the menu on the left in the admin.
  4. In the options page, select your new page for the Player Page option and then hit save.
  5. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
  6. And that’s it. Your player page is ready to go. And you didn’t even need to write a single line of code.

Using a Player Page Template

Introducing the Player Class

Before we get going too far, let’s introduce a simple concept that you’ll use here and elsewhere if you want to customize your site even further. Sports Bench comes with three classes: Sports_Bench_Game, Sports_Bench_Player and Sports_Bench_Teams. Here we’ll just look at the player class.

If you’re not too familiar with PHP or object-oriented programming, just know that adding the following to your code essentially calls the player from the database and populates it attributes without you having to write more code.

<?php $player = new Sports_Bench_Player( (int){{player_id}} ); ?>

Note that the player id will need to be an actual integer number.

From here, you can get the player’s first name, last name and so much more. In fact, here’s a list of the available attributes you can call, plus one function we’ll use to set up this page.

  • $player->player_id
  • $player->player_first_name
  • $player->player_last_name
  • $player->player_photo
  • $player->player_position
  • $player->player_home_city
  • $player->player_home_state
  • $player->player_date_of_birth
  • $player->team_id
  • $player->player_weight
  • $player->player_height
  • $player->player_slug
  • $player->get_player_photo()

So now that we’ve gone over something we’ll be using here, let’s start building the player page, shall we? If you want to learn more about the Player class and the other classes, please visit the codex page on the Sports Bench website.

Building the Player Page

So creating the player page involves creating a new page template. It’s a simple concept in WordPress, but if you’re unfamiliar with it, you can read this, this and this tutorial on how to do that. Otherwise, let’s get started.

  1. So first off, create a new page template in your theme’s main directory. Name it page-player.php
  2. Next, copy the contents of your theme’s page.php file and paste it into this new page template file.
  3. At the top underneath the opening php tag, paste the following:
    Template Name: Player
  4. Look at the body of your new page template’s contents. First find the Loop. If you’re unfamiliar with the loop, look for a section that looks like if ( have_posts() ) : while( have_posts() ) : the_post();. Inside of that, look for a <main> or <article> tag and delete everything inside of that.
  5. Replace the now-deleted code with the following:
    				<?php if ( class_exists( 'Sports_Bench_Player' ) ) { ?>
    					<?php if ( get_query_var( 'player_slug' ) ) { ?>
    					<?php } else { ?>
    					<?php } ?>
    				<?php } ?>
    
  6. From here, let’s get the simple part out of the way first. Inside the else statement, place the following line of code:
    <?php echo sports_bench_show_team_player_select(); ?>
    This will show a dropdown of teams to pick players from if there’s no player slug in the url. For a live look at what this does, click here.
  7. With that out of the way, let’s get to the fun part. Inside of the if ( get_query_var( 'player_slug' ) ) statement, first add the following:
    				<? if ( get_query_var( 'player_slug' ) ) {
    				$player = new Sports_Bench_Player(get_query_var('player_slug'));
    				$team = new Sports_Bench_Team((int)$player->team_id);
    				} ?>
    
    				<div class="player-info">
    					<?php echo sports_bench_show_player_info( $player->player_id ); ?>
    				</div>
    

    This will display the player’s photo and his/her name, height, weight, position, age and hometown if those are entered. You might have to do some styling to get the section to match your theme’s style.

  8. Finally, below the code you just pasted, place the following lines of code:
    				<div id="player-stats" class="widget" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
    					<h4 class="widgettitle"><?php echo __( 'Career Stats', 'sports-bench' ); ?></h4>
    					<?php echo sports_bench_get_season_stats( $player ); ?>
    				</div>
    

    This will show a table of the player’s career stats by season. And if you click on a season, you’ll see the game-by-game stats. And the best part, that functionality requires no code from you.

  9. Now, go create a new page. Title it “Players”. Then go down on the right side of the editor to the “Page Attributes” section and select “Player” from the page template dropdown.
  10. Next, go to the Sports Bench Settings page inside the Customizer. Then find the Player Page option and select the page you’ve just created. Then hit publish.
  11. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
  12. Then navigate to that page. You should now see the dropdown. Pick a team and then click on a player. And now you should see his/her player page.

And that’s it! You’ve survived some intermediate coding and you’ve created a really cool player page that you can show off. You’re harnessing the power of Sports Bench. Confidence going up? Good. We’re going to take another step higher in the next section. But for now, admire your work.

Adding Game Recaps and Previews

We are so close to the finish line. You’re doing great, but now we’ve reached our toughest challenge yet. However, with this as your guide, you’ll be done with it in no time.

This section deals with post templates. Introduced in WordPress 4.7, post templates work the same as page template, but obviously with post types and an extra line of code. This is also why WordPress 4.7 is required for this plugin.

This section will cover creating game preview and game recap post templates. We’ll start easy first with game previews.

Creating the Game Preview Template

There are two ways you can create game previews. The easiest is to use the “Game” shortcode. To do this, add a new post and then hit the “SB” at the top of the editor. Then select game and then the game you want to show. And that’s all you need. If you want to create a custom post template for previews, use the directions below.

  1. Like the player and team templates, create a new php file and name it page-game-preview.php. But now, copy the contents of your theme’s single.php file. And we’re also going to leave the loop untouched. Our focus is on the sidebar.
  2. Again, like the player team templates, add the following lines of code to right after the opening php tag. Note the extra line which helps WordPress realize that this is intended for posts and not pages.
    				Template Name: Game Preview
    				Template Post Type: post
    
  3. Now that that’s taken care of, let’s turn our attention to the sidebar. Again, locate where the get_sidebar function. If it’s wrapped in a div with a class of “sidebar” or “widgets” or something of the like, you have nothing to worry about. The lines of code we’ll write later on will go right before this function. Otherwise, locate your theme’s sidebar.php file. Copy the lines of code that control the primary sidebar and replace the get_sidebar function in the template with the copied code. It might look something like this:
    				<div id="sidebar1" class="sidebar>
    					<?php if ( is_active_sidebar( 'sidebar1' ) ) : ?>
    						<?php dynamic_sidebar( 'sidebar1' ); ?>
    					<?php endif; ?>
    				</div>
    

    Note: Your sidebar.php file probably won’t look exactly like this. This is more a guide. It should, however, at least look something like it if it’s up to WordPress standards.

  4. Now, right before either the code you just pasted or the get_sidebar functions, add in the following lines of code to add a game preview “widget”. This will show the teams’ records, names and logos as well as the date, time and location of the game. If the game is final, the score will show. And if the game has a recap, a link to the recap will show as well.
    				<?php echo sports_bench_show_game_preview_info(); ?>
    
  5. So that’s all of the coding we have to do for the preview template. Now let’s add a preview. To start, add a new page. Then type a preview into the main post editor.
  6. Once you are done, go the “Post Attributes” section on the right-hand side. Select “Game Preview” from the post template dropdown. next, find the custom fields for Sports Bench. It’ll be below the main editor somewhere, depending on what plugins you have installed. There, select “Preview” and then select which game this is a preview for.
  7. Now hit “Publish” and then hit “View Post”. And that’s it. You’ve created a really cool game preview post template that adds necessary info with minimal effort from you in the future. Congrats! Now let’s move on to game recaps.

Creating the Game Recap Template

There are two ways you can create game recap areas. The easiest is to use the game recap shortcode. To do this, add a new post and then hit the “SB” at the top of the editor. Then select “Game Recap” and then the game you want to show. And that’s all you need. If you want to create a custom post template for recaps, use the directions below.

  1. Like the game preview template, create a new php file and name it page-game-recap.php and copy the contents of your theme’s single.php file into the new template.
  2. Like the game preview template, add the following lines of code right after the opening php tag:
    				Template Name: Game Recap
    				Template Post Type: post
    
  3. Again, let’s turn our attention to where the get_sidebar function is located. If it’s inside a div with the class “sidebar” or “widgets” or the like, simply delete the function since we’re overriding the default sidebar here. Otherwise, go to the sidebar.php file and copy the div that contains the actual sidebar. You don’t need any inside that div, just the outer shell. Then paste that over the get_sidebar function in the recap template.
  4. Now, inside the sidebar container that was either already there or just pasted, place the following line of code:
    				<?php echo sports_bench_show_game_stats_info(); ?>
    
  5. So that’s all the coding you have to do. But let’s add a recap just to test it out. To start go add add a new post and put some text into the main text editor.
  6. Next, scroll down on the right-hand side and find the “Post Attributes” section. Select “Game Recap” as the post template.
  7. Then find the Sports Bench custom fields. This will be somewhere below the main post editor depending on what plugins you have on your site. There select “Recap” and then select the game the recap is for.
  8. Finally, hit publish and then view the post. Congrats! You’ve now created a recap template that will show off all sorts of information from the scoreline to the team stats to the individual stats. It looks awesome.

And that’s all the code you need to get started. The best part is now, when you create a preview or a recap for a game, the link to that post will automatically show up on the team page and where the game is located on the scoreboard. It adds that extra functionality that takes your site to the next level.

Customizations

It is possible to make customization, both in the code in style. The recommended way is to make your own customization plugin so that your changes aren’t overwritten by an update. Here’s how to do that:

  1. Find the plugins directory on your web hosting and create a new directory inside of it. Call the new file ‘sports-bench-customizations’.
  2. Inside of the new directory, create a php file name sports-bench-customizations.php.
  3. Inside of the file, paste the following at the top:
    • <?php
                         /*
                         Plugin Name: Sports Bench Customizations
                         Plugin URI:
                         Description: A place to put customizations for the Sports Bench plugin
                         Version:     1.0
                         Author:
                         Author URI:
                         License:     GPL3
                         License URI: https://www.gnu.org/licenses/gpl-3.0.html
                         */
                         ?>
  4. Inside of this directory, you can include JavaScript, CSS, and other items and then call them from the php file. You can also create custom functions as well.
  5. Make sure to activate the plugin as you would any other plugin.

Setting Up the Homepage

Setting up the homepage to run as it should is a fairly quick process.

  1. Navigate to the “Customize” page in the admin. Then click “Theme Settings”.
  2. Determine if you want to hide sticky posts in the slider and home page.
  3. Determine the category to show in the slider. The suggested practice is to create a “top story” category and use that.
  4. Determine the categories to show below the slider. Each category will show up as a tab, as well as a tab with all of the latest posts.

That’s it. The theme is all set up to run as you like.

Creating a Longform Post

Creating a longform story is simple with WordPress 4.7 and the Sports Bench theme; however, for this to work, you must be using WordPress 4.7.

  • Create a post like you normally would. Typically, longform stories are over 1,000 words long, but any length will do for you.
  • Before hitting publish, scroll down to the “Post Attributes” box in the right sidebar of the page and select “Longform”.
  • Make sure you upload a large featured image as it will display across the top of the page.
  • Installation

    Plugin

    Via WordPress Dashboard
    1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the plugin only, ignore this step.
    2. In the WordPress admin area, go to Plugins->Add New. Then hit “Upload Plugin” at the top of the subsequent page.
    3. Select the zipped plugin directory (i.e. sports-bench-1.0.zip) and hit “Install Now”.
    4. After the plugin is installed, click “Activate” to start using the theme.
    5. Go to the “Setup” section of this ReadMe file to get the plugin rolling for your use.
    VIia FTP Upload
    1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the plugin only, ignore this step.
    2. Unzip the zipped plugin directory (i.e. sports-bench-1.0.zip).
    3. Upload the sports-bench directory inside the now-unzipped directory to the plugin directory on your site (located inside of the wp-content directory).
    4. In the WordPress admin area, go to the Plugins page and hit “Activate” underneath the Sports Bench listing on the page to begin using the theme.
    5. Go to the “Setup” section of this ReadMe file to get the plugin rolling for your use.

    Theme

    Via WordPress Dashboard
    1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the theme only, ignore this step.
    2. In the WordPress admin area, go to Appearance->Themes. Click the “Add New” button at the top of the page and then hit “Upload Theme” at the top of the subsequent page.
    3. Select the zipped theme directory (i.e. sports-bench-1.0.zip) and hit Install now.
    4. After the theme is installed, click “Activate” to start using the theme.
    Via FTP Upload
    1. If you purchased the plugin/theme package, unzip the “sports-bench” directory that comes with the download. If you purchased the theme only, ignore this step.
    2. Unzip the zipped theme directory (i.e. sports-bench-1.0.zip).
    3. Upload the sports-bench directory inside the now-unzipped directory to the themes directory on your site (located inside of the wp-content directory).
    4. In the WordPress admin area, go to Appearance->Theme and hit “Activate” underneath the Sports Bench listing on the page to begin using the theme.
  • Setting Up Sports Bench

    So now you’ve got the plugin installed and activated. Before we get too far along, we need to set up a few plugin settings so that you’re ready to go.

    1. Go to the Sports Bench Options page after activating the plugin. The link can be found in the admin menu on the left side.
    2. First, select a sport. Currently, baseball, basketball, (American) Football, Hockey and Soccer (Football) are supported. Please note that if you select a sport, comeback to the option and change it, all games will be lost.
    3. Add the current season. The default is the current year. Please make note of how you format the year(s) here. You’ll need it when you start to create games later on. Make sure to update this setting when you start a new season.
    4. Determine whether or not you want to display games by week or not. This option determines how games are shown on the scoreboard. If you don’t select this option, you can disregard the “Week” field when creating games. Otherwise, next enter the current week of the season. You’ll update this setting a lot.
    5. If you have a or want a page to show team pages, select the page that is using the team page template. This will direct team links to this page. If you haven’t created the page for the teams, you can come back to this later. We’ll get into more detail later on in the guide.
    6. If you have a or want a page to show player pages, select the page that is using the player page template. This will direct player links to this page. If you haven’t created the page for the players, you can come back to this later. We’ll get into more detail later on in the guide.
  • Creating a Division

    All right, now we’ve got our settings taken care of we can start adding some data. At first you’ll probably be tempted to create teams right now, but most leagues divide their teams up into divisions, conferences or leagues, so let’s start there first. This way it will be much easier once we start adding teams.

    1. To start adding divisions, hover over the “Teams” item in the menu in the admin area of your site. Then click on “Divisions” in the submenu that appears.
    2. The divisions page is set up nearly identical to the categories page in WordPress where the divisions are listed on the right and you can add divisions or conferences on the left.
    3. To add a division or conference, first fill out the name of the division or conference.
    4. Then select if this is a division or a conference.
    5. If this is a conference, select the color for the conference. This is optional, but the color appears a border between the table head and table body wherever the standings appear.
    6. If this is a division, select the conference the division belongs to. The recommended practice is to add conferences first and then add divisions, if that is your set up.
    7. Then hit save. The page will reload and your new item will show up on the left. Repeat this process until all of your divisions and conferences are added.
  • Creating a Team

    At this point we’ve installed the plugin, got the settings taken care of and added our conferences and divisions. Now it’s finally time to add in the teams.

    1. To start adding teams, hover over the “Teams” item in the admin area of your site. Then click “Add New” in the submenu that appears.
    2. Starting at the top, add the full team name (i.e. Texas Rangers, Seattle Seahawks, FC Dallas).
    3. Then enter the team location. If the team has a location and nickname, put just the city or state (i.e. Texas, Seattle). If the team has no nickname, like FC Dallas or D.C. United, put the full name here again and leave the nickname field next blank.
    4. Enter in the nickname of the team if there is one (i.e. Ranger, Seahawks).
    5. Next enter the three or four letter abbreviation of the team (i.e. TEX, SEA, FCD).
    6. Next select whether the team is active or inactive. The default setting is always active. This only changes to inactive if the team takes a hiatus or folds.
    7. Then enter the city and the state where the team is located.
    8. Next enter the stadium name and the capacity of the stadium.
    9. Then enter the name of the head coach.
    10. Next select what division or conference the team is placed in.
    11. Then enter the primary and secondary colors for the team.
    12. Next, on the right hand side, upload the team’s logo.
    13. Then you can add a photo of the team below the logo. This is an optional item.
    14. Finally, hit save at the bottom. You’ve now created your first team. Congrats! Now repeat these steps to add your remaining teams.
  • Creating a Player

    So we’ve added our teams. Now it’s time to add our players to these teams.

    1. To start adding players, hover over the “Players” item in the admin area of your site. Then click “Add New” in the submenu that appears.
    2. Enter in the first and last name of the player.
    3. Then select the team the player plays for, or select “Free Agent” if the player has no team.
    4. Next use the date picker to select the player’s birthday.
    5. Then either enter or select the position the player page.
    6. Next add the height and weight of the player if you want to.
    7. Then enter the city and state name of the player’s hometown if you so wish.
    8. Add a photo of the player on the right side of the page, if you wish.
    9. Finally, hit save at the bottom. You’ve now created your first player. Congrats. Now repeat these steps to add your remaining players.
  • Creating a Game

    So we’ve added our teams and their players. Now it’s time to add games to the schedule. This is the most complicated of the admin pages associated with the plugin, but if you follow these steps, you’ll have no issue adding games and game stats.

    1. To start adding games, hover over the “Games” item in the admin area of your site. Then click “Add New” in the submenu that appears.
    2. Select the home and away teams for the game.
    3. Then select whether this game is a scheduled game, a game in progress or a game that is final.
    4. If this is a game that’s in progress, another section will appear below. Here you’ll enter the current score for the home and away teams and the current time and period (or minute of the match for soccer or inning for baseball) of the game.
    5. In the game information row, enter the season the game is taking place in. If you’re sorting your games by week, add the week number. Then add the date and time of the game and the attendance of the game (if applicable).
      • If this game is listed as a scheduled game, you don’t need to go any further. Hit save right here and you’re done! You’ve added your first game. Otherwise, continue on.
    6. In this next section, add the scoreline for the game. If this is a baseball game, enter in the runs, hits, errors and men/women left on base. Otherwise, enter the scoring by quarter, period or half. The final column on the right will automatically add up the total for each team.
    7. Next add the game/match events for the game. This differs from sport to sport, but the column headings wil point you in the right direction. You can add as many game events as needed with the button at the bottom. You can also remove game events with the remove button at the end of each row.
      • Note: Basketball games do not have this section.
      • If this game is listed as an in-progress game, you don’t need to go any further. Hit save right here and you’re done! You’ve added your first game. Otherwise, continue on.
    8. Then add in the team stats for the game. Again, this differs depending on the sport, but the titles in the center will help you along.
    9. Next add in the individual player stats for the home and away teams. The players will be loaded in a dropdown on the left when you select the teams at the top. Again, the stats you’ll need to enter differ depending on the sport, but the column headings will guide you along. You can add as many players as you need with the button at the bottom of each section. You can also remove players with the remove button at the end of each row.
    10. Finally, hit the save button at the bottom of the page. You’ve now created your first game complete with all of the stats. Congrats! Now just repeat the process whenever you need to add or edit games.
  • Creating a Playoff Bracket

    Okay so now an entire season has gone by and it’s time for playoffs. (And yes Jim Mora, we’re talking about playoffs). Sports Bench makes it easy for you to create playoff brackets to show off who your one true champion really is.

    • To add a playoff bracket, hover over the “Playoffs” item in the admin area of your site. Then click “Add New” in the submenu that appears.
    • Next give the bracket a name. Then select the number of teams that will be in the tournament, select whether it’s a single or double elimination tournament and then select the season the bracket takes place in.
    • For each playoff match up, select both teams from the dropdowns provided. Give each of them their seeding (if applicable). Then select whether this is a one, two, three, five or seven game series. Finally, select the game that applies to each game in the series from the dropdowns below.
    • Repeat the previous step until the bracket is filled out as much as it can be. The score section on the right will update automatically, but you will have to select the winners by hand like the previous step.
    • When you’re done, hit save. And that’s it. You’ve created your first playoff bracket!
  • Adding Scoreboard, Standings and Stats Pages

    All right, so we’ve got the plugin installed and setup. We have our divisions, teams, players and some games. Now how will we display this data. Fortunately, Sports Bench makes it easy for you to display standings, scoreboards and stats leaderboards on pages (and even posts) thanks to shortcodes. This section will take you through how to do that.

    • First start a new page or post. Then click the “SB” logo near the top of the visual editor. This will open up a modal where you can select a number of different shortcodes.
    • If you want to add a scoreboard, select “Scoreboard” and then hit insert. Now when you view the page or post, a scoreboard will be displayed.
    • If you want to add standings, select “Standings” and then hit insert. Then a few options will appear below the editor. If it doesn’t appear right away, give it a few seconds. In the options, you can show league, conference and division standings and show home, away, division and conference records and points for and against and points differential. You can add and remove items if you need to using the buttons in the options.
    • If you want to add a stats leaderboard, select “Stats” and then hit insert. Then an options panel will appear below the editor. Here, you can chose which stats show up on the page. You can add as many stats as you like to the page.
    • That’s it. You can create pages that show a scoreboard, standings and stats without writing a single line of code!
  • Using the Shortcodes

    But your shortcode options aren’t just limited to standings, you can also use shortcodes to show playoff brackets, game information, players and teams.

    • To begin using a shortcodes, first start a new page or post. Then click the “SB” logo near the top of the visual editor. This will open up a modal where you can select a number of different shortcodes.
    • If you want to add a game shortcode, select “Game” and then select a season. From there, select a game from that season. The shortcode will then show the teams competing in the game as well as the time, date and location of the game. If the game is finished and has a recap, a link to the recap will show as well.
    • If you want to add a player shortcode, select “Player” and then select a player from the list that appears. The shortcode will display the player’s photo and information and their recent stats.
    • If you want to add a team shortcode, select “Team” and then select a team from the list that appears. The shortcode will display the team’s logo and information and their recent games and upcoming schedule.
    • If you want to add a playoff shortcode, select “Playoff Brackets” and then select a playoff bracket from the list that appears. This will display the bracket in table form on the front end.
    • If you want to add a rivalry shortcode, select “Rivalry” and then select the two teams that you want to display stats for. This will display the series records between the two teams and their recent results against each other.
    • If you want to add a team page shortcode, select “Team Page”. Next, please find the “Creating a Team Page” section of the guide and follow those instructions.
    • If you want to add a player page shortcode, select “Player Page”. Next, please find the “Creating a Player Page” section of the guide and follow those instructions.
    • If you want to add a game recap shortcode, select “Game Recap” and then select the game you want to show a recap for.
    • That’s it. You can now display a lot of cool information in your posts and pages without writing a single line of code!
  • Using the Widgets

    Want to display information that appears in the sidebar wherever your viewers go? Sports Bench has widgets so you can display a scoreboard, standings and stats on every page with a widget area.

    • Navigate to the Widgets page in the admin area.
    • To add a scoreboard widget, click and drag the “Sports Bench Scoreboard” widget to the desired widget area. Give it a title and hit “Save”. That’s it.
    • To add a standings widget, click and drag the “Sports Bench Standings” widget to the desired widget area. Give it a title, select whether it will show the league, conference or division standings and then hit “Save”. That’s it.
    • To add a stats widget, click and drag the “Sports Bench Statistic” widget to the desired widget area. Give it a title, select which statistic to show and then hit “Save”. That’s it.
  • Setting Up the Teams Page Template

    Okay so you’ve created a new page template and shown player information. Now we’re going to do the same for teams, but the level of difficulty is going to go up a bit. But don’t worry. Once again, if you follow these directions, you’ll be feeling like a real programmer by the time it’s over. And if you want, there’s a shortcode you can use to create the team page instead.

    Using the Team Page Shortcode

    1. First, create a new page. Then in the new page create a new shortcode. To do this, click the “SB” button in the TinyMCE editor at the top.
    2. In the window that now appears, select “Team Page” and then insert. Then hit “Publish”.
    3. Next, navigate to the Sports Bench Options page. It should be in the menu on the left in the admin.
    4. In the options page, select your new page for the Team Page option and then hit save.
    5. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
    6. And that’s it. Your team page is ready to go. And you didn’t even need to write a single line of code.

    Using a Team Page Template

    Introducing the Team Class

    Before we get going too far, let’s introduce the Sports_Bench_Team class.

    Once again, if you’re not too familiar with PHP or object-oriented programming, just know that adding the following to your code essentially calls the team from the database and populates it attributes without you having to write more code.

    <?php $team = new Sports_Bench_Team( (int){{team_id}} ); ?>

    Note that the team id will need to be an actual integer number.

    From here, you can get the team name, location and so much more. In fact, here’s a list of the available attributes you can call, plus one function we’ll use to set up this page.

    • $team->team_id
    • $team->team_name
    • $team->team_location
    • $team->team_nickname
    • $team->team_abbreviation
    • $team->team_active
    • $team->team_city
    • $team->team_state
    • $team->team_stadium
    • $team->team_stadium_capacity
    • $team->team_head_coach
    • $team->team_logo
    • $team->team_photo
    • $team->team_division
    • $team->team_primary_color
    • $team->team_secondary_color
    • $team->player_slug
    • $team->team_slug
    • $team->get_schedule()
    • $team->get_roster()
    • $team->get_team_photo()
    • $team->get_division_name()

    So now that we’ve gone over something we’ll be using here, let’s start building the player page, shall we? If you want to learn more about the Player class and the other classes, please visit the codex page on the Sports Bench website.

    Building the Team Page

    Like the player page, creating the team page involves creating a new page template. It’s a simple concept in WordPress, but if you’re unfamiliar with it, you can read this, this and this tutorial on how to do that. Otherwise, let’s get started.

    1. So first off, create a new page template in your theme’s main directory. Name it page-team.php
    2. Next, copy the contents of your theme’s page.php file and paste it into this new page template file.
    3. At the top underneath the opening php tag, paste the following:
      Template Name: Team
    4. Now, this is where things get a bit trickier. In this file, look for the get_sidebar() function. If this is wrapped in a div tag that has a class or id of “widget” or sidebar, then don’t do anything with it. Otherwise, find your theme’s sidebar.php In this file look for a div tag with a class or id of “widget” or “sidebar”. Copy this div and paste it in the new template file above the get_sidebar function. Make sure the closing </div> tag is there as well.
    5. Once you’ve done that, take a quick breather. We’re going to divide the rest of this into two parts: the main body and the sidebar.

    Building the Main Body of the Page

    1. Like the player page, find the loop and delete everything within either a main or article div. Then inside of that, paste the following lines of code:
      					<?php if ( class_exists( 'Sports_Bench_Team' ) ) { ?>
      						<?php if ( get_query_var( 'team_slug' ) ) { ?>
      						<?php } else { ?>
      						<?php } ?>
      					<?php } ?>
      
    2. Then inside the else part of the statement, paste the following code: <?php echo sports_bench_show_team_listing(); ?>.
    3. The rest of this section will deal with code going inside the <?php if ( class_exists( 'Sports_Bench_Team' ) ) { ?> section.
    4. To show the team photo, insert the following lines:
      				<div class="team-photo">
                      	<?php echo $team->get_team_photo( 'team-photo' ); ?>
      				</div>
      
    5. To show the team logo, insert the following lines:
      					<div class="team-logo">
      						<?php echo $team->get_team_photo( 'team-logo' ); ?>
      					</div>
      
    6. To show the team name, insert the following lines:
      					<div class="team-name">
      						<h1 class="team-title" style="color:<?php echo $team->team_primary_color; ?>"><?php echo $team->team_name ?></h1>
      					</div>
      
    7. Then, to show the team stats, insert the following lines:
      				<div id="team-stats" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
      					<h4><?php echo get_option( 'sports-bench-season-year' ) . ' ' . __( 'Stats', 'sports-bench' ); ?></h4>
      					<?php echo sports_bench_get_players_stats_table( sports_bench_get_players_stats( $team->team_id,  '"' . get_option( 'sports-bench-season-year' ) . '"' ) ); ?>
      				</div>
      
    8. Finally, to show the team’s roster, insert the following lines:
      				<div id="team-roster" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
      					<h4><?php _e( 'Roster', 'sports-bench' ); ?></h4>
      					<?php echo sports_bench_show_roster( $team->team_id ); ?>
      				</div>
      
    9. All right, that’s it for the main body of the page template. Now let’s finish off the template with the sidebar.

    Adding in the Sidebar

    This part will be a bit challenging, but again, if you follow the directions here, you’ll do just fine. If you want, you can use this code to sort of give you a guide through what it should look like.

    1. First we need to add a conditional to see if this is a page for a single team or not. So where the get_sidebar function is in your page template, place the lines of code below. If the function is wrapped in a div with a class of “widgets” or “sidebar”, place this code inside that div and disregard that same div in the following code.
      				<?php if ( isset( $team ) ) { ?>
      					<div id="sidebar1" class="sidebar">
      					</div>
      				<?php } else { ?>
      					<?php get_sidebar(); ?>
      				<?php } ?>
      

      It should go without saying that this will replace the original get_sidebar function in your template file.

    2. The remainder of the code will go inside the <?php if ( isset( $team ) ) { ?> section. Now, to show the schedule, place the following lines of code:
      				<aside id="schedule-info" class="widget" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
                      	<h4 class="widgettitle"><?php echo $team->team_name . ' ' . get_theme_mod( 'sports-bench-season-year' ) . ' ' . __( 'Schedule', 'sports-bench' ); ?></h4>
      					<?php echo sports_bench_show_team_schedule( $team->team_id ); ?>
                      </aside>
      
    3. To show the division or conference standings for the team, place the following lines of code:
      				<aside id="standings" class="widget" style="border-top: 2px solid <?php echo $team->team_secondary_color; ?>">
                          <?php global $wpdb;
                          $table = $wpdb->prefix . 'sb_divisions';
                          $querystr = "SELECT * FROM $table WHERE division_id = $team->team_division;";
                          $division = $wpdb->get_results($querystr);
                          $division_title = $division[ 0 ]->division_name . ' ' . __( 'Standings', 'sports-bench' ); ?>
                          <h4 class="widgettitle"><?php echo $division_title; ?></h4>
      					<?php echo sports_bench_team_division_standings( $team->team_division ); ?>
                      </aside>
      
    4. Finally, to show some more team information, add the following lines of code:
      				<aside id="team-info" class="widget clearfix" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
                          <h4 class="widgettitle"><?php _e( 'Team Info', 'sports-bench' ); ?></h4>
      					<?php echo sports_bench_show_team_info( $team->team_id ); ?>
                      </aside>
      

    Setting up the Team Template

    Okay, we’re almost done with the team page template, but now we need to add the actual page to the site.

    1. Create a new page and name it “Teams”.
    2. On the right-hand side, look for “Page Attributes”. Then select “Team”. Then hit publish.
    3. Next, go to Sports Bench Settings. Find the Team Page setting and then select this newly created page. Hit “Publish”.
    4. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
    5. Now navigate to your newly created team page and enjoy your hard work. You deserve it.

    That’s it! You’ve now completed creating a template for the teams in your league. It’s now a one-stop-shop for all team information. Confidence in your coding skills continuing to go up? Great! We’re about to take another step up in difficulty. But you’ll do fine.

  • Setting Up the Players Page Template

    Okay, so you’re almost complete getting everything going with your website and Sports Bench. But now we’re getting into the challenging part. However, there’s good news. With Sports Bench 1.3, you can add a player page template with a simple shortcode. Or you can learn and dig into the code and do it that way. Both ways will be shown here.

    Using the Player Page Shortcode

    1. First, create a new page. Then in the new page create a new shortcode. To do this, click the “SB” button in the TinyMCE editor at the top.
    2. In the window that now appears, select “Player Page” and then insert. Then hit “Publish”.
    3. Next, navigate to the Sports Bench Options page. It should be in the menu on the left in the admin.
    4. In the options page, select your new page for the Player Page option and then hit save.
    5. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
    6. And that’s it. Your player page is ready to go. And you didn’t even need to write a single line of code.

    Using a Player Page Template

    Introducing the Player Class

    Before we get going too far, let’s introduce a simple concept that you’ll use here and elsewhere if you want to customize your site even further. Sports Bench comes with three classes: Sports_Bench_Game, Sports_Bench_Player and Sports_Bench_Teams. Here we’ll just look at the player class.

    If you’re not too familiar with PHP or object-oriented programming, just know that adding the following to your code essentially calls the player from the database and populates it attributes without you having to write more code.

    <?php $player = new Sports_Bench_Player( (int){{player_id}} ); ?>

    Note that the player id will need to be an actual integer number.

    From here, you can get the player’s first name, last name and so much more. In fact, here’s a list of the available attributes you can call, plus one function we’ll use to set up this page.

    • $player->player_id
    • $player->player_first_name
    • $player->player_last_name
    • $player->player_photo
    • $player->player_position
    • $player->player_home_city
    • $player->player_home_state
    • $player->player_date_of_birth
    • $player->team_id
    • $player->player_weight
    • $player->player_height
    • $player->player_slug
    • $player->get_player_photo()

    So now that we’ve gone over something we’ll be using here, let’s start building the player page, shall we? If you want to learn more about the Player class and the other classes, please visit the codex page on the Sports Bench website.

    Building the Player Page

    So creating the player page involves creating a new page template. It’s a simple concept in WordPress, but if you’re unfamiliar with it, you can read this, this and this tutorial on how to do that. Otherwise, let’s get started.

    1. So first off, create a new page template in your theme’s main directory. Name it page-player.php
    2. Next, copy the contents of your theme’s page.php file and paste it into this new page template file.
    3. At the top underneath the opening php tag, paste the following:
      Template Name: Player
    4. Look at the body of your new page template’s contents. First find the Loop. If you’re unfamiliar with the loop, look for a section that looks like if ( have_posts() ) : while( have_posts() ) : the_post();. Inside of that, look for a <main> or <article> tag and delete everything inside of that.
    5. Replace the now-deleted code with the following:
      				<?php if ( class_exists( 'Sports_Bench_Player' ) ) { ?>
      					<?php if ( get_query_var( 'player_slug' ) ) { ?>
      					<?php } else { ?>
      					<?php } ?>
      				<?php } ?>
      
    6. From here, let’s get the simple part out of the way first. Inside the else statement, place the following line of code:
      <?php echo sports_bench_show_team_player_select(); ?>
      This will show a dropdown of teams to pick players from if there’s no player slug in the url. For a live look at what this does, click here.
    7. With that out of the way, let’s get to the fun part. Inside of the if ( get_query_var( 'player_slug' ) ) statement, first add the following:
      				<? if ( get_query_var( 'player_slug' ) ) {
      				$player = new Sports_Bench_Player(get_query_var('player_slug'));
      				$team = new Sports_Bench_Team((int)$player->team_id);
      				} ?>
      
      				<div class="player-info">
      					<?php echo sports_bench_show_player_info( $player->player_id ); ?>
      				</div>
      

      This will display the player’s photo and his/her name, height, weight, position, age and hometown if those are entered. You might have to do some styling to get the section to match your theme’s style.

    8. Finally, below the code you just pasted, place the following lines of code:
      				<div id="player-stats" class="widget" style="border-top: 2px solid <?php echo $team->team_primary_color; ?>">
      					<h4 class="widgettitle"><?php echo __( 'Career Stats', 'sports-bench' ); ?></h4>
      					<?php echo sports_bench_get_season_stats( $player ); ?>
      				</div>
      

      This will show a table of the player’s career stats by season. And if you click on a season, you’ll see the game-by-game stats. And the best part, that functionality requires no code from you.

    9. Now, go create a new page. Title it “Players”. Then go down on the right side of the editor to the “Page Attributes” section and select “Player” from the page template dropdown.
    10. Next, go to the Sports Bench Settings page inside the Customizer. Then find the Player Page option and select the page you’ve just created. Then hit publish.
    11. After that, go to the permalinks page. This can be found under the Settings section in the admin. Don’t tough your permalinks, but hit save at the bottom. This will reset the necessary redirects to make the page work.
    12. Then navigate to that page. You should now see the dropdown. Pick a team and then click on a player. And now you should see his/her player page.

    And that’s it! You’ve survived some intermediate coding and you’ve created a really cool player page that you can show off. You’re harnessing the power of Sports Bench. Confidence going up? Good. We’re going to take another step higher in the next section. But for now, admire your work.

  • Adding Game Recaps and Previews

    We are so close to the finish line. You’re doing great, but now we’ve reached our toughest challenge yet. However, with this as your guide, you’ll be done with it in no time.

    This section deals with post templates. Introduced in WordPress 4.7, post templates work the same as page template, but obviously with post types and an extra line of code. This is also why WordPress 4.7 is required for this plugin.

    This section will cover creating game preview and game recap post templates. We’ll start easy first with game previews.

    Creating the Game Preview Template

    There are two ways you can create game previews. The easiest is to use the “Game” shortcode. To do this, add a new post and then hit the “SB” at the top of the editor. Then select game and then the game you want to show. And that’s all you need. If you want to create a custom post template for previews, use the directions below.

    1. Like the player and team templates, create a new php file and name it page-game-preview.php. But now, copy the contents of your theme’s single.php file. And we’re also going to leave the loop untouched. Our focus is on the sidebar.
    2. Again, like the player team templates, add the following lines of code to right after the opening php tag. Note the extra line which helps WordPress realize that this is intended for posts and not pages.
      				Template Name: Game Preview
      				Template Post Type: post
      
    3. Now that that’s taken care of, let’s turn our attention to the sidebar. Again, locate where the get_sidebar function. If it’s wrapped in a div with a class of “sidebar” or “widgets” or something of the like, you have nothing to worry about. The lines of code we’ll write later on will go right before this function. Otherwise, locate your theme’s sidebar.php file. Copy the lines of code that control the primary sidebar and replace the get_sidebar function in the template with the copied code. It might look something like this:
      				<div id="sidebar1" class="sidebar>
      					<?php if ( is_active_sidebar( 'sidebar1' ) ) : ?>
      						<?php dynamic_sidebar( 'sidebar1' ); ?>
      					<?php endif; ?>
      				</div>
      

      Note: Your sidebar.php file probably won’t look exactly like this. This is more a guide. It should, however, at least look something like it if it’s up to WordPress standards.

    4. Now, right before either the code you just pasted or the get_sidebar functions, add in the following lines of code to add a game preview “widget”. This will show the teams’ records, names and logos as well as the date, time and location of the game. If the game is final, the score will show. And if the game has a recap, a link to the recap will show as well.
      				<?php echo sports_bench_show_game_preview_info(); ?>
      
    5. So that’s all of the coding we have to do for the preview template. Now let’s add a preview. To start, add a new page. Then type a preview into the main post editor.
    6. Once you are done, go the “Post Attributes” section on the right-hand side. Select “Game Preview” from the post template dropdown. next, find the custom fields for Sports Bench. It’ll be below the main editor somewhere, depending on what plugins you have installed. There, select “Preview” and then select which game this is a preview for.
    7. Now hit “Publish” and then hit “View Post”. And that’s it. You’ve created a really cool game preview post template that adds necessary info with minimal effort from you in the future. Congrats! Now let’s move on to game recaps.

    Creating the Game Recap Template

    There are two ways you can create game recap areas. The easiest is to use the game recap shortcode. To do this, add a new post and then hit the “SB” at the top of the editor. Then select “Game Recap” and then the game you want to show. And that’s all you need. If you want to create a custom post template for recaps, use the directions below.

    1. Like the game preview template, create a new php file and name it page-game-recap.php and copy the contents of your theme’s single.php file into the new template.
    2. Like the game preview template, add the following lines of code right after the opening php tag:
      				Template Name: Game Recap
      				Template Post Type: post
      
    3. Again, let’s turn our attention to where the get_sidebar function is located. If it’s inside a div with the class “sidebar” or “widgets” or the like, simply delete the function since we’re overriding the default sidebar here. Otherwise, go to the sidebar.php file and copy the div that contains the actual sidebar. You don’t need any inside that div, just the outer shell. Then paste that over the get_sidebar function in the recap template.
    4. Now, inside the sidebar container that was either already there or just pasted, place the following line of code:
      				<?php echo sports_bench_show_game_stats_info(); ?>
      
    5. So that’s all the coding you have to do. But let’s add a recap just to test it out. To start go add add a new post and put some text into the main text editor.
    6. Next, scroll down on the right-hand side and find the “Post Attributes” section. Select “Game Recap” as the post template.
    7. Then find the Sports Bench custom fields. This will be somewhere below the main post editor depending on what plugins you have on your site. There select “Recap” and then select the game the recap is for.
    8. Finally, hit publish and then view the post. Congrats! You’ve now created a recap template that will show off all sorts of information from the scoreline to the team stats to the individual stats. It looks awesome.

    And that’s all the code you need to get started. The best part is now, when you create a preview or a recap for a game, the link to that post will automatically show up on the team page and where the game is located on the scoreboard. It adds that extra functionality that takes your site to the next level.

  • Customizations

    It is possible to make customization, both in the code in style. The recommended way is to make your own customization plugin so that your changes aren’t overwritten by an update. Here’s how to do that:

    1. Find the plugins directory on your web hosting and create a new directory inside of it. Call the new file ‘sports-bench-customizations’.
    2. Inside of the new directory, create a php file name sports-bench-customizations.php.
    3. Inside of the file, paste the following at the top:
      • <?php
                           /*
                           Plugin Name: Sports Bench Customizations
                           Plugin URI:
                           Description: A place to put customizations for the Sports Bench plugin
                           Version:     1.0
                           Author:
                           Author URI:
                           License:     GPL3
                           License URI: https://www.gnu.org/licenses/gpl-3.0.html
                           */
                           ?>
    4. Inside of this directory, you can include JavaScript, CSS, and other items and then call them from the php file. You can also create custom functions as well.
    5. Make sure to activate the plugin as you would any other plugin.
  • Setting Up the Homepage

    Setting up the homepage to run as it should is a fairly quick process.

    1. Navigate to the “Customize” page in the admin. Then click “Theme Settings”.
    2. Determine if you want to hide sticky posts in the slider and home page.
    3. Determine the category to show in the slider. The suggested practice is to create a “top story” category and use that.
    4. Determine the categories to show below the slider. Each category will show up as a tab, as well as a tab with all of the latest posts.

    That’s it. The theme is all set up to run as you like.

  • Creating a Longform Post

    Creating a longform story is simple with WordPress 4.7 and the Sports Bench theme; however, for this to work, you must be using WordPress 4.7.

    • Create a post like you normally would. Typically, longform stories are over 1,000 words long, but any length will do for you.
    • Before hitting publish, scroll down to the “Post Attributes” box in the right sidebar of the page and select “Longform”.
    • Make sure you upload a large featured image as it will display across the top of the page.

Codex

Already have the plugin? Want to know how to do cool and different stuff with it? Click the button below to explore the Codex section to customize your copy of the plugin.

Classes

Sports Bench comes with three classes that do the heavy lifting: games, players and teams. Below you’ll find all of the attributes and functions each class comes with.

Sports_Bench_Bracket

Sports Bench core class to implement the Sports Bench Bracket object.

Attributes

  • $bracket_id, integer, the id of the bracket
  • $num_teams, integer, the number of teams in the bracket
  • $bracket_format, string, the format of the bracket
  • $bracket_title, string, the title of the bracket
  • $bracket_season, string, the season for the bracket

Constructor

  • Accepts $bracket_id, integer, parameter
  • Creates the Sports Bench Bracket object

Since: 1.2
Source: sports-bench-bracket.php, line 16

Methods

  • get_round

get_round – Sports_Bench_Bracket::get_round( $round )

Returns the playoff series for an entered round.

Parameters

  • $round, string, required, the round of the games to get

Returns

  • array, games in the specified round

Since: 1.2
Source: sports-bench-bracket.php, line 106

Sports_Bench_Game

Sports Bench core class to implement the Sports Bench Game object.

Attributes

  • $game_id, integer, the id of the game
  • $game_week, integer, the week of the game
  • $game_season, string, the season the game is in
  • $game_day, string, the date of the game
  • $game_home_id, integer, the id of home team
  • $game_home_final, integer, the final score for the home team
  • $game_away_id, integer, the id of the away team
  • $game_away_final, integer, the final score for the away team
  • $game_attendance, integer, the attendance of the game
  • $game_status, string, the link to the preview of the game
  • $game_current_time, string, the current time in the game
  • $game_current_period, string, the current period/quarter/inning the game is currently in
  • $game_current_home_score, integer, the current score for the home team
  • $game_current_away_score, integer, the current score for the away team
  • $preview_link, string, the link to the preview of the game
  • $recap_link, string, the link to the recap of the game
  • $game_neutral_site, integer, whether the game is at a neutral site or not
  • $game_location_stadium, string, the stadium for the game
  • $game_location_line_one, string, the first line of the address for the stadium for the game
  • $game_location_line_two, string, the second line of the address for the stadium for the game
  • $game_location_city, string, the city that the stadium for the game is in
  • $game_location_state, string, the state that the stadium for the game is in
  • $game_location_country, string, the country that the stadium for the game is in
  • $game_location_zip_code, string, the zip code that the stadium for the game is in

Constructor

  • Accepts $game_id, integer, parameter
  • Creates the Sports Bench Game object

Since: 1.0
Source: sports-bench-game.php, line 17

Methods

  • get_shootout

get_shootout – Sports_Bench_Game::get_shootout( $team_id )

Returns a team’s score in a shootout or false if there is none.

Parameters

  • $team_id, integer, required, the id of the team to get the shootout score for

Returns

  • bool | int, shootout or pk score or false if no shootout or pks

Since: 1.0
Source: sports-bench-game.php, line 333

Sports_Bench_Player

Sports Bench core class to implement the Sports Bench Player object.

Attributes

  • $player_id, integer, the id of the player
  • $player_first_name, string, the player’s first name
  • $player_last_name, string, the player’s last name
  • $player_photo, string, the url to the player’s photo
  • $player_position, string, the position the player plays
  • $player_home_city, string, the player’s hometown
  • $player_home_state, string, the player’s home state
  • $player_date_of_birth, string, the player’s date of birth
  • $team_id, integer, the team id for the team the player currently plays for
  • $player_weight, integer, the weight of the player
  • $player_height, string, the height of the player
  • $player_slug, string, the slug for the player for url purposes

Constructor

  • Accepts $player_id, integer, parameter
  • Creates the Sports Bench Player object

Since: 1.0
Source: sports-bench-player.php, line 16

Methods

  • get_age
  • get_teams_played_for
  • get_seasons_played
  • get_permalink
  • get_player_photo
  • get_years

get_age – Sports_Bench_Player::get_age()

Returns the current age of a player.

Returns

  • int, age of the player

Since: 1.0
Source: sports-bench-player.php, line 185

get_teams_played_for – Sports_Bench_Player::get_teams_played_for()

Returns a list of team ids that the player has played for.

Returns

  • array, teams the player has played for

Since: 1.0
Source: sports-bench-player.php, line 199

get_seasons_played – Sports_Bench_Player::get_seasons_played()

Returns a number of seasons that the player has played.

Returns

  • int, number of seasons the player has played

Since: 1.0
Source: sports-bench-player.php, line 218

get_permalink – Sports_Bench_Player::get_permalink()

Returns the link to a the player page.

Returns

  • string, link to player page

Since: 1.0
Source: sports-bench-player.php, line 238

get_player_photo – Sports_Bench_Player::get_player_photo()

Returns the html to display either the player’s photo.

Returns

  • string|void, html code to display the image

Since: 1.0
Source: sports-bench-player.php, line 253

get_years – Sports_Bench_Player::get_years()

Returns the range of years the player has played in the league.

Returns

  • string, the years the player has played

Since: 1.0
Source: sports-bench-player.php, line 268

Sports_Bench_Series

Sports Bench core class to implement the Sports Bench Series object.

Attributes

  • $series_id, integer, the id of the series
  • $bracket_id, integer, the id of the series’ bracket
  • $series_format, string, the format of the series
  • $playoff_round, string, the round of the series
  • $team_one_id, integer, the id of the first team in the series
  • $team_one_seed, integer, the seed of the first team in the series
  • $team_two_id, integer, the id of the second team in the series
  • $team_two_seed, integer, the seed of the second team in the series
  • $game_ids, string, the ids of the games in the series

Constructor

  • Accepts $series_id, integer, parameter
  • Creates the Sports Bench Series object

Since: 1.2
Source: sports-bench-series.php, line 16

Methods

  • get_series_score
  • get_series_winner
  • get_team_score

get_series_score – Sports_Bench_Series::get_series_score()

Returns the score of the series.

Returns

  • string | boolean, string with the series score or false if there isn’t one

Since: 1.2
Source: sports-bench-series.php, line 163

get_series_winner – Sports_Bench_Series::get_series_winner()

Returns the winner of the series.

Returns

  • int | boolean, the id of the series winner or false if there is no winner

Since: 1.2
Source: sports-bench-series.php, line 328

get_team_score – Sports_Bench_Series::get_team_score( $team )

Returns the score for a team in a playoff series.

Parameters

  • $team, string, ‘team-one’ or ‘team-two’

Returns

  • int, the score for a team in the series

Since: 1.2
Source: sports-bench-series.php, line 456

Sports_Bench_Team

Sports Bench core class to implement the Sports Bench Team object.

Attributes

  • $team_id, integer, the id of the team
  • $team_name, string, the team’s name
  • $team_location, string, the location of the team
  • $team_nickname, string, the team’s nickname
  • $team_abbreviation, string, the team’s abbreviation
  • $team_active, string, the team’s active status
  • $team_location_line_one, string, the first line of the address for the team
  • $team_location_line_two, string, the second line of the address for the team
  • $team_city, string, the city the team plays in
  • $team_state, string, the state the team plays in
  • $team_location_country, string, the country the team plays in
  • $team_location_zip_code, string, the zip code the team plays in
  • $team_stadium, string, the stadium the team plays in
  • $team_stadium_capacity, integer, the capacity of the team’s stadium
  • $team_head_coach, string, the current head coach of the team
  • $team_logo, string, the url for the team’s logo
  • $team_photo, string, the url for the team’s photo
  • $team_division, integer, the id of the division or conference the team plays in
  • $team_primary_color, string, the hexadecimal color value for the team’s primary color
  • $team_secondary_color, string, the hexadecimal color value for the team’s secondary color
  • $team_slug, string, the slug for the team for url purposes

Constructor

  • Accepts $team_id, integer, parameter
  • Creates the Sports Bench Team object

Since: 1.0
Source: sports-bench-team.php, line 15

Methods

  • get_games_played
  • get_wins
  • get_losses
  • get_draws
  • get_overtime_losses
  • get_record
  • get_win_percentage
  • get_home_record
  • get_road_record
  • get_points_for
  • get_points_against
  • get_point_differential
  • get_division_wins
  • get_division_losses
  • get_division_draws
  • get_division_record
  • get_conference_wins
  • get_conference_losses
  • get_conference_draws
  • get_conference_record
  • get_schedule
  • get_recent_results
  • get_upcoming_schedule
  • get_alltime_wins
  • get_alltime_losses
  • get_alltime_draws
  • get_alltime_record
  • get_roster
  • get_team_photo
  • get_average_attendance
  • get_permalink
  • get_division_name
  • get_years

get_games_played – Sports_Bench_Team:get_games_played( $season )

Returns the number of games a team has played for a given season.

Parameters

  • $season, string, the season to grab the number of games from

Returns

  • int, number of games played in a season

Since: 1.0
Source: sports-bench-team.php, line 305

get_wins – Sports_Bench_Team::get_wins( $season )

Returns the number of wins for the team in the selected season.

Parameters

  • $season, string, the season to grab the number of wins from

Returns

  • int, number of wins for the team

Since: 1.0
Source: sports-bench-team.php, line 322

get_losses – Sports_Bench_Team::get_losses( $season )

Returns the number of losses for the team in the selected season.

Parameters

  • $season, string, the season to grab the number of losses from

Returns

  • int, number of losses for the team

Since: 1.0
Source: sports-bench-team.php, line 339

get_draws – Sports_Bench_Team::get_draws( $season )

Returns the number of draws for the team in the selected season.

Parameters

  • $season, string, the season to grab the number of draws from

Returns

  • int, number of draws for the team

Since: 1.0
Source: sports-bench-team.php, line 356

get_overtime_losses – Sports_Bench_Team::get_overtime_losses( $season )

Returns the number of overtime losses for the team in the selected season.

Parameters

  • $season, string, the season to grab the number of overtime losses from

Returns

  • int, number of overtime losses for the team

Since: 1.0
Source: sports-bench-team.php, line 373

get_record – Sports_Bench_Team::get_record( $season )

Returns the record of the team for the current season in the form of an array.

Parameters

  • $season, string, the season to grab the team’s record

Returns

  • array, record for the team

Since: 1.0
Source: sports-bench-team.php, line 390

get_win_percentage – Sports_Bench_Team::get_win_percentage( $season )

Returns the winning percentage for the team in the current season.

Parameters

  • $season, string, the season to grab the team’s winning percentage from

Returns

  • float, winning percentage for the team

Since: 1.0
Source: sports-bench-team.php, line 407

get_home_record – Sports_Bench_Team::get_home_record( $season )

Returns the home record for a team in the current year.

Parameters

  • $season, string, the season to grab the team’s home record from

Returns

  • array, home record for the team this season

Since: 1.0
Source: sports-bench-team.php, line 429

get_road_record – Sports_Bench_Team::get_road_record( $season )

Returns the road record for a team in the current year.

Parameters

  • $season, string, the season to grab the team’s road record from

Returns

  • array, road record for the team this season

Since: 1.0
Source: sports-bench-team.php, line 454

get_points_for – Sports_Bench_Team::get_points_for( $season )

Returns the number of points/goals/runs scored by a team in the current season.

Parameters

  • $season, string, the season to grab the team’s points/goals/runs scored

Returns

  • int, number of points/goals/runs scored by a team in the current season

Since: 1.0
Source: sports-bench-team.php, line 479

get_points_against – Sports_Bench_Team::get_points_against( $season )

Returns the number of points/goals/runs scored against a team in the current season.

Parameters

  • $season, string, the season to grab the team’s points/goals/runs scored against

Returns

  • int, number of points/goals/runs scored against a team in the current season

Since: 1.0
Source: sports-bench-team.php, line 501

get_point_differential – Sports_Bench_Team::get_point_differential( $season )

Returns the difference in points/goals/runs scored by and against a team in the current season.

Parameters

  • $season, string, the season to grab the team’s points/goals/runs differential

Returns

  • int, the difference in points/goals/runs scored by and against a team in the current season

Since: 1.0
Source: sports-bench-team.php, line 523

get_division_wins – Sports_Bench_Team::get_division_wins( $season )

Returns number of wins in the division for a team in a season.

Parameters

  • $season, string, the season to grab the team’s wins in the division

Returns

  • int, number of division wins for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 539

get_division_losses – Sports_Bench_Team::get_division_losses( $season )

Returns number of losses in the division for a team in a season.

Parameters

  • $season, string, the season to grab the team’s losses in the division

Returns

  • int, number of division losses for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 574

get_division_draws – Sports_Bench_Team::get_division_draws( $season )

Returns number of draws in the division for a team in a season.

Parameters

  • $season, string, the season to grab the team’s draws in the division

Returns

  • int, number of division draws for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 609

get_division_record – Sports_Bench_Team::get_division_record( $season )

Returns the divisional record for a team as an array.

Parameters

  • $season, string, the season to grab the team’s divisional record

Returns

  • array, divisional record for the team

Since: 1.0
Source: sports-bench-team.php, line 644

get_conference_wins – Sports_Bench_Team::get_conference_wins( $season )

Returns number of wins in the conference for a team in a season.

Parameters

  • $season, string, the season to grab the team’s wins in the conference

Returns

  • int, number of conference wins for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 661

get_conference_losses – Sports_Bench_Team::get_conference_losses( $season )

Returns number of losses in the conference for a team in a season.

Parameters

  • $season, string, the season to grab the team’s losses in the conference

Returns

  • int, number of conference losses for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 736

get_conference_draws – Sports_Bench_Team::get_conference_draws( $season )

Returns number of draws in the conference for a team in a season.

Parameters

  • $season, string, the season to grab the team’s draws in the conference

Returns

  • int, number of conference draws for a team in a season

Since: 1.0
Source: sports-bench-team.php, line 809

get_conference_record – Sports_Bench_Team::get_conference_record( $season )

Returns the conference record for a team as an array.

Parameters

  • $season, string, the season to grab the team’s conference record

Returns

  • array, conference record for the team

Since: 1.0
Source: sports-bench-team.php, line 884

get_schedule – Sports_Bench_Team::get_schedule( $season )

Returns an array of each game for a team in a given season.

Parameters

  • $season, string, the season to grab the team’s schedule

Returns

  • array, information for each game for a team in the season

Since: 1.0
Source: sports-bench-team.php, line 901

get_recent_results – Sports_Bench_Team::get_recent_results( $limit, $season )

Returns an array of recent results for a team.

Parameters

  • $limit, integer, the number of recent games to grab
  • $season, string, the season to grab the team’s schedule

Returns

  • array, the recent games for the team

Since: 1.0
Source: sports-bench-team.php, line 1006

get_upcoming_schedule – Sports_Bench_Team::get_upcoming_schedule( $limit, $season )

Returns an array of upcoming games for a team.

Parameters

  • $limit, integer, the number of upcoming games to grab
  • $season, string, the season to grab the team’s schedule

Returns

  • array, the upcoming games for the team

Since: 1.0
Source: sports-bench-team.php, line 1111

get_alltime_wins – Sports_Bench_Team::get_alltime_wins()

Returns the number of all-time wins for a team.

Returns

  • int, the number of all-time wins for a team

Since: 1.0
Source: sports-bench-team.php, line 1151

get_alltime_losses – Sports_Bench_Team::get_alltime_losses()

Returns the number of all-time losses for a team.

Returns

  • int, the number of all-time losses for a team

Since: 1.0
Source: sports-bench-team.php, line 1172

get_alltime_draws – Sports_Bench_Team::get_alltime_draws()

Returns the number of all-time draws for a team.

Returns

  • int, the number of all-time draws for a team

Since: 1.0
Source: sports-bench-team.php, line 1193

get_alltime_record – Sports_Bench_Team::get_alltime_record()

Returns the all-time record for a team as an array.

Returns

  • array, all-time wins, losses and draws for a team

Since: 1.0
Source: sports-bench-team.php, line 1214

get_roster – Sports_Bench_Team::get_roster()

Returns the team’s roster as an array.

Returns

  • array, the team’s roster

Since: 1.0
Source: sports-bench-team.php, line 1229

get_team_photo – Sports_Bench_Team::get_team_photo( $image )

Returns the html to display either the team photo or the team logo.

Parameters

  • $image, string, the type of image to be shown, either team-photo or team-logo

Returns

  • string|void, html to display the image

Since: 1.0
Source: sports-bench-team.php, line 1264

get_average_attendance – Sports_Bench_Team::get_average_attendance( $season )

Returns the average attendance for a team for a season.

Parameters

  • $season, string, the season to grab the average attendance from

Returns

  • float, average attendance for a team

Since: 1.0
Source: sports-bench-team.php, line 1283

get_permalink – Sports_Bench_Team::get_permalink()

Returns the link to a the team page.

Returns

  • string, link to team page

Since: 1.0
Source: sports-bench-team.php, line 1305

get_division_name – Sports_Bench_Team::get_division_name()

Returns the name of the division or conference that the team is in.

Returns

  • string, division name

Since: 1.0
Source: sports-bench-team.php, line 1320

get_years – Sports_Bench_Team::get_years()

Returns the range of years the team has been in the league.

Returns

  • string, html for the years the team’s been in the league

Since: 1.5
Source: sports-bench-team.php, line 1339

Display Functions

These functions control how things are displayed. For example, you’ll find functions that show the color or colors of a team in the border top of a div. Or, you’ll see a function that display’s a label head for a story.

sports_bench_border_top_colors – sports_bench_border_top_colors( $team_one_id, $team_two_id = null, $div = null )

Returns a top border color for the team(s) involved.

Parameters

  • $team_one_id, integer, required, the team id for the first team involved
  • $team_two_id, integer, optional, the team id for the second team involved
  • $div, string, optional, id for the div to affect if two teams are involved

Returns

  • string, the css to show a 2px border top for a div that’s one color if one team is called or half and half if two teams are called

Since: 1.0
Source: display-functions.php, line 33

sports_bench_division_color – sports_bench_division_color( $division_id )

Returns the color of a conference to display in the standings tables.

Parameters

  • $division_id, integer, required, the id of the division or conference

Returns

  • string, the hexadecimal value of the color of the conference or the division’s conference

Since: 1.0
Source: display-functions.php, line 74

sports_bench_team_horizontal_gradient – sports_bench_team_horizontal_gradient( $team_color )

Returns the css for a horizontal gradient for a team.

Parameters

  • $team_color, string, required, the color for the team that you want to create the gradient for

Returns

  • string, the css for horizontal gradient

Since: 1.0
Source: display-functions.php, line 100

sports_bench_show_team_border_colors – sports_bench_show_team_border_colors()

Returns the CSS/HTML to show colors for the posts based on the team(s) involved.

Returns

  • string, css/html to show team colors

Since: 1.0
Source: display-functions.php, line 346

sports_bench_show_label_head – sports_bench_show_label_head()

Returns the HTML to show the label head for a story.

Returns

  • string, html to display the appropriate label head

Since: 1.0
Source: display-functions.php, line 394

sports_bench_show_slider_game_info – sports_bench_show_slider_game_info()

Returns the HTML to show a game in the home page slider.

Returns

  • string, html to show a game in the slider

Since: 1.0
Source: display-functions.php, line 429

sports_bench_hex2rgba – sports_bench_hex2rgba($color, $opacity = false)

Returns the rgba value for a color’s hexidecimal value.

Parameters

  • $color, string, required, hexidecimal value of the color
  • $opacity, boolean|float, optional, the opacity of the color between 0 and 1, or false for fully opaque

Returns

  • string, the rgba color value for a color

Since: 1.0
Source: display-functions.php, line 480

sports_bench_show_google_maps – sports_bench_show_google_maps( $game )

Returns the iframe to the show the Google Maps view of the stadium for the game.

Parameters

  • $game, Sports Bench Game object, required, the game to retreive the map from

Returns

  • string, iframe with the Google Map of the Stadium

Since: 1.4
Source: display-functions.php, line 527

sports_bench_show_recap_abbreviation_guide – sports_bench_show_recap_abbreviation_guide()

Returns the abbreviation guide to be shown under a game recap for the used sport.

Returns

  • string, abbreviation guide for a game recap

Since: 1.4
Source: display-functions.php, line 546

sports_bench_show_stats_abbreviation_guide – sports_bench_show_stats_abbreviation_guide()

Returns the abbreviation guide to be shown under player and team stats for the used sport.

Returns

  • string, abbreviation guide for player and team stats

Since: 1.4
Source: display-functions.php, line 577

Game Preview Functions

These functions control how the game preview section looks on a post that’s marked as a preview for a game.

sports_bench_show_game_preview_info – sports_bench_show_game_preview_info()

Returns the html to show a preview for a game.

Returns

  • string, html to show the game preview

Since: 1.0
Source: display-functions.php, line 108

Game Recap Functions

These functions control how the game recap section looks on a post that’s marked as a recap for a game.

sports_bench_show_game_stats_info – sports_bench_show_game_stats_info()

Returns the html to show the stats and info for a game.

Returns

  • string, html to show game stats and info

Since: 1.0
Source: display-functions.php, line 224

sports_bench_show_game_info – sports_bench_show_game_info( $game_id )

Returns the attendance, date and time and location for a completed game

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, basic info for a completed game

Since: 1.0
Source: display-functions.php, line 301

sports_bench_get_linescore – sports_bench_get_linescore( $game_id )

Returns an array that contains the innings each team score and how much they scored in that inning. Only for baseball.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • array, innings each team scored and how much they scored

Since: 1.0
Source: baseball-game-info.php, line 25

sports_bench_get_linescore_display – sports_bench_get_linescore_display( $game_id )

Returns the html to display the linescore for a game.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, html to show the linescore

Since: 1.0
Source: baseball-game-info.php, line 74; basketball-game-info.php, line 24; football-game-info.php, line 24; hockey-game-info.php, line 25; rugby-game-info.php, line 24; soccer-game-info.php, line 25; volleyball-game-info.php, line 24

sports_bench_get_team_stats_info – sports_bench_get_team_stats_info( $game_id )

Returns html to display the team stats for both teams for a game.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, html to show the team stats

Since: 1.0
Source: basketball-game-info.php, line 45; football-game-info.php, line 66; hockey-game-info.php, line 68; rugby-game-info.php, line 67; soccer-game-info.php, line 65; volleyball-game-info.php, line 46

sports_bench_get_game_stat – sports_bench_get_game_stat( $game, $home_away, $stat )

Returns a team stat from a game.

Parameters

  • $game, Sports Bench Game Object, required, the game object for the game
  • $home_away, string, required, whether the team stat is for the home or away team
  • $stat, string, required, the stat to grab

Returns

  • int, team stat from a game

Since: 1.0
Source: baseball-game-info.php, line 97

sports_bench_get_score_info – sports_bench_get_score_info( $game_id )

Returns the html to display the game events from a game.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, html to show run-scoring plays

Since: 1.0
Source: baseball-game-info.php, line 115; football-game-info.php, line 45; hockey-game-info.php, line 47; rugby-game-info.php, line 46: soccer-game-info.php, line 46

sports_bench_get_away_individual_stats – sports_bench_get_away_individual_stats( $game_id )

Returns the html to show the individual player stats for the visiting team.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, html to show away individual stats

Since: 1.0
Source: baseball-game-info.php, line 136; basketball-game-info.php, line 66; football-game-info.php, line 88; hockey-game-info.php, line 89; rugby-game-info.php, line 88; soccer-game-info.php, line 86; volleyball-game-info.php, line 100

sports_bench_get_home_individual_stats – sports_bench_get_home_individual_stats( $game_id )

Returns the html to show the individual player stats for the home team.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • string, html to show home individual stats

Since: 1.0
Source: baseball-game-info.php, line 157; baseball-game-info.php, line 87; basketball-game-info.php, line 119; hockey-game-info.php, line 110; rugby-game-info.php, line 109; soccer-game-info.php, line 107; volleyball-game-info.php, line 121

sports_bench_total_points – sports_bench_total_points( $game_id )

Returns the total points for the teams in a match.

Parameters

  • $game_id, integer, required, the id for the game

Returns

  • array, the total points for each team in a match

Since: 1.4
Source: volleyball-game-info.php, line 67

Playoff Functions

sports_bench_show_playoff_bracket – sports_bench_show_playoff_bracket( $bracket_id )

Returns the HTML to show a playoff bracket.

Parameters

  • $bracket_id, integer, required, the id of the bracket

Returns

  • string, html to display the bracket

Since: 1.2
Source: playoff-functions.php, line 25

Standings Functions

These functions deal with the standings and how they are displayed. You’ll find the ability to show the league standings all together or standings for a specific conference or division.

sports_bench_team_division_standings – sports_bench_team_division_standings( $division_id )

Returns the html to show the division standings for a team on the team template.

Parameters

  • $division_id, integer, required, the id of the division

Returns

  • string, html to show division standings

Since: 1.0
Source: standings.php, line 25

sports_bench_all_team_standings – sports_bench_all_team_standings()

Returns the html to show the entire league standings without conferences or divisions.

Returns

  • string, html to show division standings

Since: 1.0
Source: standings.php, line 43

sports_bench_conference_division_standings – sports_bench_conference_division_standings( $division_id )

Returns the html to show the entire league standings without conferences or divisions.

Parameters

  • $division_id, integer, required, the id of the division or conference

Returns

  • string, html to show division standings

Since: 1.0
Source: standings.php, line 64

sports_bench_widget_standings – sports_bench_widget_standings( $division_id = null )

Returns the html to show the entire league standings without conferences or divisions.

Parameters

  • $division_id, integer, optional, the id of the division or conference

Returns

  • string, html to show league, conference or division standings

Since: 1.0
Source: standings.php, line 107

sports_bench_standings_page_template – sports_bench_standings_page_template()

Returns the html to display the league, conference and/or division standings.

Returns

  • string, html to display the standings

Since: 1.0
Source: standings.php, line 158

Scoreboard Functions

These functions deal with how the scoreboard and scoreboard bar (if you want to use one) look on the page.

sports_bench_scoreboard_bar – sports_bench_scoreboard_bar( $class = ” )

Returns the html to display the scoreboard banner across the top of the site.

Parameters

  • $class, string, optional, classes to add to the scoreboard bar

Returns

 

  • string, html to display the scoreboard bar

Since: 1.0
Source: scoreboard.php, line 25

sports_bench_scoreboard_page_template – sports_bench_scoreboard_page_template()

Returns the html to display the league scoreboard on the page.

Returns

  • string, html to show the scoreboard

Since: 1.0
Source: scoreboard.php, line 341

sports_bench_is_game_time_set – sports_bench_is_game_time_set( $time )

Returns whether the game time for a game has been set.

Parameters

  • $time, DateTime, required, the date and time for a game

Returns

  • boolean, whether or not a time has been set for a game

Since: 1.4
Source: scoreboard.php, line 429

Stats Functions

These functions deal with how stats leaders are found and displayed on the page.

sports_bench_get_stats_leaders – sports_bench_get_stats_leaders( $stat, $season )

Returns the leaderboard for a given statistics.

Parameters

  • $stat, string, required, the stat for the leaderboard
  • $season, string, required, the season for the leaderboard

Returns

  • string, leaders of a selected statistic

Since: 1.0
Source: statistics.php, line 27

get_more_stats_leaders – get_more_stats_leaders( $stat, $season, $offset = 0 )

Returns 10 more statistical leaders for a specific stat.

Parameters

  • $stat, string, required, the stat for the leaderboard
  • $season, string, required, the season for the leaderboard
  • $offset, integer, optional, the number of players to skip in the list

Returns

  • string, the next 10 leaders of a selected statistic

Since: 1.0
Source: statistics.php, line 619

sports_bench_get_stat_title – sports_bench_get_stat_title( $stat )

Returns the stat name for a given key.

Parameters

  • $stat, string, required, the stat slug to get the name from

Returns

  • string, statistic name

Since: 1.0
Source: statistics.php, line 1246

sports_bench_stats_page_template – sports_bench_stats_page_template()

Returns the html to show the stats leaderboard on a page.

Returns

  • string, html to display the stats leadboards

Since: 1.0
Source: statistics.php, line 1445

sports_bench_get_ERA – sports_bench_get_ERA( $earned_runs, $innings_pitched, $innings_per_game )

Returns the earned run average for a pitcher.

Parameters

  • $earned_runs, integer, required, the number of earned runs given up
  • $innings_pitched, float, required, the number of innings pitched
  • $innings_per_game, int, required, the number of innings per game

Returns

  • float, earned run average

Since: 1.0
Source: baseball-player-info.php, line 29

sports_bench_get_batting_average – sports_bench_get_batting_average( $at_bats, $hits )

Returns the batting average for a hitter.

Parameters

  • $at_bats, integer, required, the number of at bats
  • $hits, integer, required, the number of hits

Returns

  • float, batting average

Since: 1.0
Source: baseball-player-info.php, line 53

sports_bench_stat_exists – sports_bench_stat_exists( $player, $stat )

Takes a player’s set of stats and checks to see if a specific stat exists.

Parameters

  • $player, array, required, array of season stats for a player
  • $stat, integer, required, the stat slug to look for

Returns

  • boolean, whether the stat exists or not

Since: 1.0
Source: baseball-player-info.php, line 53; football-player-info.php, line 27; hockey-player-info.php, line 44; soccer-player-info.php, line 45

sports_bench_get_season_stats – sports_bench_get_season_stats( $player )

Returns the table to display the career stats for a player by season and by team (if player played for multiple teams in a season).

Parameters

  • $player, Sports Bench Player object, required, the player object for the player

Returns

  • string, html to show the player stats table

Since: 1.0
Source: baseball-player-info.php, line 90; basketball-player-info.php, line 62; football-player-info.php, line 46; hockey-player-info.php, line 63; rugby-player-info.php, line 25; soccer-player-info.php, line 64; volleyball-player-info.php, line 49

sports_bench_get_pitcher_wins – sports_bench_get_pitcher_wins( $player_id, $season )

Returns the number of wins for a pitcher.

Parameters

  • $player_id, integer, required, the id of the player
  • $season, string, required, the season to grab the wins from

Returns

  • float, wins for a pitcher

Since: 1.0
Source: baseball-player-info.php, line 182

sports_bench_get_pitcher_losses – sports_bench_get_pitcher_losses( $player_id, $season )

Returns the number of losses for a pitcher.

Parameters

  • $player_id, integer, required, the id of the player
  • $season, string, required, the season to grab the losses from

Returns

  • float, losses for a pitcher

Since:** 1.0
Source: baseball-player-info.php, line 206

sports_bench_get_pitcher_record – sports_bench_get_pitcher_record( $player_id, $season )

Returns a pitcher’s record as an array.

Parameters

  • $player_id, integer, required, the id of the player
  • $season, string, required, the season to grab the losses from

Returns

  • array, pitcher’s record

Since: 1.0
Source: baseball-player-info.php, line 230

sports_bench_get_pitcher_saves – sports_bench_get_pitcher_saves( $player_id, $season )

Returns the number of saves for a pitcher.

Parameters

  • $player_id, integer, required, the id of the player
  • $season, string, required, the season to grab the losses from

Returns

  • int, number of pitcher’s saves

Since: 1.0
Source: baseball-player-info.php, line 249

sports_bench_get_points_average – sports_bench_get_points_average( $points, $games )

Returns the points average for a player.

Parameters

  • $points, integer, required, the number of points
  • $games, integer, required, the number of games played

Returns

  • float, points average

Since: 1.0
Source: basketball-player-info.php, line 27

sports_bench_get_shooting_average – sports_bench_get_shooting_average( $made, $attempts )

Returns the shooting percentage for a player.

Parameters

  • $made, integer, required, the number of shots made
  • $attempts, integer, required, the number of shot attempts

Returns

  • float, shooting percentage

Since: 1.0
Source: basketball-player-info.php, line 45

sports_bench_get_goals_against_average – sports_bench_get_goals_against_average( $goals_allowed, $games_played )

Returns the goals against average for a goalie.

Parameters

  • $goals_allowed, integer, required, the number of goals allowed
  • $games_player, integer, required, the number of games played

Returns

  • float, goals against average for a goalie

Since: 1.0
Source: hockey-player-info.php, line 26; soccer-player-info.php, line 27

sports_bench_get_hitting_percentage – sports_bench_get_hitting_percentage( $attacks, $kills, $errors )

Returns the goals against average for a goalie.

Parameters

  • $attacks, integer, required, the number of attacks
  • $kills, integer, required, the number of kills
  • $errors, integer, required, the number of hitting errors

Returns

  • string|float, hitting percentage

Since: 1.4
Source: volleyball-player-info.php, line 29

Player Functions

These functions deal with how player information is grabbed and displayed on the page.

sports_bench_show_team_player_select – sports_bench_show_team_player_select()

Returns the HTML for the team player select section of the player page.

Returns

 

  • string, html for the team player select

Since: 1.3
Source: player-functions.php, line 112

sports_bench_show_player_info – sports_bench_show_player_info( $player_id )

Returns the html to show player information.

Parameters

  • $player_id, integer, required, the id of the player

Returns

  • string, html for the player information

Since: 1.3
Source: player-functions.php, line 139

Team Functions

These functions deal with how teams and their information are grabbed and displayed on the page.

sports_bench_get_teams – sports_bench_get_teams( $alphabetical = false, $active = true, $division_id = 0 )

Returns an array of teams.

Parameters

  • $alphabetical, boolean, optional, whether to list the teams in alphabetical order
  • $active, boolean, optional, whether to show only active teams or all teams
  • $division_id, integer, optional, the id for the division or conference to get the teams from. An id of 0 returns all teams

Returns

  • array, list of all of the teams in team_id => team_name pairs

Since: 1.0
Source: team-functions.php, line 29

sports_bench_show_roster – sports_bench_show_roster( $team_id )

Returns the html to show a team’s roster with player information.

Parameters

  • $team_id, integer, required, the id for the team

Returns

  • string, html to show the team’s roster

Since: 1.0
Source: team-functions.php, line 96

sports_bench_show_team_schedule – sports_bench_show_team_schedule( $team_id )

Returns the html to show a team’s schedule for the current season.

Parameters

  • $team_id, integer, required, the id for the team

Returns

  • string, html to show a team’s schedule

Since: 1.0
Source: team-functions.php, line 159

sports_bench_show_team_listing – sports_bench_show_team_listing()

Returns the html to show the teams and their info on a page.

Returns

  • string, html to display the teams

Since: 1.0
Source: team-functions.php, line 239

sports_bench_show_team_info – sports_bench_show_team_info( $team_id )

Returns the html to show team information.

Parameters

  • $team_id, integer, required, the id for the team

Returns

  • string, html to show team info

Since:** 1.0
Source: team-functions.php, line 262

sports_bench_get_players_stats – sports_bench_get_players_stats( $team_id, $season )

Returns the html to show team information.

Parameters

  • $team_id, integer, required, the id for the team
  • $season, string, required, season to grab the stats from

Returns

  • array, player stats for the season for a team

Since: 1.0
Source: baseball-team-functions.php, line 27; basketball-team-functions.php, line 27; football-team-info.php, line 27; hockey-team-info.php, line 27; rugby-team-info.php, line 27; soccer-team-info.php, line 27; volleyball-team-info.php, line 27

sports_bench_get_players_stats_table – sports_bench_get_players_stats_table( $player_stats_array )

Returns the html to display player stats for a season for a team.

Parameters

  • $player_stats_array, array, required, array of players for a team and their season stats

Returns

  • string, html to show player stats

Since: 1.0
Source: baseball-team-functions.php, line 90; basketball-team-functions.php, line 83; football-team-info.php, line 94; hockey-team-info.php, line 80; rugby-team-info.php, line 74; soccer-team-info.php, line 76; volleyball-info.php, line 81

sports_bench_get_points – sports_bench_get_points( $team_id )

Returns the number of points a team has in a season.

Parameters

  • $team_id, integer, required, the id for the team

Returns

  • int, number of points for a team

Since: 1.0
Source: hockey-team-info.php, line 95; rugby-team-info.php, line 90; soccer-team-info.php, line 92

Filters

sports_bench_before_game_preview – apply_filters( ‘sports_bench_before_game_preview’, $html, $away_team, $home_team )

Outputs HTML for before the game preview.

Parameters

  • $html, string, the current html that’s being outputted
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the html that will be before the game preview

Since: 1.5
Source: display-functions.php, line 148

sports_bench_game_preview – apply_filters( ‘sports_bench_game_preview’, $html, $game, $away_team, $away_team_name, $away_record, $away_score, $home_team, $home_team_name, $home_record, $home_score )

Outputs the game preview

Parameters

  • $html, string, the current html that’s being outputted
  • $game, Sports_Bench_Game object, the game object for the current game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $away_team_name, string, team name for the away team
  • $away_record, string, the record for the away team
  • $away_score, integer, the score for the away team if the game is over
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $home_team_name, string, team name for the home team
  • $home_record, string, the record for the home team
  • $home_score, integer, the score for the home team if the game is over

Returns

  • string, the html for the game preview

Since: 1.5
Source: display-functions.php, line 149

sports_bench_after_game_preview – apply_filters( ‘sports_bench_after_game_preview’, $html, $away_team, $home_team )

Outputs the HTML for after the game preview

Parameters

  • $html, string, the current html that’s being outputted
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the html that will be after the game preview

Since: 1.5
Source: display-functions.php, line 150

sports_bench_game_preview_row – apply_filters( ‘sports_bench_game_preview_row’, $styles, $team )

Output styles for a team row in the game preview

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: display-functions.php, line 158, 164

sports_bench_game_stats_info – apply_filters( ‘sports_bench_game_stats_info’, $html, $game, $away_team, $home_team )

Outputs the game stats section for the game recap

Parameters

  • $html, string, the current html that’s being outputted
  • $game, Sports_Bench_Game object, the game object for the current game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, HTML for the game stats section for a game recap

Since: 1.5
Source: display-functions.php, line 205

sports_bench_game_info – apply_filters( ‘sports_bench_game_info’, $html, $game, $home_team )

Outputs the HTML for the game information section

Parameters

  • $html, string, the current html that’s being outputted
  • $game, Sports_Bench_Game object, the game object for the current game
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, HTML for the game information section

Since: 1.5
Source: display-functions.php, line 265

sports_bench_linescore_row – apply_filters( ‘sports_bench_linescore_row’, $styles, $team )

Output styles for a team row in the game linescore table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: display-functions.php, line 572, 599, 648, 667, 707, 724, 764, 783, 824, 842, 884, 902, 944, 963

sports_bench_game_event_row – apply_filters( ‘sports_bench_game_event_row’, $styles, $team )

Output styles for a team row in the game linescore table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: display-functions.php, line 1012, 1055, 1128, 1160, 1181, 1210

sports_bench_game_recap_team_stats_head_cell – apply_filters( ‘sports_bench_game_recap_team_stats_head_cell’, $styles, $team )

Output styles for a team cell in the table heading for team stats

Parameters

  • $styles, string, current styles for the table head cell
  • $team, Sports_Bench_Team object, the team that this cell is for

Returns

  • string, the CSS styles for the cell

Since: 1.5
Source: display-functions.php, line 1230, 1231, 1235, 1236, 1324, 1325, 1329, 1330, 1393, 1394, 1398, 1399, 1445, 1446, 1450, 1451, 1569, 1570, 1574, 1575, 1635, 1636, 1640, 1641

sports_bench_game_recap_team_stats_cell – apply_filters( ‘sports_bench_game_recap_team_stats_cell’, $styles, $team )

Output styles for a team cell in the table heading for team stats

Parameters

  • $styles, string, current styles for the table row cell
  • $team, Sports_Bench_Team object, the team that this cell is for

Returns

  • string, the CSS styles for the cell

Since: 1.5
Source: display-functions.php, line 1242-1313, 1336-1382, 1405-1433, 1457-1558, 1581-1622, 1647-1688

sports_bench_individual_stat_head_row – apply_filters( ‘sports_bench_individual_stat_head_row’, $styles, $team )

Output styles for the table head row for the individual stats

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: display-functions.php, line 1709, 1741, 1790, 1829, 1839, 1881, 1909, 1935, 1961, 1999, 2027, 2054, 2101, 2139, 2178, 2212, 2241, 2277

sports_bench_individual_stat_row – apply_filters( ‘sports_bench_individual_stat_row’, $styles, $team )

Output styles for the table body row for the individual stats

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: display-functions.php, line 1725, 1772, 1814, 1857, 1895, 1922, 1948, 1980, 2013, 2040, 2082, 2124, 2158, 2195, 2226, 2259, 2293

sports_bench_player_listing_information – apply_filters( ‘sports_bench_player_listing_information’, $html, $player, $team, $num_players, $count )

Outputs the HTML for the player information on the player listing page

Parameters

  • $html, string, current HTML being outputted
  • $player, Sports_Bench_Player object, the player object for the current player
  • $team, Sports_Bench_Team object, the team object for the current team
  • $num_players, integer, the number of total players on the given team
  • $count, integer, the current count of players being looped through

Returns

  • string, the HTML for the player listing

Since: 1.5
Source: player-functions.php, line 32

sports_bench_before_player_info – apply_filters( ‘sports_bench_before_player_info’, $html, $team )

Outputs HTML for before the player listing information

Parameters

  • $html, string, the current html that’s being outputted
  • $away_team, Sports_Bench_Team object, the team object for the player’s team

Returns

  • string, the html that will be before the player listing information

Since: 1.5
Source: player-functions.php, line 63

sports_bench_after_player_info – apply_filters( ‘sports_bench_after_player_info’, $html, $team )

Outputs HTML for after the player listing information

Parameters

  • $html, string, the current html that’s being outputted
  • $away_team, Sports_Bench_Team object, the team object for the player’s team

Returns

  • string, the html that will be after the player listing information

Since: 1.5
Source: player-functions.php, line 79

sports_bench_player_information – apply_filters( ‘sports_bench_player_information’, $html, $player, $team )

Outputs the HTML for the player information on the player page

Parameters

    • $html, string, current HTML being outputted
    • $player, Sports_Bench_Player object, the player object for the current player

$team, Sports_Bench_Team object, the team object for the player’s team

Returns

  • string, the HTML for the player listing

Since: 1.5
Source: player-functions.php, line 110

sports_bench_player_stats_head_row – apply_filters( ‘sports_bench_player_stats_head_row’, $styles, $player )

Output styles for the table head row for the player’s career stats

Parameters

  • $styles, string, current styles for the row
  • $player, Sports_Bench_Player object, the player that this table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: player-functions.php, line 179, 226, 272, 290, 367, 397, 425, 453, 491, 521, 551, 606, 635, 691, 746

sports_bench_player_stats_row – apply_filters( ‘sports_bench_player_stats_row’, $styles, $player )

Output styles for the table body row for the player’s career stats

Parameters

  • $styles, string, current styles for the row
  • $player, Sports_Bench_Player object, the player that this table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: player-functions.php, line 203, 247, 339, 380, 409, 437, 470, 505, 533, 583, 618, 668, 723, 785

sports_bench_playoff_series – apply_filters( ‘sports_bench_playoff_series’, $html, $series, $team_one, $team_one_class, $team_one_name, $team_two, $team_two_class, $team_two_name, $game_numbers )

Outputs the HTML for the playoff series in a bracket

Parameters

  • $html, string, current HTML being outputted
  • $series, Sports_Bench_Series object, the series object for the current playoff series
  • $team_one, Sports_Bench_Team object, the team object for the first team in the playoff series
  • $team_one_class, string, the CSS class for the first team
  • $team_one_name, string, the name of the first team in the series
  • $team_two, Sports_Bench_Team object, the team object for the second team in the playoff series
  • $team_two_class, string, the CSS class for the second team
  • $team_two_name, string, the name of the second team in the series
  • $game_numbers, string, list of game ids for the current series

Returns

  • string, the HTML to show the playoff series

Since: 1.5

Source: playoff-function.php, line 111, 133, 156, 179, 202, 225, 267, 289, 311, 334, 357, 399, 421, 443, 465, 487

sports_bench_playoff_team_row – apply_filters( ‘sports_bench_playoff_team_row’, $styles, $$team )

Output styles for the table body row for a team in the playoff series

Parameters

  • $styles, string, current styles for the row
  • $player, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: playoff-functions.php, line 506, 513

sports_bench_scoreboard_left – apply_filters( ‘sports_bench_scoreboard_left’, $html, $location )

Outputs the HTML for the left side of the scoreboard navigation

Parameters

  • $html, string, current HTML for the left side div
  • $location, string, whether this for the scoreboard bar, widget or page

Returns

  • string, the HTML for the left side of the scoreboard navigation

Since: 1.5
Source: scoreboard.php, line 67, 387

sports_bench_scoreboard_right – apply_filters( ‘sports_bench_scoreboard_right’, $html, $location )

Outputs the HTML for the left side of the scoreboard navigation

Parameters

  • $html, string, current HTML for the right side div
  • $location, string, whether this for the scoreboard bar, widget or page

Returns

  • string, the HTML for the right side of the scoreboard navigation

Since: 1.5
Source: scoreboard.php, line 83, 397

sports_bench_scoreboard_bar_game – apply_filters( ‘sports_bench_scoreboard_bar_game’, $html, $game )

Outputs the HTML for a game in the scoreboard bar

Parameters

  • $html, string, the current HTML for the game
  • $game, Sports_Bench_Game object, the game object for the current game

Returns

  • string, the HTML for the game in the scoreboard bar

Since: 1.5
Source: scoreboard.php, line 75

sports_bench_scoreboard_game – apply_filters( ‘sports_bench_scoreboard_game’, $html, $game, $count, $num_games )

Outputs the HTML for a game in the scoreboard

Parameters

  • $html, string, the current HTML for the game
  • $game, Sports_Bench_Game object, the game object for the current game
  • $count, integer, the current count of games being looped through
  • $num_games, integer, the total number of games

Returns

  • string, the HTML for the game in the scoreboard

Since: 1.5
Source: scoreboard.php, line 219, 407

sports_bench_scoreboard_widget_game – apply_filters( ‘sports_bench_scoreboard_widget_game’, $html, $game )

Outputs the HTML for a game in the scoreboard widget

Parameters

  • $html, string, the current HTML for the game
  • $game, Sports_Bench_Game object, the game object for the current game

Returns

  • string, the HTML for the game in the scoreboard widget

Since: 1.5
Source: scoreboard.php, line 304

sports_bench_before_scoreboard_widget_game – apply_filters( ‘sports_bench_before_scoreboard_widget_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for before a game in the scoreboard widget

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for before the game in the scoreboard widget

Since: 1.5
Source: scoreboard.php, line 485

sports_bench_scoreboard_row_styles – apply_filters( ‘sports_bench_scoreboard_row_styles’, $styles, $team, $location )

Output styles for the table body row for a team in the scoreboard game

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for
  • $location, string, whether this row is in the scoreboard template or widget

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 488, 494, 658, 664

sports_bench_after_scoreboard_widget_game – apply_filters( ‘sports_bench_after_scoreboard_widget_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for after a game in the scoreboard widget

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for after the game in the scoreboard widget

Since: 1.5
Source: scoreboard.php, line 518

sports_bench_scoreboard_modal – apply_filters( ‘sports_bench_scoreboard_modal’, $html, $game, $away_team, $home_team, $status, $time, $period )

Outputs the HTML for a modal if you want to use one or are using the Sports Bench theme

Parameters

  • $html, string, the current HTML for the modal
  • $game, Sports_Bench_Game object, the game object for the current game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $status, string, the status for the game
  • $time, string, the current time in the game
  • $period, string, the current period, half, set or quarter the game is in

Returns

  • string, the HTML for the modal

Since: 1.5
Source: scoreboard.php, line 520, 686

sports_bench_before_scoreboard_bar_game – apply_filters( ‘sports_bench_before_scoreboard_bar_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for before a game in the scoreboard bar

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for before the game in the scoreboard bar

Since: 1.5
Source: scoreboard.php, line 561

sports_bench_scoreboard_bar_row_styles – apply_filters( ‘sports_bench_scoreboard_bar_row_styles’, $styles, $team )

Output styles for the table body row for a team in the scoreboard game

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team that this row is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 565, 571

sports_bench_after_scoreboard_bar_game – apply_filters( ‘sports_bench_after_scoreboard_bar_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for after a game in the scoreboard bar

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for after the game in the scoreboard bar

Since: 1.5
Source: scoreboard.php, line 597

sports_bench_before_scoreboard_game – apply_filters( ‘sports_bench_before_scoreboard_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for before a game in the scoreboard template

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for before the game in the scoreboard template

Since: 1.5
Source: scoreboard.php, line 651

sports_bench_after_scoreboard_game – apply_filters( ‘sports_bench_after_scoreboard_game’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for after a game in the scoreboard template

Parameters

  • $html, string, the current HTML for the game
  • $game_id, integer, the game id for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML for after the game in the scoreboard template

Since: 1.5
<strongSource: scoreboard.php, line 689

sports_bench_game_shortcode_game_row – apply_filters( ‘sports_bench_game_shortcode_game_row’, $styles, $game, $away_team, $home_team )

Output styles for the table body row for the game shortcode

Parameters

  • $styles, string, current styles for the row
  • $game, Sports_Bench_Game object, the game object for the game that’s being used
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the away team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 761

sports_bench_rivalry_shortcode_top_row – apply_filters( ‘sports_bench_rivalry_shortcode_top_row’, $styles, $game_id, $team_one, $team_two )

Output styles for the table body row for the top table in the rivalry shortcode

Parameters

  • $styles, string, current styles for the row
  • $game_id, integer, the game id for the game that’s being used
  • $team_one, Sports_Bench_Team object, the team object for the first team
  • $team_two, Sports_Bench_Team object, the team object for the second team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 761

sports_bench_rivalry_shortcode_recent_head_row – apply_filters( ‘sports_bench_rivalry_shortcode_recent_head_row’, $styles, $team_one, $team_two )

Output styles for the table head row for the recent games table in the rivalry shortcode

Parameters

  • $styles, string, current styles for the row
  • $team_one, Sports_Bench_Team object, the team object for the first team
  • $team_two, Sports_Bench_Team object, the team object for the second team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 802

sports_bench_rivalry_shortcode_recent_row – apply_filters( ‘sports_bench_rivalry_shortcode_recent_row’, $styles, $game_id, $team_one, $team_two )

Output styles for the table body row for the recent games table in the rivalry shortcode

Parameters

  • $styles, string, current styles for the row
  • $game_id, integer, the game id for the game that’s being used
  • $team_one, Sports_Bench_Team object, the team object for the first team
  • $team_two, Sports_Bench_Team object, the team object for the second team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: scoreboard.php, line 832

sports_bench_team_roster_table – apply_filters( ‘sports_bench_team_roster_table’, $html, $players, $team_id )

Outputs the table for the team’s roster

Parameters

  • $html, string, the current HTML for the table
  • $players, array, the players and their information that are on the team
  • $team_id, integer, the team id for the team

Returns

  • string, the HTML for the roster table

Since: 1.5
Source: team-functions.php, line 100

sports_bench_team_roster_head_row – apply_filters( ‘sports_bench_team_roster_head_row’, $styles, $team_id )

Outputs styles for the table head row for the team roster table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 108

sports_bench_team_roster_player_row – apply_filters( ‘sports_bench_team_roster_player_row’, $styles, $team_id )

Outputs styles for the table body row for the team roster table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 120

sports_bench_schedule_table – apply_filters( ‘sports_bench_schedule_table’, $html, $schedule, $team_id )

Outputs the table for the team’s schedule

Parameters

  • $html, string, the current HTML for the table
  • $schedule, array, the schedule for the team
  • $team_id, integer, the team id for the team

Returns

  • string, the HTML for the schedule table

Since: 1.5
Source: team-functions.php, line 150

sports_bench_team_schedule_head_row – apply_filters( ‘sports_bench_team_schedule_head_row’, $styles, $team_id )

Outputs styles for the table head row for the team schedule table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 158

sports_bench_team_schedule_game_row – apply_filters( ‘sports_bench_team_schedule_game_row’, $styles, $team_id )

Outputs styles for the table body row for the team schedule table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 190

sports_bench_team_listing_info – apply_filters( ‘sports_bench_team_listing_info’, $html, $team_id, $team_name, $num_teams, $count )

Outputs the HTML for the team listing for the team listing page

Parameters

  • $html, string, the current HTML for the team listing
  • $team_id, integer, the team id for the team
  • $team_name, string, the team name
  • $num_teams, integer, the total number of teams
  • $count, integer, the current count of teams being looped through

Returns

  • string, HTML for the team listing for the team listing page

Since: 1.5
Source: team-functions.php, line 219; shortcodes.php, line 537

sports_bench_team_info – apply_filters( ‘sports_bench_team_info’, $html, $team )

Outputs the HTML for the team information

Parameters

  • $html, string, the current HTML for the team listing
  • $team, Sports_Bench_Team object, the team object for the current team

Returns

  • string, the HTML for the team information

Since: 1.5
Source: team-functions.php, line 239

sports_bench_before_team_listing – apply_filters( ‘sports_bench_before_team_listing’, $html, $current_team )

Outputs the HTML for before the team listing

Parameters

  • $html, string, the current HTML for the listing
  • $current_team, Sports_Bench_Team object, the team object for the current team

Returns

  • string, the HTML to be outputted before the team listing

Since: 1.5
Source: team-functions.php, line 269

sports_bench_after_team_listing – apply_filters( ‘sports_bench_after_team_listing’, $html, $current_team )

Outputs the HTML for after the team listing

Parameters

  • $html, string, the current HTML for the listing
  • $current_team, Sports_Bench_Team object, the team object for the current team

Returns

  • string, the HTML to be outputted after the team listing

Since: 1.5
Source: team-functions.php, line 288

sports_bench_team_shortcode_recent_head_row – apply_filters( ‘sports_bench_team_shortcode_recent_head_row’, $styles, $team_id )

Outputs styles for the table head row for the team shortcode recent games table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team object for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 317

sports_bench_team_shortcode_recent_row – apply_filters( ‘sports_bench_team_shortcode_recent_row’, $styles, $team_id )

Outputs styles for the table body row for the team shortcode recent games table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team object for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 330

sports_bench_team_shortcode_upcoming_head_row – apply_filters( ‘sports_bench_team_shortcode_upcoming_head_row’, $styles, $team_id )

Outputs styles for the table head row for the team shortcode upcoming games table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team object for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 348

sports_bench_team_shortcode_upcoming_row – apply_filters( ‘sports_bench_team_shortcode_upcoming_row’, $styles, $team_id )

Outputs styles for the table body row for the team shortcode upcoming games table

Parameters

  • $styles, string, current styles for the row
  • $team, Sports_Bench_Team object, the team object for the team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: team-functions.php, line 359

sports_bench_stat_leader_table – apply_filters( ‘sports_bench_stat_leader_table’, $html, $players, $stat, $location )

Outputs the leaderboard table for a given stat

Parameters

  • $html, string, the current HTML for the table
  • $the_players, array, the players for the table
  • $stat, string, the stat the table is for
  • $location, string, whether this is the first set of players or not

Returns

  • string, the HTML for the table

Since: 1.5
Source: statistics.php, line 63, 94, 126, 149, 181, 217, 240, 271, 302, 333, 356, 379, 402, 425, 462, 498, 522, 545, 578, 601, 657, 692, 728, 749, 785, 821, 845, 880, 915, 950, 974, 997, 1021, 1046, 1086, 1122, 1148, 1172, 1208, 1232

sports_bench_before_stat – apply_filters( ‘sports_bench_before_stat’, $html, $stat )

Outputs the HTML for before the stat table

Parameters

  • $html, string, the current HTML for the stat table
  • $stat, string, the stat that this table is for

Returns

  • string, the HTML to be outputted before the stat table

Since: 1.5
Source: statistics.php, line 1454

sports_bench_after_stat – apply_filters( ‘sports_bench_after_stat’, $html, $stat )

Outputs the HTML for after the stat table

Parameters

  • $html, string, the current HTML for the stat table
  • $stat, string, the stat that this table is for

Returns

  • string, the HTML to be outputted after the stat table

Since: 1.5
Source: statistics.php, line 1460

sports_bench_stats_head_row – apply_filters( ‘sports_bench_stats_head_row’, $styles, $stat )

Outputs styles for the table head row for the stat leaders table

Parameters

  • $styles, string, current styles for the row
  • $stat, string, the stat this table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: statistics.php, line 1478

sports_bench_stats_player_row – apply_filters( ‘sports_bench_stats_player_row’, $styles, $player, $team, $stat )

Outputs styles for the table body row for the stat leaders table

Parameters

  • $styles, string, current styles for the row
  • $player, Sports_Bench_Player object, the player object for the player this stat is for
  • $team, Sports_Bench_Player object, the team object for the current player’s team
  • $stat, string, the stat this table is for

Returns

  • string, the CSS styles for the row

Since:

1.5
Source: statistics.php, line 1488, 1507

sports_bench_team_player_stats_head_row – apply_filters( ‘sports_bench_team_player_stats_head_row’, $styles, $team_id )

Outputs styles for the table head row for the team stats table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team the table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: statistics.php, line 1535, 1583, 1624, 1642, 1713, 1750, 1785, 1825, 1870, 1907, 1936, 1990, 2019, 2064, 2097, 2128

sports_bench_team_player_stats_row – apply_filters( ‘sports_bench_team_player_stats_row’, $styles, $team_id )

Outputs styles for the table body row for the team stats table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the team the table is for

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: statistics.php, line 1554, 1601, 1678, 1728, 1762, 1797, 1842, 1883, 1919, 1968, 2002, 2039, 2079, 2110, 2153

sports_bench_team_division_standings – apply_filters( ‘sports_bench_team_division_standings’, $html, $teams, $division_id, $sport )

Outputs the HTML for the division/conference standings for a team

Parameters

  • $html, string, current HTML for the standings
  • $teams, array, the teams in the division/conference standings
  • $division_id, integer, the id for the division or conference
  • $sport, string, the sport used for the site

Returns

  • string, the HTML for the conference/division standings

Since: 1.5
Source: standings.php, line 31

sports_bench_standings_table – apply_filters( ‘sports_bench_standings_table’, $html, $teams, $division_id, $sport, $type, $items )

Outputs the HTML for the standings table

Parameters

  • $html, string, current HTML for the standings
  • $teams, array, the teams in the division/conference standings
  • $division_id, integer, the id for the division or conference
  • $sport, string, the sport used for the site
  • $type, string, whether this is all teams, conference or division standings

Returns

  • string, the HTML for the standings table

Since: 1.5
Source: standings.php, line 50, 93

sports_bench_standings_widget – apply_filters( ‘sports_bench_standings_widget’, $html, $teams, $sport, $division )

Outputs the HTML for the widget standings table

Parameters

  • $html, string, current HTML for the standings
  • $teams, array, the teams in the division/conference standings
  • $sport, string, the sport used for the site
  • $division, stdClass object|integer, the data for the division or conference or 0 if the widget is using the league/all option

Returns

  • string, the HTML for the widget standings table

Since: 1.5
Source: standings.php, line 143

sports_bench_before_standings_container – apply_filters( ‘sports_bench_before_standings_container’, $html, $type, $division_id )

Outputs the HTML for before the standings table

Parameters

  • $html, string, the current HTML for the stat table
  • $type, string, whether this is all teams, conference or division standings
  • $division_id, integer, the id for the division or conference

Returns

  • string, the HTML to be outputted before the standings table

Since: 1.5
Source: standings.php, line 193, 212, 240

sports_bench_after_standings_container – apply_filters( ‘sports_bench_after_standings_container’, $html, $type, $division_id )

Outputs the HTML for after the standings table

Parameters

  • $html, string, the current HTML for the stat table
  • $type, string, whether this is all teams, conference or division standings
  • $division_id, integer, the id for the division or conference

Returns

  • string, the HTML to be outputted after the standings table

Since: 1.5
Source: standings.php, line 197, 216, 244

sports_bench_standings_widget_head_row – apply_filters( ‘sports_bench_standings_widget_head_row’, $styles, $division )

Outputs styles for the table head row for the standings widget table

Parameters

  • $styles, string, current styles for the row
  • $division, stdClass object|integer, the data for the division or conference or 0 if the widget is using the league/all option

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: standings.php, line 279, 284, 332, 338, 410, 416

sports_bench_standings_widget_team_row – apply_filters( ‘sports_bench_standings_widget_team_row’, $styles, $team_id )

Outputs styles for the table head row for the standings widget table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the current team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: standings.php, line 299, 352, 430

sports_bench_standings_head_row – apply_filters( ‘sports_bench_standings_head_row’, $styles, $division )

Outputs styles for the table head row for the standings table

Parameters

  • $styles, string, current styles for the row
  • $division, stdClass object|integer, the data for the division or conference or 0 if the standings league/all

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: standings.php, line 479, 525, 587, 672, 796, 922, 1044, 1216, 1415

sports_bench_standings_team_row – apply_filters( ‘sports_bench_standings_team_row’, $styles, $team_id )

Outputs styles for the table head row for the standings table

Parameters

  • $styles, string, current styles for the row
  • $team_id, integer, the team id for the current team

Returns

  • string, the CSS styles for the row

Since: 1.5
Source: standings.php, line 493, 538, 601, 718, 842, 967, 1089, 1274, 1473

sports_bench_before_team_shortcode – apply_filters( ‘sports_bench_before_team_shortcode’, $html, $team )

Outputs the HTML for before the team shortcode

Parameters

  • $html, string, the current HTML for before the team shortcode
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team shortcode

Since: 1.5
Source: shortcodes.php, line 57

sports_bench_after_team_shortcode – apply_filters( ‘sports_bench_after_team_shortcode’, $html, $team )

Outputs the HTML for after the team shortcode

Parameters

  • $html, string, the current HTML for after the team shortcode
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team shortcode

Since: 1.5
Source: shortcodes.php, line 71

sports_bench_team_shortcode_information – apply_filters( ‘sports_bench_team_shortcode_information’, $html, $team, $record )

Outputs the HTML for the team information section of the team shortcode

Parameters

  • $html, string, the current HTML for the team information section
  • $team, Sports_Bench_Team object, the team object for the selected team
  • $record, array, the record for the team in wins, losses and draws/ties

Returns

  • string, the HTML to be outputted for the team information section of the team shortcode

Since: 1.5
Source: shortcodes.php, line 59

sports_bench_team_shortcode_recent_games – apply_filters( ‘sports_bench_team_shortcode_recent_games’, $html, $team, $schedule )

Outputs the HTML for the recent games section of the team shortcode

Parameters

  • $html, string, the current HTML for before the recent games section
  • $team, Sports_Bench_Team object, the team object for the selected team
  • $schedule, array, the recent schedule of games for a team

Returns

  • string, the HTML to be outputted for the recent games section of the team shortcode

Since: 1.5
Source: shortcodes.php, line 64

sports_bench_team_shortcode_upcoming_games – apply_filters( ‘sports_bench_team_shortcode_upcoming_games’, $html, $team, $schedule )

Outputs the HTML for the upcoming games section of the team shortcode

Parameters

  • $html, string, the current HTML for before the upcoming games section
  • $team, Sports_Bench_Team object, the team object for the selected team
  • $schedule, array, the upcoming schedule of games for a team

Returns

  • string, the HTML to be outputted for the upcoming games section of the team shortcode

Since: 1.5
Source: shortcodes.php, line 68

sports_bench_before_player_shortcode – apply_filters( ‘sports_bench_before_player_shortcode’, $html, $player )

Outputs the HTML for before the player shortcode

Parameters

  • $html, string, the current HTML for before the player shortcode
  • $player, Sports_Bench_Player object, the player object for the selected player

Returns

  • string, the HTML to be outputted before the player shortcode

Since: 1.5
Source: shortcodes.php, line 97

sports_bench_after_player_shortcode – apply_filters( ‘sports_bench_after_player_shortcode’, $html, $player )

Outputs the HTML for after the player shortcode

Parameters

  • $html, string, the current HTML for after the player shortcode
  • $player, Sports_Bench_Player object, the player object for the selected player

Returns

  • string, the HTML to be outputted after the player shortcode

Since: 1.5
Source: shortcodes.php, line 103

sports_bench_player_shortcode_information – apply_filters( ‘sports_bench_player_shortcode_information’, $html, $team, $team_id )

Outputs the HTML for the player information section of the player shortcode

Parameters

  • $html, string, the current HTML for the player information section
  • $player, Sports_Bench_Player object, the player object for the selected player
  • $team_id, integer, the team id for the team the player is on

Returns

  • string, the HTML to be outputted for the player information section of the player shortcode

Since: 1.5
Source: shortcodes.php, line 99

sports_bench_before_game_shortcode – apply_filters( ‘sports_bench_before_game_shortcode’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for before the game shortcode

Parameters

  • $html, string, the current HTML for before the game shortcode
  • $game_id, integer, the game id for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML to be outputted before the game shortcode

Since: 1.5
Source: shortcodes.php, line 159

sports_bench_after_game_shortcode – apply_filters( ‘sports_bench_after_game_shortcode’, $html, $game_id, $away_team, $home_team )

Outputs the HTML for after the game shortcode

Parameters

  • $html, string, the current HTML for after the game shortcode
  • $game_id, integer, the game id for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team

Returns

  • string, the HTML to be outputted after the game shortcode

Since: 1.5
Source: shortcodes.php, line 161

sports_bench_game_shortcode_info – apply_filters( ‘sports_bench_game_shortcode_info’, $html, $game, $away_team, $away_team_name, $away_score, $home_team, $home_team_name, $home_score, $time_in_game, $location )

Outputs the HTML for the game information section of the game shortcode

Parameters

  • $html, string, the current HTML for before the player shortcode
  • $game, Sports_Bench_Game object, the game object for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $away_team_name, string, the team name for the away team
  • $away_score, string, the score for the away team if the game is final
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $home_team_name, string, the team name for the home team
  • $home_score, string, the score for the home team if the game is final
  • $time_in_game, string, the current time and period for the game if it is in progress, otherwise it’s the date and time of the game or final
  • $location, string, the location for the game

Returns

  • string, the HTML to be outputted for the game information section of the game shortcode

Since: 1.5
Source: shortcodes.php, line 160

sports_bench_before_player_stats – apply_filters( ‘sports_bench_before_player_stats’, $html, $team )

Outputs the HTML for before the player stats table

Parameters

  • $html, string, the current HTML for before the player stats table
  • $team, Sports_Bench_Team object, the team object for the selected player’s team

Returns

  • string, the HTML to be outputted before the player stats table

Since: 1.5
Source: shortcodes.php, line 326

sports_bench_after_player_stats – apply_filters( ‘sports_bench_after_player_stats’, $html, $team )

Outputs the HTML for after the player stats table

Parameters

  • $html, string, the current HTML for after the player stats table
  • $team, Sports_Bench_Team object, the team object for the selected player’s team

Returns

  • string, the HTML to be outputted after the player stats table

Since: 1.5
Source: shortcodes.php, line 332

sports_bench_before_team_stats – apply_filters( ‘sports_bench_before_team_stats’, $html, $team )

Outputs the HTML for before the team’s player stats table

Parameters

  • $html, string, the current HTML for before the team’s player stats table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team’s player stats table

Since: 1.5
Source: shortcodes.php, line 378

sports_bench_after_team_stats – apply_filters( ‘sports_bench_after_team_stats’, $html, $team )

Outputs the HTML for after the team’s player stats table

Parameters

  • $html, string, the current HTML for after the team’s player stats table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team’s player stats table

Since: 1.5
Source: shortcodes.php, line 381

sports_bench_before_team_roster – apply_filters( ‘sports_bench_before_team_roster’, $html, $team )

Outputs the HTML for before the team’s roster table

Parameters

  • $html, string, the current HTML for before the team’s roster table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team’s roster table

Since: 1.5
Source: shortcodes.php, line 387

sports_bench_after_team_roster – apply_filters( ‘sports_bench_after_team_roster’, $html, $team )

Outputs the HTML for after the team’s roster table

Parameters

  • $html, string, the current HTML for after the team’s roster table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team’s roster table

Since: 1.5
Source: shortcodes.php, line 390

sports_bench_before_team_schedule – apply_filters( ‘sports_bench_before_team_schedule’, $html, $team )

Outputs the HTML for before the team’s schedule table

Parameters

  • $html, string, the current HTML for before the team’s schedule table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team’s schedule table

Since: 1.5
Source: shortcodes.php, line 396

sports_bench_after_team_schedule – apply_filters( ‘sports_bench_after_team_schedule’, $html, $team )

Outputs the HTML for after the team’s schedule table

Parameters

  • $html, string, the current HTML for after the team’s schedule table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team’s schedule table

Since: 1.5
Source: shortcodes.php, line 399

sports_bench_before_team_standings – apply_filters( ‘sports_bench_before_team_standings’, $html, $team )

Outputs the HTML for before the team’s standings table

Parameters

  • $html, string, the current HTML for before the team’s standings table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team’s standings table

Since: 1.5
Source: shortcodes.php, line 409

sports_bench_after_team_standings – apply_filters( ‘sports_bench_after_team_standings’, $html, $team )

Outputs the HTML for after the team’s standings table

Parameters

  • $html, string, the current HTML for after the team’s standings table
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team’s standings table

Since: 1.5
Source: shortcodes.php, line 413

sports_bench_before_team_info – apply_filters( ‘sports_bench_before_team_info’, $html, $team )

Outputs the HTML for before the team’s information section

Parameters

  • $html, string, the current HTML for before the team’s information section
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted before the team’s information section

Since: 1.5
Source: shortcodes.php, line 419

sports_bench_after_team_info – apply_filters( ‘sports_bench_after_team_info’, $html, $team )

Outputs the HTML for after the team’s information section

Parameters

  • $html, string, the current HTML for after the team’s information section
  • $team, Sports_Bench_Team object, the team object for the selected team

Returns

  • string, the HTML to be outputted after the team’s information section

Since: 1.5
Source: shortcodes.php, line 422

sports_bench_before_rivalry_shortcode – apply_filters( ‘sports_bench_before_rivalry_shortcode’, $html, $team_one, $team_two )

Outputs the HTML for before the rivalry shortcode

Parameters

  • $html, string, the current HTML for before the team’s information section
  • $team_one, Sports_Bench_Team object, the team object for the first selected team
  • $team_two, Sports_Bench_Team object, the team object for the second selected team

Returns

  • string, the HTML to be outputted before the rivalry shortcode

Since: 1.5
Source: shortcodes.php, line 505

sports_bench_after_rivalry_shortcode – apply_filters( ‘sports_bench_after_rivalry_shortcode’, $html, $team_one, $team_two )

Outputs the HTML for after the rivalry shortcode

Parameters

  • $html, string, the current HTML for after the team’s information section
  • $team_one, Sports_Bench_Team object, the team object for the first selected team
  • $team_two, Sports_Bench_Team object, the team object for the second selected team

Returns

  • string, the HTML to be outputted after the rivalry shortcode

Since: 1.5
Source: shortcodes.php, line 509

sports_bench_rivalry_shortcode_info – apply_filters( ‘sports_bench_rivalry_shortcode_info’, $html, $team_one, $team_one_name, $team_two, $team_two_name, $series_score )

Outputs the HTML for the rivarly information section of the rivalry shortcode

Parameters

  • $html, string, the current HTML for before the rivarly information section of the rivalry shortcode
  • $team_one, Sports_Bench_Team object, the team object for the first selected team
  • $team_one_name, string, the team name of the first team
  • $team_two, Sports_Bench_Team object, the team object for the second selected team
  • $team_two_name, string, the team name of the first team
  • $series_score, string, the score of the series between the two teams

Returns

  • string, the HTML to be outputted before rivarly information section of the rivalry shortcode

Since: 1.5
Source: shortcodes.php, line 506

sports_bench_after_rivalry_shortcode – apply_filters( ‘sports_bench_after_rivalry_shortcode’, $html, $games, $team_one, $team_two )

Outputs the HTML for the recent games table between the two teams

Parameters

  • $html, string, the current HTML for the recent games table between the two teams
  • $games, array, the games the two teams have played against each other
  • $team_one, Sports_Bench_Team object, the team object for the first selected team
  • $team_two, Sports_Bench_Team object, the team object for the second selected team

Returns

  • string, the HTML to be outputted for the recent games table between the two teams

Since: 1.5
Source: shortcodes.php, line 508

sports_bench_game_linescore – apply_filters( ‘sports_bench_game_linescore’, $html, $game, $away_team, $home_team, $sport, $game_info, $linescore_array )

Outputs the HTML for the linescore table for a game

Parameters

  • $html, string, the current HTML for the linescore table
  • $game, Sports_Bench_Game object, the game object for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $sport, string, the sport that’s being used on the site
  • $game_info, array, information for the game, used for all sports but baseball
  • $linescore_array, array, linescore information for the game, used only for baseball

Returns

  • string, the HTML for the linescore table

Since: 1.5
Source: baseball-game-info.php, line 79; basketball-game-info.php, line 32; football-game-info.php, line 32; hockey-game-info.php, line 34; rugby-game-info.php, line 33; soccer-game-info.php, line 33; volleyball-game-info.php, line 33

sports_bench_game_events – apply_filters( ‘sports_bench_game_events’, $html, $events, $away_team, $home_team, $sport )

Outputs the HTML for the game events table for a game

Parameters

  • $html, string, the current HTML for the game events table
  • $events, array, the list of game events for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $sport, string, the sport that’s being used on the site

Returns

  • string, the HTML for the game events table

Since: 1.5
Source: baseball-game-info.php, line 123; football-game-info.php, line 53; hockey-game-info.php, line 55; rugby-game-info.php, line 54; soccer-game-info.php, line 52

sports_bench_team_stats – apply_filters( ‘sports_bench_team_stats’, $html, $game_info, $away_team, $home_team, $game, $sport )

Outputs the HTML for the team stats table for a game

Parameters

  • $html, string, the current HTML for the team stats table
  • $game_info, array, the list of game team stats for the selected game
  • $away_team, Sports_Bench_Team object, the team object for the away team
  • $home_team, Sports_Bench_Team object, the team object for the home team
  • $game, Sports_Bench_Game object, the game object for the current game
  • $sport, string, the sport that’s being used on the site

Returns

  • string, the HTML for the team stats table

Since: 1.5
Source: basketball-game-info.php, line 53; football-game-info.php, line 75; hockey-game-info.php, line 76; rugby-game-info.php, line 75; soccer-game-info.php, line 73; volleyball-game-info.php, line 54

sports_bench_individual_game_stats – apply_filters( ‘sports_bench_individual_game_stats’, $html, $stats, $team, $away_home, $sport )

Outputs the HTML table for a team’s individual stats for a game

Parameters

  • $html, string, the current HTML for the individual stats table
  • $stats, array, the stats for the table
  • $team, Sports_Bench_Team object, the team object for the team
  • $away_home, string, whether the team is the away or home team
  • $sport, string, the sport that’s being used on the site

Returns

  • string, the HTML for the individual stats table

Since: 1.5
Source: baseball-game-info.php, line 144, 165; basketball-game-info.php, line 74, 95; football-game-info.php, line 107, 138; hockey-game-info.php, line 97, 118; rugby-game-info.php, line 96, 117; soccer-game-info.php, line 94, 115; volleyball-game-info.php, line 99, 120

sports_bench_player_stats_table – apply_filters( ‘sports_bench_player_stats_table’, $html, $player, $sport, $seasons )

Outputs the HTML player’s career stats table

Parameters

  • $html, string, the current HTML for the player stats table
  • $player, Sports_Bench_Player object, the player object for the player
  • $sport, string, the sport that’s being used on the site
  • $seasons, array, the stats for the player

Returns

  • string, the HTML for the player’s career stats table

Since: 1.5
Source: baseball-player-info.php, line 106; basketball-player-info.php, line 78; football-player-info.php, line 61; hockey-player-info.php, line 79; rugby-player-info.php, line 27; soccer-game-info.php, line 66; volleyball-player-info.php, line 51

sports_bench_player_game_stats_table – apply_filters( ‘sports_bench_player_game_stats_table’, $html, $game, $team_id, $seasons, $POST )

Outputs the HTML player’s individual game stats table row

Parameters

  • $html, string, the current HTML for the individual game stats table row
  • $game, array, information for the game
  • $team_id, integer, the team id for the player’s team that season
  • $sport, string, the sport that’s being used on the site
  • $POST, array, information from the screen that can be used (includes team, player and season)

Returns

  • string, the HTML for the player’s individual game stats table row

Since: 1.5
Source: baseball-player-info.php, line 141; basketball-player-info.php, line 113; football-player-info.php, line 96; hockey-player-info.php, line 114; rugby-player-info.php, line 62; soccer-game-info.php, line 100; volleyball-player-info.php, line 86

sports_bench_team_stats_table – apply_filters( ‘sports_bench_team_stats_table’, $html, $player_stats_array, $sport )

Outputs the HTML for the player stats table for a team

Parameters

  • $html, string, the current HTML for the player stats table
  • $player_stats_array, array, the stats for the table
  • $sport, string, the sport that’s being used on the site

Returns

  • string, the HTML for the team’s player’s stats table

Since: 1.5
Source: baseball-team-info.php, line 93; basketball-team-info.php, line 85; football-team-info.php, line 97; hockey-team-info.php, line 82; rugby-team-info.php, line 76; soccer-game-info.php, line 78; volleyball-team-info.php, line 83

WP REST API Integration

JavaScript frameworks and the WP REST API are the hot thing in web development. If you’re creating a site that uses the REST API and any of the popular frameworks, Sports Bench has the tools to help you. Below you’ll find the available endpoints you can use to access players, teams and games hook up the plugin to your website.

Brackets

URLs: /sportsbench/brackets, /sportsbench/brackets/id
Accepted Parameters: bracket_id, num_teams, bracket_format, bracket_title, bracket_season
Outputs: JSON array of all of the brackets that match the parameters with all of the columns in the brackets table (see “Available Columns” section below)

Divisions

URLs: /sportsbench/divisions, /sportsbench/divisions/id
Accepted Parameters: division_id, division_name, division_conference, division_conference_id, division_color
Outputs: JSON array of all of the divisions that match the parameters with all of the columns in the divisions table (see “Available Columns” section below)

Games

URLs: /sportsbench/games, /sportsbench/games/id
Accepted Parameters: game_id, game_week, game_season, game_day, game_home_id, game_away_id, game_attendance, game_status
Outputs: JSON array of all of the games that match the parameters with all of the columns in the game table depending on the sport (see “Available Columns” section below)

Game Info

URLs: /sportsbench/game_info, /sportsbench/game_info/id
Accepted Paramenters: game_info_id, game_id, game_info_inning (if baseball), game_info_quarter (if football), game_info_period (if hockey)
Outputs: JSON array of all of the game info rows that match the parameters with all of the columns in the game_info table depending on the sport (see “Available Columns” section below)

Game Stats

URLs: /sportsbench/game_stats, /sportsbench/game_stats/id
Accepted Parameters: game_stats_player_id, game_id, game_team_id, game_player_id
Outputs: JSON array of all of the game stats rows that match the parameters with all of the columns in the game_stats table depending on the sport (see “Available Columns” section below)

Players

URLs: /sportsbench/players, /sportsbench/players/id
Accepted Parameters: player_id, player_first_name, player_last_name, player_position, player_home_city, player_home_state, player_date_of_birth, team_id, player_weight, player_height, player_slug
Outputs: JSON array of all of the players that match the parameters with all of the columns in the players table (see “Available Columns” section below)

Series

URLs: /sportsbench/series, /sportsbench/series/id
Accepted Parameters: series_id, bracket_id, series_format, playoff_round, team_one_id, team_one_seed, team_two_id, team_two_seed, game_ids
Outputs: JSON array of all of the playoff series that match the parameters with all of the columns in the series table (see “Available Columns” section below)

Teams

URLs: /sportsbench/teams, /sportsbench/teams/id
Accepted Parameters: team_id, team_name, team_location, team_nickname, team_abbreviation, team_city, team_state, team_stadium, team_stadium_capacity, team_head_coach, team_division, team_name, team_primary_color, team_secondary_color, team_slug
Outputs: JSON array of all of the teams that match the parameters with all of the columns in the teams table (see “Available Columns” section below)

Available Columns

Sometimes, the best solution to accomplish what you’re trying to do is to just call the table columns themselves directly. Below are the names of the tables used, the table column names and their data type.

Team Columns

  • team_id, integer
  • team_name, text
  • team_location, text
  • team_nickname, text
  • team_abbreviation
  • team_city, text
  • team_state, text
  • team_stadium, text
  • team_stadium_capacity, integer
  • team_head_coach, text
  • team_division, integer
  • team_primary_color, text
  • team_secondary_color, text
  • team_logo, text
  • team_photo, text
  • team_slug, text

Player Columns

  • player_id, integer
  • player_first_name, text
  • player_last_name, text
  • player_birth_day, text
  • player_photo, text
  • player_position, text
  • player_home_city, text
  • player_home_state, text
  • team_id, integer
  • player_weight, integer
  • player_height, text
  • player_slug, text

Division Columns

  • division_id, integer
  • division_name, text
  • division_conference, text
  • division_conference_id, integer
  • division_color, text

Bracket Columns

  • bracket_id, integer
  • num_teams, integer
  • bracket_format, text
  • bracket_title, text
  • bracket_season, text

Series Columns

  • series_id, integer
  • bracket_id, integer
  • series_format, text
  • playoff_round, text
  • team_one_id, integer
  • team_one_seed, integer
  • team_two_id, integer
  • team_two_seed, integer
  • game_ids, text

Basic Game Columns

  • game_id, integer
  • game_week, integer
  • game_day, datetime
  • game_season, text
  • game_home_id, integer
  • game_away_id, integer
  • game_home_final, integer
  • game_away_final, integer
  • game_attendance, integer
  • game_status, text
  • game_current_period, text
  • game_current_time, text
  • game_current_home_score, integer
  • game_current_away_score, integer
  • game_recap, text
  • game_preview, text

Basic Game Info Columns

  • game_info_id, integer
  • game_id, integer

Basic Game Player Stats Columns

  • game_stats_player_id, integer
  • game_id, integer
  • game_team_id, integer
  • game_player_id, integer

Baseball Game Columns

  • game_home_doubles, text
  • game_home_triples, text
  • game_home_homeruns, text
  • game_home_hits, integer
  • game_home_errors, integer
  • game_home_lob, integer
  • game_away_doubles, text
  • game_away_triples, text
  • game_away_homeruns, text
  • game_away_hits, integer, integer
  • game_away_errors, integer, integer
  • game_away_lob, integer, integer

Baseball Game Info Columns

  • game_info_inning, text
  • game_info_top_bottom, text
  • game_info_home_score, integer
  • game_info_away_score, integer
  • game_info_runs_scored, integer
  • game_info_score_play, text

Baseball Game Stats Columns

  • game_player_at_bats, integer
  • game_player_hits, integer
  • game_player_runs, integer
  • game_player_rbis, integer
  • game_player_doubles, integer
  • game_player_triples, integer
  • game_player_homeruns, integer
  • game_player_strikeouts, integer
  • game_player_walks, integer
  • game_player_hit_by_pitch, integer
  • game_player_fielders_choice, integer
  • game_player_position, text
  • game_player_innings_pitched, float
  • game_player_pitcher_strikeouts, integer
  • game_player_pitcher_walks, integer
  • game_player_hit_batters, integer
  • game_player_runs_allowed, integer
  • game_player_earned_runs, integer
  • game_player_hits_allowed, integer
  • game_player_homeruns_allowed, integer
  • game_player_pitch_count, integer
  • game_player_decision, text

Basketball Game Columns

  • game_home_first_quarter, integer
  • game_home_second_quarter, integer
  • game_home_third_quarter, integer
  • game_home_fourth_quarter, integer
  • game_home_overtime, integer
  • game_home_fgm, integer
  • game_home_fga, integer
  • game_home_3pm, integer
  • game_home_3pa, integer
  • game_home_ftm, integer
  • game_home_fta, integer
  • game_home_off_rebound, integer
  • game_home_def_rebound, integer
  • game_home_assists, integer
  • game_home_steals, integer
  • game_home_blocks, integer
  • game_home_pip, integer
  • game_home_to, integer
  • game_home_pot, integer
  • game_home_fast_break, integer
  • game_home_fouls, integer
  • game_away_first_quarter, integer
  • game_away_second_quarter, integer
  • game_away_third_quarter, integer
  • game_away_fourth_quarter, integer
  • game_away_overtime, integer
  • game_away_fgm, integer
  • game_away_fga, integer
  • game_away_3pm, integer
  • game_away_3pa, integer
  • game_away_ftm, integer
  • game_away_fta, integer
  • game_away_off_rebound, integer
  • game_away_def_rebound, integer
  • game_away_assists, integer
  • game_away_steals, integer
  • game_away_blocks, integer
  • game_away_pip, integer
  • game_away_to, integer
  • game_away_pot, integer
  • game_away_fast_break, integer
  • game_away_fouls, integer

Basketball Game Info Columns

  • game_info_referees, text
  • game_info_techs, text

Basketball Game Stats Columns

  • game_player_started, text
  • game_player_minutes, integer
  • game_player_fgm, time
  • game_player_fga, integer
  • game_player_3pm, integer
  • game_player_3pa, integer
  • game_player_ftm, integer
  • game_player_fta, integer
  • game_player_points, integer
  • game_player_off_rebound, integer
  • game_player_def_rebound, integer
  • game_player_assists, integer
  • game_player_steals, integer
  • game_player_blocks, integer
  • game_player_to, integer
  • game_player_plus_minus, double

Football Game Columns

  • game_home_first_quarter, integer
  • game_home_second_quarter, integer
  • game_home_third_quarter, integer
  • game_home_fourth_quarter, integer
  • game_home_overtime, integer
  • game_home_total, integer
  • game_home_pass, integer
  • game_home_rush, integer
  • game_home_to, integer
  • game_home_ints, integer
  • game_home_fumbles, integer
  • game_home_fumbles_lost, integer
  • game_home_possession, text
  • game_home_kick_returns, integer
  • game_home_kick_return_yards, integer
  • game_home_penalties, integer
  • game_home_penalty_yards, integer
  • game_home_first_downs, integer
  • game_away_first_quarter, integer
  • game_away_second_quarter, integer
  • game_away_third_quarter, integer
  • game_away_fourth_quarter, integer
  • game_away_overtime, integer
  • game_away_total, integer
  • game_away_pass, integer
  • game_away_rush, integer
  • game_away_to, integer
  • game_away_ints, integer
  • game_away_fumbles, integer
  • game_away_fumbles_lost, integer
  • game_away_possession, text
  • game_away_kick_returns, integer
  • game_away_kick_return_yards, integer
  • game_away_penalties, integer
  • game_away_penalty_yards, integer
  • game_away_first_downs, integer

Football Game Info Columns

  • game_info_quarter, integer
  • game_info_time, integer
  • game_info_scoring_team_id, integer
  • game_info_home_score, integer
  • game_info_away_score, integer
  • game_info_play, text

Football Game Stats Columns

  • game_player_completions, integer
  • game_player_attempts, integer
  • game_player_pass_yards, integer
  • game_player_pass_tds, integer
  • game_player_pass_ints, integer
  • game_player_rushes, integer
  • game_player_rush_yards, integer
  • game_player_rush_tds, integer
  • game_player_rush_fumbles, integer
  • game_player_catches, integer
  • game_player_receiving_yards, integer
  • game_player_receiving_tds, integer
  • game_player_receiving_fumbles, integer
  • game_player_tackles, float
  • game_player_tfl, float
  • game_player_sacks, float
  • game_player_pbu, integer
  • game_player_ints, integer
  • game_player_tds, integer
  • game_player_ff, integer
  • game_player_fr, integer
  • game_player_blocked, integer
  • game_player_yards, integer
  • game_player_fga, integer
  • game_player_fgm, integer
  • game_player_xpa, integer
  • game_player_xpm, integer
  • game_player_touchbacks, integer
  • game_player_returns, integer
  • game_player_return_yards, integer
  • game_player_return_tds, integer
  • game_player_return_fumbles, integer

Hockey Game Columns

  • game_home_first_period, integer
  • game_home_first_sog, integer
  • game_home_second_period, integer
  • game_home_second_sog, integer
  • game_home_third_period, integer
  • game_home_third_sog, integer
  • game_home_overtime, integer
  • game_home_overtime_sog, integer
  • game_home_shootout, integer
  • game_home_power_plays, integer
  • game_home_pp_goals, integer
  • game_home_pen_minutes, integer
  • game_away_first_period, integer
  • game_away_first_sog, integer
  • game_away_second_period, integer
  • game_away_second_sog, integer
  • game_away_third_period, integer
  • game_away_third_sog, integer
  • game_away_overtime, integer
  • game_away_overtime_sog, integer
  • game_away_shootout, integer
  • game_away_power_plays, integer
  • game_away_pp_goals, integer
  • game_away_pen_minutes, integer

Hockey Game Info Columns

  • game_info_event, text
  • game_info_period, integer
  • game_info_time, text
  • player_id, integer
  • game_info_assist_one_id, integer
  • game_info_assist_two_id, integer
  • game_info_penalty, text
  • team_id, integer

Hockey Game Stats Columns

  • game_player_goals, integer
  • game_player_assists, integer
  • game_player_plus_minus, integer
  • game_player_penalties, integer
  • game_player_pen_minutes, integer
  • game_player_hits, integer
  • game_player_shifts, integer
  • game_player_time_on_ice, time
  • game_player_faceoffs, integer
  • game_player_faceoff_wins, integer
  • game_player_shots_faced, integer
  • game_player_saves, integer
  • game_player_goals_allowed, integer

Rugby Game Columns

  • game_home_first_half, integer
  • game_home_second_half, integer
  • game_home_extratime, integer
  • game_home_shootout, integer
  • game_home_tries, integer
  • game_home_conversions, integer
  • game_home_penalty_goals, integer
  • game_home_kick_percentage, integer
  • game_home_meters_runs, integer
  • game_home_meters_hand, integer
  • game_home_meters_pass, integer
  • game_home_possession, integer
  • game_home_clean_breaks, integer
  • game_home_defenders_beaten, integer
  • game_home_offload, integer
  • game_home_rucks, integer
  • game_home_mauls, integer
  • game_home_turnovers_conceeded, integer
  • game_home_scrums, integer
  • game_home_lineouts, integer
  • game_home_penalties_conceeded, integer
  • game_home_red_cards, integer
  • game_home_yellow_cards, integer
  • game_home_free_kicks_conceeded, integer
  • game_away_first_half, integer
  • game_away_second_half, integer
  • game_away_extratime, integer
  • game_away_shootout, integer
  • game_away_tries, integer
  • game_away_conversions, integer
  • game_away_penalty_goals, integer
  • game_away_kick_percentage, integer
  • game_away_meters_runs, integer
  • game_away_meters_hand, integer
  • game_away_meters_pass, integer
  • game_away_possession, integer
  • game_away_clean_breaks, integer
  • game_away_defenders_beaten, integer
  • game_away_offload, integer
  • game_away_rucks, integer
  • game_away_mauls, integer
  • game_away_turnovers_conceeded, integer
  • game_away_scrums, integer
  • game_away_lineouts, integer
  • game_away_penalties_conceeded, integer
  • game_away_red_cards, integer
  • game_away_yellow_cards, integer
  • game_away_free_kicks_conceeded, integer

Rugby Game Info Columns

  • team_id, integer
  • game_info_home_score, integer
  • game_info_away_score, integer
  • game_info_event, text
  • game_info_time, integer
  • player_id, integer

Rugby Game Stats Columns

  • game_player_tries, integer
  • game_player_assists, integer
  • game_player_conversions, integer
  • game_player_penalty_goals, integer
  • game_player_drop_kicks, integer
  • game_player_points, integer
  • game_player_penalties_conceeded, integer
  • game_player_meters_run, integer
  • game_player_red_cards, integer
  • game_player_yellow_cards, integer

Soccer Game Columns

  • game_home_first_half, integer
  • game_home_second_half, integer
  • game_home_extratime, integer
  • game_home_pks, integer
  • game_home_possession, integer
  • game_home_shots, integer
  • game_home_sog, integer
  • game_home_corners, integer
  • game_home_offsides, integer
  • game_home_fouls, integer
  • game_home_saves, integer
  • game_home_yellow, integer
  • game_home_red, integer
  • game_away_first_half, integer
  • game_away_second_half, integer
  • game_away_extratime, integer
  • game_away_pks, integer
  • game_away_possession, integer
  • game_away_shots, integer
  • game_away_sog, integer
  • game_away_corners, integer
  • game_away_offsides, integer
  • game_away_fouls, integer
  • game_away_saves, integer
  • game_away_yellow, integer
  • game_away_red, integer

Soccer Game Info Columns

  • team_id, integer
  • game_info_home_score, integer
  • game_info_away_score, integer
  • game_info_event, text
  • game_info_time, integer
  • player_id, integer
  • game_player_name, text
  • game_info_assists, text

Soccer Game Stats Columns

  • game_player_minutes, integer
  • game_player_goals, integer
  • game_player_assists, integer
  • game_player_shots, integer
  • game_player_sog, integer
  • game_player_fouls, integer
  • game_player_fouls_suffered, integer
  • game_player_shots_faced, integer
  • game_player_shots_saved, integer
  • game_player_goals_allowed, integer

Volleyball Game Columns

  • game_home_first_set, integer
  • game_home_second_set, integer
  • game_home_third_set, integer
  • game_home_fourth_set, integer
  • game_home_fifth_set, integer
  • game_home_kills, integer
  • game_home_blocks, integer
  • game_home_aces, integer
  • game_home_assists, integer
  • game_home_digs, integer
  • game_home_attacks, integer
  • game_home_hitting_errors, integer
  • game_away_first_set, integer
  • game_away_second_set, integer
  • game_away_third_set, integer
  • game_away_fourth_set, integer
  • game_away_fifth_set, integer
  • game_away_kills, integer
  • game_away_blocks, integer
  • game_away_aces, integer
  • game_away_assists, integer
  • game_away_digs, integer
  • game_away_attacks, integer
  • game_away_hitting_errors, integer

Volleyball Game Stats Columns

  • game_player_sets_played, integer
  • game_player_points, integer
  • game_player_kills, integer
  • game_player_hitting_errors, integer
  • game_player_attacks, integer
  • game_player_set_attempts, integer
  • game_player_set_errors, integer
  • game_player_serves, integer
  • game_player_serve_errors, integer
  • game_player_aces, integer
  • game_player_blocks, integer
  • game_player_block_attempts, integer
  • game_player_block_errors, integer
  • game_player_digs, integer
  • game_player_receiving_errors, integer
  • Classes

    Sports Bench comes with three classes that do the heavy lifting: games, players and teams. Below you’ll find all of the attributes and functions each class comes with.

    Sports_Bench_Bracket

    Sports Bench core class to implement the Sports Bench Bracket object.

    Attributes

    • $bracket_id, integer, the id of the bracket
    • $num_teams, integer, the number of teams in the bracket
    • $bracket_format, string, the format of the bracket
    • $bracket_title, string, the title of the bracket
    • $bracket_season, string, the season for the bracket

    Constructor

    • Accepts $bracket_id, integer, parameter
    • Creates the Sports Bench Bracket object

    Since: 1.2
    Source: sports-bench-bracket.php, line 16

    Methods

    • get_round

    get_round – Sports_Bench_Bracket::get_round( $round )

    Returns the playoff series for an entered round.

    Parameters

    • $round, string, required, the round of the games to get

    Returns

    • array, games in the specified round

    Since: 1.2
    Source: sports-bench-bracket.php, line 106

    Sports_Bench_Game

    Sports Bench core class to implement the Sports Bench Game object.

    Attributes

    • $game_id, integer, the id of the game
    • $game_week, integer, the week of the game
    • $game_season, string, the season the game is in
    • $game_day, string, the date of the game
    • $game_home_id, integer, the id of home team
    • $game_home_final, integer, the final score for the home team
    • $game_away_id, integer, the id of the away team
    • $game_away_final, integer, the final score for the away team
    • $game_attendance, integer, the attendance of the game
    • $game_status, string, the link to the preview of the game
    • $game_current_time, string, the current time in the game
    • $game_current_period, string, the current period/quarter/inning the game is currently in
    • $game_current_home_score, integer, the current score for the home team
    • $game_current_away_score, integer, the current score for the away team
    • $preview_link, string, the link to the preview of the game
    • $recap_link, string, the link to the recap of the game
    • $game_neutral_site, integer, whether the game is at a neutral site or not
    • $game_location_stadium, string, the stadium for the game
    • $game_location_line_one, string, the first line of the address for the stadium for the game
    • $game_location_line_two, string, the second line of the address for the stadium for the game
    • $game_location_city, string, the city that the stadium for the game is in
    • $game_location_state, string, the state that the stadium for the game is in
    • $game_location_country, string, the country that the stadium for the game is in
    • $game_location_zip_code, string, the zip code that the stadium for the game is in

    Constructor

    • Accepts $game_id, integer, parameter
    • Creates the Sports Bench Game object

    Since: 1.0
    Source: sports-bench-game.php, line 17

    Methods

    • get_shootout

    get_shootout – Sports_Bench_Game::get_shootout( $team_id )

    Returns a team’s score in a shootout or false if there is none.

    Parameters

    • $team_id, integer, required, the id of the team to get the shootout score for

    Returns

    • bool | int, shootout or pk score or false if no shootout or pks

    Since: 1.0
    Source: sports-bench-game.php, line 333

    Sports_Bench_Player

    Sports Bench core class to implement the Sports Bench Player object.

    Attributes

    • $player_id, integer, the id of the player
    • $player_first_name, string, the player’s first name
    • $player_last_name, string, the player’s last name
    • $player_photo, string, the url to the player’s photo
    • $player_position, string, the position the player plays
    • $player_home_city, string, the player’s hometown
    • $player_home_state, string, the player’s home state
    • $player_date_of_birth, string, the player’s date of birth
    • $team_id, integer, the team id for the team the player currently plays for
    • $player_weight, integer, the weight of the player
    • $player_height, string, the height of the player
    • $player_slug, string, the slug for the player for url purposes

    Constructor

    • Accepts $player_id, integer, parameter
    • Creates the Sports Bench Player object

    Since: 1.0
    Source: sports-bench-player.php, line 16

    Methods

    • get_age
    • get_teams_played_for
    • get_seasons_played
    • get_permalink
    • get_player_photo
    • get_years

    get_age – Sports_Bench_Player::get_age()

    Returns the current age of a player.

    Returns

    • int, age of the player

    Since: 1.0
    Source: sports-bench-player.php, line 185

    get_teams_played_for – Sports_Bench_Player::get_teams_played_for()

    Returns a list of team ids that the player has played for.

    Returns

    • array, teams the player has played for

    Since: 1.0
    Source: sports-bench-player.php, line 199

    get_seasons_played – Sports_Bench_Player::get_seasons_played()

    Returns a number of seasons that the player has played.

    Returns

    • int, number of seasons the player has played

    Since: 1.0
    Source: sports-bench-player.php, line 218

    get_permalink – Sports_Bench_Player::get_permalink()

    Returns the link to a the player page.

    Returns

    • string, link to player page

    Since: 1.0
    Source: sports-bench-player.php, line 238

    get_player_photo – Sports_Bench_Player::get_player_photo()

    Returns the html to display either the player’s photo.

    Returns

    • string|void, html code to display the image

    Since: 1.0
    Source: sports-bench-player.php, line 253

    get_years – Sports_Bench_Player::get_years()

    Returns the range of years the player has played in the league.

    Returns

    • string, the years the player has played

    Since: 1.0
    Source: sports-bench-player.php, line 268

    Sports_Bench_Series

    Sports Bench core class to implement the Sports Bench Series object.

    Attributes

    • $series_id, integer, the id of the series
    • $bracket_id, integer, the id of the series’ bracket
    • $series_format, string, the format of the series
    • $playoff_round, string, the round of the series
    • $team_one_id, integer, the id of the first team in the series
    • $team_one_seed, integer, the seed of the first team in the series
    • $team_two_id, integer, the id of the second team in the series
    • $team_two_seed, integer, the seed of the second team in the series
    • $game_ids, string, the ids of the games in the series

    Constructor

    • Accepts $series_id, integer, parameter
    • Creates the Sports Bench Series object

    Since: 1.2
    Source: sports-bench-series.php, line 16

    Methods

    • get_series_score
    • get_series_winner
    • get_team_score

    get_series_score – Sports_Bench_Series::get_series_score()

    Returns the score of the series.

    Returns

    • string | boolean, string with the series score or false if there isn’t one

    Since: 1.2
    Source: sports-bench-series.php, line 163

    get_series_winner – Sports_Bench_Series::get_series_winner()

    Returns the winner of the series.

    Returns

    • int | boolean, the id of the series winner or false if there is no winner

    Since: 1.2
    Source: sports-bench-series.php, line 328

    get_team_score – Sports_Bench_Series::get_team_score( $team )

    Returns the score for a team in a playoff series.

    Parameters

    • $team, string, ‘team-one’ or ‘team-two’

    Returns

    • int, the score for a team in the series

    Since: 1.2
    Source: sports-bench-series.php, line 456

    Sports_Bench_Team

    Sports Bench core class to implement the Sports Bench Team object.

    Attributes

    • $team_id, integer, the id of the team
    • $team_name, string, the team’s name
    • $team_location, string, the location of the team
    • $team_nickname, string, the team’s nickname
    • $team_abbreviation, string, the team’s abbreviation
    • $team_active, string, the team’s active status
    • $team_location_line_one, string, the first line of the address for the team
    • $team_location_line_two, string, the second line of the address for the team
    • $team_city, string, the city the team plays in
    • $team_state, string, the state the team plays in
    • $team_location_country, string, the country the team plays in
    • $team_location_zip_code, string, the zip code the team plays in
    • $team_stadium, string, the stadium the team plays in
    • $team_stadium_capacity, integer, the capacity of the team’s stadium
    • $team_head_coach, string, the current head coach of the team
    • $team_logo, string, the url for the team’s logo
    • $team_photo, string, the url for the team’s photo
    • $team_division, integer, the id of the division or conference the team plays in
    • $team_primary_color, string, the hexadecimal color value for the team’s primary color
    • $team_secondary_color, string, the hexadecimal color value for the team’s secondary color
    • $team_slug, string, the slug for the team for url purposes

    Constructor

    • Accepts $team_id, integer, parameter
    • Creates the Sports Bench Team object

    Since: 1.0
    Source: sports-bench-team.php, line 15

    Methods

    • get_games_played
    • get_wins
    • get_losses
    • get_draws
    • get_overtime_losses
    • get_record
    • get_win_percentage
    • get_home_record
    • get_road_record
    • get_points_for
    • get_points_against
    • get_point_differential
    • get_division_wins
    • get_division_losses
    • get_division_draws
    • get_division_record
    • get_conference_wins
    • get_conference_losses
    • get_conference_draws
    • get_conference_record
    • get_schedule
    • get_recent_results
    • get_upcoming_schedule
    • get_alltime_wins
    • get_alltime_losses
    • get_alltime_draws
    • get_alltime_record
    • get_roster
    • get_team_photo
    • get_average_attendance
    • get_permalink
    • get_division_name
    • get_years

    get_games_played – Sports_Bench_Team:get_games_played( $season )

    Returns the number of games a team has played for a given season.

    Parameters

    • $season, string, the season to grab the number of games from

    Returns

    • int, number of games played in a season

    Since: 1.0
    Source: sports-bench-team.php, line 305

    get_wins – Sports_Bench_Team::get_wins( $season )

    Returns the number of wins for the team in the selected season.

    Parameters

    • $season, string, the season to grab the number of wins from

    Returns

    • int, number of wins for the team

    Since: 1.0
    Source: sports-bench-team.php, line 322

    get_losses – Sports_Bench_Team::get_losses( $season )

    Returns the number of losses for the team in the selected season.

    Parameters

    • $season, string, the season to grab the number of losses from

    Returns

    • int, number of losses for the team

    Since: 1.0
    Source: sports-bench-team.php, line 339

    get_draws – Sports_Bench_Team::get_draws( $season )

    Returns the number of draws for the team in the selected season.

    Parameters

    • $season, string, the season to grab the number of draws from

    Returns

    • int, number of draws for the team

    Since: 1.0
    Source: sports-bench-team.php, line 356

    get_overtime_losses – Sports_Bench_Team::get_overtime_losses( $season )

    Returns the number of overtime losses for the team in the selected season.

    Parameters

    • $season, string, the season to grab the number of overtime losses from

    Returns

    • int, number of overtime losses for the team

    Since: 1.0
    Source: sports-bench-team.php, line 373

    get_record – Sports_Bench_Team::get_record( $season )

    Returns the record of the team for the current season in the form of an array.

    Parameters

    • $season, string, the season to grab the team’s record

    Returns

    • array, record for the team

    Since: 1.0
    Source: sports-bench-team.php, line 390

    get_win_percentage – Sports_Bench_Team::get_win_percentage( $season )

    Returns the winning percentage for the team in the current season.

    Parameters

    • $season, string, the season to grab the team’s winning percentage from

    Returns

    • float, winning percentage for the team

    Since: 1.0
    Source: sports-bench-team.php, line 407

    get_home_record – Sports_Bench_Team::get_home_record( $season )

    Returns the home record for a team in the current year.

    Parameters

    • $season, string, the season to grab the team’s home record from

    Returns

    • array, home record for the team this season

    Since: 1.0
    Source: sports-bench-team.php, line 429

    get_road_record – Sports_Bench_Team::get_road_record( $season )

    Returns the road record for a team in the current year.

    Parameters

    • $season, string, the season to grab the team’s road record from

    Returns

    • array, road record for the team this season

    Since: 1.0
    Source: sports-bench-team.php, line 454

    get_points_for – Sports_Bench_Team::get_points_for( $season )

    Returns the number of points/goals/runs scored by a team in the current season.

    Parameters

    • $season, string, the season to grab the team’s points/goals/runs scored

    Returns

    • int, number of points/goals/runs scored by a team in the current season

    Since: 1.0
    Source: sports-bench-team.php, line 479

    get_points_against – Sports_Bench_Team::get_points_against( $season )

    Returns the number of points/goals/runs scored against a team in the current season.

    Parameters

    • $season, string, the season to grab the team’s points/goals/runs scored against

    Returns

    • int, number of points/goals/runs scored against a team in the current season

    Since: 1.0
    Source: sports-bench-team.php, line 501

    get_point_differential – Sports_Bench_Team::get_point_differential( $season )

    Returns the difference in points/goals/runs scored by and against a team in the current season.

    Parameters

    • $season, string, the season to grab the team’s points/goals/runs differential

    Returns

    • int, the difference in points/goals/runs scored by and against a team in the current season

    Since: 1.0
    Source: sports-bench-team.php, line 523

    get_division_wins – Sports_Bench_Team::get_division_wins( $season )

    Returns number of wins in the division for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s wins in the division

    Returns

    • int, number of division wins for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 539

    get_division_losses – Sports_Bench_Team::get_division_losses( $season )

    Returns number of losses in the division for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s losses in the division

    Returns

    • int, number of division losses for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 574

    get_division_draws – Sports_Bench_Team::get_division_draws( $season )

    Returns number of draws in the division for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s draws in the division

    Returns

    • int, number of division draws for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 609

    get_division_record – Sports_Bench_Team::get_division_record( $season )

    Returns the divisional record for a team as an array.

    Parameters

    • $season, string, the season to grab the team’s divisional record

    Returns

    • array, divisional record for the team

    Since: 1.0
    Source: sports-bench-team.php, line 644

    get_conference_wins – Sports_Bench_Team::get_conference_wins( $season )

    Returns number of wins in the conference for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s wins in the conference

    Returns

    • int, number of conference wins for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 661

    get_conference_losses – Sports_Bench_Team::get_conference_losses( $season )

    Returns number of losses in the conference for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s losses in the conference

    Returns

    • int, number of conference losses for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 736

    get_conference_draws – Sports_Bench_Team::get_conference_draws( $season )

    Returns number of draws in the conference for a team in a season.

    Parameters

    • $season, string, the season to grab the team’s draws in the conference

    Returns

    • int, number of conference draws for a team in a season

    Since: 1.0
    Source: sports-bench-team.php, line 809

    get_conference_record – Sports_Bench_Team::get_conference_record( $season )

    Returns the conference record for a team as an array.

    Parameters

    • $season, string, the season to grab the team’s conference record

    Returns

    • array, conference record for the team

    Since: 1.0
    Source: sports-bench-team.php, line 884

    get_schedule – Sports_Bench_Team::get_schedule( $season )

    Returns an array of each game for a team in a given season.

    Parameters

    • $season, string, the season to grab the team’s schedule

    Returns

    • array, information for each game for a team in the season

    Since: 1.0
    Source: sports-bench-team.php, line 901

    get_recent_results – Sports_Bench_Team::get_recent_results( $limit, $season )

    Returns an array of recent results for a team.

    Parameters

    • $limit, integer, the number of recent games to grab
    • $season, string, the season to grab the team’s schedule

    Returns

    • array, the recent games for the team

    Since: 1.0
    Source: sports-bench-team.php, line 1006

    get_upcoming_schedule – Sports_Bench_Team::get_upcoming_schedule( $limit, $season )

    Returns an array of upcoming games for a team.

    Parameters

    • $limit, integer, the number of upcoming games to grab
    • $season, string, the season to grab the team’s schedule

    Returns

    • array, the upcoming games for the team

    Since: 1.0
    Source: sports-bench-team.php, line 1111

    get_alltime_wins – Sports_Bench_Team::get_alltime_wins()

    Returns the number of all-time wins for a team.

    Returns

    • int, the number of all-time wins for a team

    Since: 1.0
    Source: sports-bench-team.php, line 1151

    get_alltime_losses – Sports_Bench_Team::get_alltime_losses()

    Returns the number of all-time losses for a team.

    Returns

    • int, the number of all-time losses for a team

    Since: 1.0
    Source: sports-bench-team.php, line 1172

    get_alltime_draws – Sports_Bench_Team::get_alltime_draws()

    Returns the number of all-time draws for a team.

    Returns

    • int, the number of all-time draws for a team

    Since: 1.0
    Source: sports-bench-team.php, line 1193

    get_alltime_record – Sports_Bench_Team::get_alltime_record()

    Returns the all-time record for a team as an array.

    Returns

    • array, all-time wins, losses and draws for a team

    Since: 1.0
    Source: sports-bench-team.php, line 1214

    get_roster – Sports_Bench_Team::get_roster()

    Returns the team’s roster as an array.

    Returns

    • array, the team’s roster

    Since: 1.0
    Source: sports-bench-team.php, line 1229

    get_team_photo – Sports_Bench_Team::get_team_photo( $image )

    Returns the html to display either the team photo or the team logo.

    Parameters

    • $image, string, the type of image to be shown, either team-photo or team-logo

    Returns

    • string|void, html to display the image

    Since: 1.0
    Source: sports-bench-team.php, line 1264

    get_average_attendance – Sports_Bench_Team::get_average_attendance( $season )

    Returns the average attendance for a team for a season.

    Parameters

    • $season, string, the season to grab the average attendance from

    Returns

    • float, average attendance for a team

    Since: 1.0
    Source: sports-bench-team.php, line 1283

    get_permalink – Sports_Bench_Team::get_permalink()

    Returns the link to a the team page.

    Returns

    • string, link to team page

    Since: 1.0
    Source: sports-bench-team.php, line 1305

    get_division_name – Sports_Bench_Team::get_division_name()

    Returns the name of the division or conference that the team is in.

    Returns

    • string, division name

    Since: 1.0
    Source: sports-bench-team.php, line 1320

    get_years – Sports_Bench_Team::get_years()

    Returns the range of years the team has been in the league.

    Returns

    • string, html for the years the team’s been in the league

    Since: 1.5
    Source: sports-bench-team.php, line 1339

  • Display Functions

    These functions control how things are displayed. For example, you’ll find functions that show the color or colors of a team in the border top of a div. Or, you’ll see a function that display’s a label head for a story.

    sports_bench_border_top_colors – sports_bench_border_top_colors( $team_one_id, $team_two_id = null, $div = null )

    Returns a top border color for the team(s) involved.

    Parameters

    • $team_one_id, integer, required, the team id for the first team involved
    • $team_two_id, integer, optional, the team id for the second team involved
    • $div, string, optional, id for the div to affect if two teams are involved

    Returns

    • string, the css to show a 2px border top for a div that’s one color if one team is called or half and half if two teams are called

    Since: 1.0
    Source: display-functions.php, line 33

    sports_bench_division_color – sports_bench_division_color( $division_id )

    Returns the color of a conference to display in the standings tables.

    Parameters

    • $division_id, integer, required, the id of the division or conference

    Returns

    • string, the hexadecimal value of the color of the conference or the division’s conference

    Since: 1.0
    Source: display-functions.php, line 74

    sports_bench_team_horizontal_gradient – sports_bench_team_horizontal_gradient( $team_color )

    Returns the css for a horizontal gradient for a team.

    Parameters

    • $team_color, string, required, the color for the team that you want to create the gradient for

    Returns

    • string, the css for horizontal gradient

    Since: 1.0
    Source: display-functions.php, line 100

    sports_bench_show_team_border_colors – sports_bench_show_team_border_colors()

    Returns the CSS/HTML to show colors for the posts based on the team(s) involved.

    Returns

    • string, css/html to show team colors

    Since: 1.0
    Source: display-functions.php, line 346

    sports_bench_show_label_head – sports_bench_show_label_head()

    Returns the HTML to show the label head for a story.

    Returns

    • string, html to display the appropriate label head

    Since: 1.0
    Source: display-functions.php, line 394

    sports_bench_show_slider_game_info – sports_bench_show_slider_game_info()

    Returns the HTML to show a game in the home page slider.

    Returns

    • string, html to show a game in the slider

    Since: 1.0
    Source: display-functions.php, line 429

    sports_bench_hex2rgba – sports_bench_hex2rgba($color, $opacity = false)

    Returns the rgba value for a color’s hexidecimal value.

    Parameters

    • $color, string, required, hexidecimal value of the color
    • $opacity, boolean|float, optional, the opacity of the color between 0 and 1, or false for fully opaque

    Returns

    • string, the rgba color value for a color

    Since: 1.0
    Source: display-functions.php, line 480

    sports_bench_show_google_maps – sports_bench_show_google_maps( $game )

    Returns the iframe to the show the Google Maps view of the stadium for the game.

    Parameters

    • $game, Sports Bench Game object, required, the game to retreive the map from

    Returns

    • string, iframe with the Google Map of the Stadium

    Since: 1.4
    Source: display-functions.php, line 527

    sports_bench_show_recap_abbreviation_guide – sports_bench_show_recap_abbreviation_guide()

    Returns the abbreviation guide to be shown under a game recap for the used sport.

    Returns

    • string, abbreviation guide for a game recap

    Since: 1.4
    Source: display-functions.php, line 546

    sports_bench_show_stats_abbreviation_guide – sports_bench_show_stats_abbreviation_guide()

    Returns the abbreviation guide to be shown under player and team stats for the used sport.

    Returns

    • string, abbreviation guide for player and team stats

    Since: 1.4
    Source: display-functions.php, line 577

  • Game Preview Functions

    These functions control how the game preview section looks on a post that’s marked as a preview for a game.

    sports_bench_show_game_preview_info – sports_bench_show_game_preview_info()

    Returns the html to show a preview for a game.

    Returns

    • string, html to show the game preview

    Since: 1.0
    Source: display-functions.php, line 108

  • Game Recap Functions

    These functions control how the game recap section looks on a post that’s marked as a recap for a game.

    sports_bench_show_game_stats_info – sports_bench_show_game_stats_info()

    Returns the html to show the stats and info for a game.

    Returns

    • string, html to show game stats and info

    Since: 1.0
    Source: display-functions.php, line 224

    sports_bench_show_game_info – sports_bench_show_game_info( $game_id )

    Returns the attendance, date and time and location for a completed game

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, basic info for a completed game

    Since: 1.0
    Source: display-functions.php, line 301

    sports_bench_get_linescore – sports_bench_get_linescore( $game_id )

    Returns an array that contains the innings each team score and how much they scored in that inning. Only for baseball.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • array, innings each team scored and how much they scored

    Since: 1.0
    Source: baseball-game-info.php, line 25

    sports_bench_get_linescore_display – sports_bench_get_linescore_display( $game_id )

    Returns the html to display the linescore for a game.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, html to show the linescore

    Since: 1.0
    Source: baseball-game-info.php, line 74; basketball-game-info.php, line 24; football-game-info.php, line 24; hockey-game-info.php, line 25; rugby-game-info.php, line 24; soccer-game-info.php, line 25; volleyball-game-info.php, line 24

    sports_bench_get_team_stats_info – sports_bench_get_team_stats_info( $game_id )

    Returns html to display the team stats for both teams for a game.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, html to show the team stats

    Since: 1.0
    Source: basketball-game-info.php, line 45; football-game-info.php, line 66; hockey-game-info.php, line 68; rugby-game-info.php, line 67; soccer-game-info.php, line 65; volleyball-game-info.php, line 46

    sports_bench_get_game_stat – sports_bench_get_game_stat( $game, $home_away, $stat )

    Returns a team stat from a game.

    Parameters

    • $game, Sports Bench Game Object, required, the game object for the game
    • $home_away, string, required, whether the team stat is for the home or away team
    • $stat, string, required, the stat to grab

    Returns

    • int, team stat from a game

    Since: 1.0
    Source: baseball-game-info.php, line 97

    sports_bench_get_score_info – sports_bench_get_score_info( $game_id )

    Returns the html to display the game events from a game.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, html to show run-scoring plays

    Since: 1.0
    Source: baseball-game-info.php, line 115; football-game-info.php, line 45; hockey-game-info.php, line 47; rugby-game-info.php, line 46: soccer-game-info.php, line 46

    sports_bench_get_away_individual_stats – sports_bench_get_away_individual_stats( $game_id )

    Returns the html to show the individual player stats for the visiting team.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, html to show away individual stats

    Since: 1.0
    Source: baseball-game-info.php, line 136; basketball-game-info.php, line 66; football-game-info.php, line 88; hockey-game-info.php, line 89; rugby-game-info.php, line 88; soccer-game-info.php, line 86; volleyball-game-info.php, line 100

    sports_bench_get_home_individual_stats – sports_bench_get_home_individual_stats( $game_id )

    Returns the html to show the individual player stats for the home team.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • string, html to show home individual stats

    Since: 1.0
    Source: baseball-game-info.php, line 157; baseball-game-info.php, line 87; basketball-game-info.php, line 119; hockey-game-info.php, line 110; rugby-game-info.php, line 109; soccer-game-info.php, line 107; volleyball-game-info.php, line 121

    sports_bench_total_points – sports_bench_total_points( $game_id )

    Returns the total points for the teams in a match.

    Parameters

    • $game_id, integer, required, the id for the game

    Returns

    • array, the total points for each team in a match

    Since: 1.4
    Source: volleyball-game-info.php, line 67

  • Playoff Functions

    sports_bench_show_playoff_bracket – sports_bench_show_playoff_bracket( $bracket_id )

    Returns the HTML to show a playoff bracket.

    Parameters

    • $bracket_id, integer, required, the id of the bracket

    Returns

    • string, html to display the bracket

    Since: 1.2
    Source: playoff-functions.php, line 25

  • Standings Functions

    These functions deal with the standings and how they are displayed. You’ll find the ability to show the league standings all together or standings for a specific conference or division.

    sports_bench_team_division_standings – sports_bench_team_division_standings( $division_id )

    Returns the html to show the division standings for a team on the team template.

    Parameters

    • $division_id, integer, required, the id of the division

    Returns

    • string, html to show division standings

    Since: 1.0
    Source: standings.php, line 25

    sports_bench_all_team_standings – sports_bench_all_team_standings()

    Returns the html to show the entire league standings without conferences or divisions.

    Returns

    • string, html to show division standings

    Since: 1.0
    Source: standings.php, line 43

    sports_bench_conference_division_standings – sports_bench_conference_division_standings( $division_id )

    Returns the html to show the entire league standings without conferences or divisions.

    Parameters

    • $division_id, integer, required, the id of the division or conference

    Returns

    • string, html to show division standings

    Since: 1.0
    Source: standings.php, line 64

    sports_bench_widget_standings – sports_bench_widget_standings( $division_id = null )

    Returns the html to show the entire league standings without conferences or divisions.

    Parameters

    • $division_id, integer, optional, the id of the division or conference

    Returns

    • string, html to show league, conference or division standings

    Since: 1.0
    Source: standings.php, line 107

    sports_bench_standings_page_template – sports_bench_standings_page_template()

    Returns the html to display the league, conference and/or division standings.

    Returns

    • string, html to display the standings

    Since: 1.0
    Source: standings.php, line 158

  • Scoreboard Functions

    These functions deal with how the scoreboard and scoreboard bar (if you want to use one) look on the page.

    sports_bench_scoreboard_bar – sports_bench_scoreboard_bar( $class = ” )

    Returns the html to display the scoreboard banner across the top of the site.

    Parameters

    • $class, string, optional, classes to add to the scoreboard bar

    Returns

     

    • string, html to display the scoreboard bar

    Since: 1.0
    Source: scoreboard.php, line 25

    sports_bench_scoreboard_page_template – sports_bench_scoreboard_page_template()

    Returns the html to display the league scoreboard on the page.

    Returns

    • string, html to show the scoreboard

    Since: 1.0
    Source: scoreboard.php, line 341

    sports_bench_is_game_time_set – sports_bench_is_game_time_set( $time )

    Returns whether the game time for a game has been set.

    Parameters

    • $time, DateTime, required, the date and time for a game

    Returns

    • boolean, whether or not a time has been set for a game

    Since: 1.4
    Source: scoreboard.php, line 429

  • Stats Functions

    These functions deal with how stats leaders are found and displayed on the page.

    sports_bench_get_stats_leaders – sports_bench_get_stats_leaders( $stat, $season )

    Returns the leaderboard for a given statistics.

    Parameters

    • $stat, string, required, the stat for the leaderboard
    • $season, string, required, the season for the leaderboard

    Returns

    • string, leaders of a selected statistic

    Since: 1.0
    Source: statistics.php, line 27

    get_more_stats_leaders – get_more_stats_leaders( $stat, $season, $offset = 0 )

    Returns 10 more statistical leaders for a specific stat.

    Parameters

    • $stat, string, required, the stat for the leaderboard
    • $season, string, required, the season for the leaderboard
    • $offset, integer, optional, the number of players to skip in the list

    Returns

    • string, the next 10 leaders of a selected statistic

    Since: 1.0
    Source: statistics.php, line 619

    sports_bench_get_stat_title – sports_bench_get_stat_title( $stat )

    Returns the stat name for a given key.

    Parameters

    • $stat, string, required, the stat slug to get the name from

    Returns

    • string, statistic name

    Since: 1.0
    Source: statistics.php, line 1246

    sports_bench_stats_page_template – sports_bench_stats_page_template()

    Returns the html to show the stats leaderboard on a page.

    Returns

    • string, html to display the stats leadboards

    Since: 1.0
    Source: statistics.php, line 1445

    sports_bench_get_ERA – sports_bench_get_ERA( $earned_runs, $innings_pitched, $innings_per_game )

    Returns the earned run average for a pitcher.

    Parameters

    • $earned_runs, integer, required, the number of earned runs given up
    • $innings_pitched, float, required, the number of innings pitched
    • $innings_per_game, int, required, the number of innings per game

    Returns

    • float, earned run average

    Since: 1.0
    Source: baseball-player-info.php, line 29

    sports_bench_get_batting_average – sports_bench_get_batting_average( $at_bats, $hits )

    Returns the batting average for a hitter.

    Parameters

    • $at_bats, integer, required, the number of at bats
    • $hits, integer, required, the number of hits

    Returns

    • float, batting average

    Since: 1.0
    Source: baseball-player-info.php, line 53

    sports_bench_stat_exists – sports_bench_stat_exists( $player, $stat )

    Takes a player’s set of stats and checks to see if a specific stat exists.

    Parameters

    • $player, array, required, array of season stats for a player
    • $stat, integer, required, the stat slug to look for

    Returns

    • boolean, whether the stat exists or not

    Since: 1.0
    Source: baseball-player-info.php, line 53; football-player-info.php, line 27; hockey-player-info.php, line 44; soccer-player-info.php, line 45

    sports_bench_get_season_stats – sports_bench_get_season_stats( $player )

    Returns the table to display the career stats for a player by season and by team (if player played for multiple teams in a season).

    Parameters

    • $player, Sports Bench Player object, required, the player object for the player

    Returns

    • string, html to show the player stats table

    Since: 1.0
    Source: baseball-player-info.php, line 90; basketball-player-info.php, line 62; football-player-info.php, line 46; hockey-player-info.php, line 63; rugby-player-info.php, line 25; soccer-player-info.php, line 64; volleyball-player-info.php, line 49

    sports_bench_get_pitcher_wins – sports_bench_get_pitcher_wins( $player_id, $season )

    Returns the number of wins for a pitcher.

    Parameters

    • $player_id, integer, required, the id of the player
    • $season, string, required, the season to grab the wins from

    Returns

    • float, wins for a pitcher

    Since: 1.0
    Source: baseball-player-info.php, line 182

    sports_bench_get_pitcher_losses – sports_bench_get_pitcher_losses( $player_id, $season )

    Returns the number of losses for a pitcher.

    Parameters

    • $player_id, integer, required, the id of the player
    • $season, string, required, the season to grab the losses from

    Returns

    • float, losses for a pitcher

    Since:** 1.0
    Source: baseball-player-info.php, line 206

    sports_bench_get_pitcher_record – sports_bench_get_pitcher_record( $player_id, $season )

    Returns a pitcher’s record as an array.

    Parameters

    • $player_id, integer, required, the id of the player
    • $season, string, required, the season to grab the losses from

    Returns

    • array, pitcher’s record

    Since: 1.0
    Source: baseball-player-info.php, line 230

    sports_bench_get_pitcher_saves – sports_bench_get_pitcher_saves( $player_id, $season )

    Returns the number of saves for a pitcher.

    Parameters

    • $player_id, integer, required, the id of the player
    • $season, string, required, the season to grab the losses from

    Returns

    • int, number of pitcher’s saves

    Since: 1.0
    Source: baseball-player-info.php, line 249

    sports_bench_get_points_average – sports_bench_get_points_average( $points, $games )

    Returns the points average for a player.

    Parameters

    • $points, integer, required, the number of points
    • $games, integer, required, the number of games played

    Returns

    • float, points average

    Since: 1.0
    Source: basketball-player-info.php, line 27

    sports_bench_get_shooting_average – sports_bench_get_shooting_average( $made, $attempts )

    Returns the shooting percentage for a player.

    Parameters

    • $made, integer, required, the number of shots made
    • $attempts, integer, required, the number of shot attempts

    Returns

    • float, shooting percentage

    Since: 1.0
    Source: basketball-player-info.php, line 45

    sports_bench_get_goals_against_average – sports_bench_get_goals_against_average( $goals_allowed, $games_played )

    Returns the goals against average for a goalie.

    Parameters

    • $goals_allowed, integer, required, the number of goals allowed
    • $games_player, integer, required, the number of games played

    Returns

    • float, goals against average for a goalie

    Since: 1.0
    Source: hockey-player-info.php, line 26; soccer-player-info.php, line 27

    sports_bench_get_hitting_percentage – sports_bench_get_hitting_percentage( $attacks, $kills, $errors )

    Returns the goals against average for a goalie.

    Parameters

    • $attacks, integer, required, the number of attacks
    • $kills, integer, required, the number of kills
    • $errors, integer, required, the number of hitting errors

    Returns

    • string|float, hitting percentage

    Since: 1.4
    Source: volleyball-player-info.php, line 29

  • Player Functions

    These functions deal with how player information is grabbed and displayed on the page.

    sports_bench_show_team_player_select – sports_bench_show_team_player_select()

    Returns the HTML for the team player select section of the player page.

    Returns

     

    • string, html for the team player select

    Since: 1.3
    Source: player-functions.php, line 112

    sports_bench_show_player_info – sports_bench_show_player_info( $player_id )

    Returns the html to show player information.

    Parameters

    • $player_id, integer, required, the id of the player

    Returns

    • string, html for the player information

    Since: 1.3
    Source: player-functions.php, line 139

  • Team Functions

    These functions deal with how teams and their information are grabbed and displayed on the page.

    sports_bench_get_teams – sports_bench_get_teams( $alphabetical = false, $active = true, $division_id = 0 )

    Returns an array of teams.

    Parameters

    • $alphabetical, boolean, optional, whether to list the teams in alphabetical order
    • $active, boolean, optional, whether to show only active teams or all teams
    • $division_id, integer, optional, the id for the division or conference to get the teams from. An id of 0 returns all teams

    Returns

    • array, list of all of the teams in team_id => team_name pairs

    Since: 1.0
    Source: team-functions.php, line 29

    sports_bench_show_roster – sports_bench_show_roster( $team_id )

    Returns the html to show a team’s roster with player information.

    Parameters

    • $team_id, integer, required, the id for the team

    Returns

    • string, html to show the team’s roster

    Since: 1.0
    Source: team-functions.php, line 96

    sports_bench_show_team_schedule – sports_bench_show_team_schedule( $team_id )

    Returns the html to show a team’s schedule for the current season.

    Parameters

    • $team_id, integer, required, the id for the team

    Returns

    • string, html to show a team’s schedule

    Since: 1.0
    Source: team-functions.php, line 159

    sports_bench_show_team_listing – sports_bench_show_team_listing()

    Returns the html to show the teams and their info on a page.

    Returns

    • string, html to display the teams

    Since: 1.0
    Source: team-functions.php, line 239

    sports_bench_show_team_info – sports_bench_show_team_info( $team_id )

    Returns the html to show team information.

    Parameters

    • $team_id, integer, required, the id for the team

    Returns

    • string, html to show team info

    Since:** 1.0
    Source: team-functions.php, line 262

    sports_bench_get_players_stats – sports_bench_get_players_stats( $team_id, $season )

    Returns the html to show team information.

    Parameters

    • $team_id, integer, required, the id for the team
    • $season, string, required, season to grab the stats from

    Returns

    • array, player stats for the season for a team

    Since: 1.0
    Source: baseball-team-functions.php, line 27; basketball-team-functions.php, line 27; football-team-info.php, line 27; hockey-team-info.php, line 27; rugby-team-info.php, line 27; soccer-team-info.php, line 27; volleyball-team-info.php, line 27

    sports_bench_get_players_stats_table – sports_bench_get_players_stats_table( $player_stats_array )

    Returns the html to display player stats for a season for a team.

    Parameters

    • $player_stats_array, array, required, array of players for a team and their season stats

    Returns

    • string, html to show player stats

    Since: 1.0
    Source: baseball-team-functions.php, line 90; basketball-team-functions.php, line 83; football-team-info.php, line 94; hockey-team-info.php, line 80; rugby-team-info.php, line 74; soccer-team-info.php, line 76; volleyball-info.php, line 81

    sports_bench_get_points – sports_bench_get_points( $team_id )

    Returns the number of points a team has in a season.

    Parameters

    • $team_id, integer, required, the id for the team

    Returns

    • int, number of points for a team

    Since: 1.0
    Source: hockey-team-info.php, line 95; rugby-team-info.php, line 90; soccer-team-info.php, line 92

  • Filters

    sports_bench_before_game_preview – apply_filters( ‘sports_bench_before_game_preview’, $html, $away_team, $home_team )

    Outputs HTML for before the game preview.

    Parameters

    • $html, string, the current html that’s being outputted
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the html that will be before the game preview

    Since: 1.5
    Source: display-functions.php, line 148

    sports_bench_game_preview – apply_filters( ‘sports_bench_game_preview’, $html, $game, $away_team, $away_team_name, $away_record, $away_score, $home_team, $home_team_name, $home_record, $home_score )

    Outputs the game preview

    Parameters

    • $html, string, the current html that’s being outputted
    • $game, Sports_Bench_Game object, the game object for the current game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $away_team_name, string, team name for the away team
    • $away_record, string, the record for the away team
    • $away_score, integer, the score for the away team if the game is over
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $home_team_name, string, team name for the home team
    • $home_record, string, the record for the home team
    • $home_score, integer, the score for the home team if the game is over

    Returns

    • string, the html for the game preview

    Since: 1.5
    Source: display-functions.php, line 149

    sports_bench_after_game_preview – apply_filters( ‘sports_bench_after_game_preview’, $html, $away_team, $home_team )

    Outputs the HTML for after the game preview

    Parameters

    • $html, string, the current html that’s being outputted
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the html that will be after the game preview

    Since: 1.5
    Source: display-functions.php, line 150

    sports_bench_game_preview_row – apply_filters( ‘sports_bench_game_preview_row’, $styles, $team )

    Output styles for a team row in the game preview

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this row is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: display-functions.php, line 158, 164

    sports_bench_game_stats_info – apply_filters( ‘sports_bench_game_stats_info’, $html, $game, $away_team, $home_team )

    Outputs the game stats section for the game recap

    Parameters

    • $html, string, the current html that’s being outputted
    • $game, Sports_Bench_Game object, the game object for the current game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, HTML for the game stats section for a game recap

    Since: 1.5
    Source: display-functions.php, line 205

    sports_bench_game_info – apply_filters( ‘sports_bench_game_info’, $html, $game, $home_team )

    Outputs the HTML for the game information section

    Parameters

    • $html, string, the current html that’s being outputted
    • $game, Sports_Bench_Game object, the game object for the current game
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, HTML for the game information section

    Since: 1.5
    Source: display-functions.php, line 265

    sports_bench_linescore_row – apply_filters( ‘sports_bench_linescore_row’, $styles, $team )

    Output styles for a team row in the game linescore table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this row is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: display-functions.php, line 572, 599, 648, 667, 707, 724, 764, 783, 824, 842, 884, 902, 944, 963

    sports_bench_game_event_row – apply_filters( ‘sports_bench_game_event_row’, $styles, $team )

    Output styles for a team row in the game linescore table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this row is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: display-functions.php, line 1012, 1055, 1128, 1160, 1181, 1210

    sports_bench_game_recap_team_stats_head_cell – apply_filters( ‘sports_bench_game_recap_team_stats_head_cell’, $styles, $team )

    Output styles for a team cell in the table heading for team stats

    Parameters

    • $styles, string, current styles for the table head cell
    • $team, Sports_Bench_Team object, the team that this cell is for

    Returns

    • string, the CSS styles for the cell

    Since: 1.5
    Source: display-functions.php, line 1230, 1231, 1235, 1236, 1324, 1325, 1329, 1330, 1393, 1394, 1398, 1399, 1445, 1446, 1450, 1451, 1569, 1570, 1574, 1575, 1635, 1636, 1640, 1641

    sports_bench_game_recap_team_stats_cell – apply_filters( ‘sports_bench_game_recap_team_stats_cell’, $styles, $team )

    Output styles for a team cell in the table heading for team stats

    Parameters

    • $styles, string, current styles for the table row cell
    • $team, Sports_Bench_Team object, the team that this cell is for

    Returns

    • string, the CSS styles for the cell

    Since: 1.5
    Source: display-functions.php, line 1242-1313, 1336-1382, 1405-1433, 1457-1558, 1581-1622, 1647-1688

    sports_bench_individual_stat_head_row – apply_filters( ‘sports_bench_individual_stat_head_row’, $styles, $team )

    Output styles for the table head row for the individual stats

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: display-functions.php, line 1709, 1741, 1790, 1829, 1839, 1881, 1909, 1935, 1961, 1999, 2027, 2054, 2101, 2139, 2178, 2212, 2241, 2277

    sports_bench_individual_stat_row – apply_filters( ‘sports_bench_individual_stat_row’, $styles, $team )

    Output styles for the table body row for the individual stats

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: display-functions.php, line 1725, 1772, 1814, 1857, 1895, 1922, 1948, 1980, 2013, 2040, 2082, 2124, 2158, 2195, 2226, 2259, 2293

    sports_bench_player_listing_information – apply_filters( ‘sports_bench_player_listing_information’, $html, $player, $team, $num_players, $count )

    Outputs the HTML for the player information on the player listing page

    Parameters

    • $html, string, current HTML being outputted
    • $player, Sports_Bench_Player object, the player object for the current player
    • $team, Sports_Bench_Team object, the team object for the current team
    • $num_players, integer, the number of total players on the given team
    • $count, integer, the current count of players being looped through

    Returns

    • string, the HTML for the player listing

    Since: 1.5
    Source: player-functions.php, line 32

    sports_bench_before_player_info – apply_filters( ‘sports_bench_before_player_info’, $html, $team )

    Outputs HTML for before the player listing information

    Parameters

    • $html, string, the current html that’s being outputted
    • $away_team, Sports_Bench_Team object, the team object for the player’s team

    Returns

    • string, the html that will be before the player listing information

    Since: 1.5
    Source: player-functions.php, line 63

    sports_bench_after_player_info – apply_filters( ‘sports_bench_after_player_info’, $html, $team )

    Outputs HTML for after the player listing information

    Parameters

    • $html, string, the current html that’s being outputted
    • $away_team, Sports_Bench_Team object, the team object for the player’s team

    Returns

    • string, the html that will be after the player listing information

    Since: 1.5
    Source: player-functions.php, line 79

    sports_bench_player_information – apply_filters( ‘sports_bench_player_information’, $html, $player, $team )

    Outputs the HTML for the player information on the player page

    Parameters

      • $html, string, current HTML being outputted
      • $player, Sports_Bench_Player object, the player object for the current player

    $team, Sports_Bench_Team object, the team object for the player’s team

    Returns

    • string, the HTML for the player listing

    Since: 1.5
    Source: player-functions.php, line 110

    sports_bench_player_stats_head_row – apply_filters( ‘sports_bench_player_stats_head_row’, $styles, $player )

    Output styles for the table head row for the player’s career stats

    Parameters

    • $styles, string, current styles for the row
    • $player, Sports_Bench_Player object, the player that this table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: player-functions.php, line 179, 226, 272, 290, 367, 397, 425, 453, 491, 521, 551, 606, 635, 691, 746

    sports_bench_player_stats_row – apply_filters( ‘sports_bench_player_stats_row’, $styles, $player )

    Output styles for the table body row for the player’s career stats

    Parameters

    • $styles, string, current styles for the row
    • $player, Sports_Bench_Player object, the player that this table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: player-functions.php, line 203, 247, 339, 380, 409, 437, 470, 505, 533, 583, 618, 668, 723, 785

    sports_bench_playoff_series – apply_filters( ‘sports_bench_playoff_series’, $html, $series, $team_one, $team_one_class, $team_one_name, $team_two, $team_two_class, $team_two_name, $game_numbers )

    Outputs the HTML for the playoff series in a bracket

    Parameters

    • $html, string, current HTML being outputted
    • $series, Sports_Bench_Series object, the series object for the current playoff series
    • $team_one, Sports_Bench_Team object, the team object for the first team in the playoff series
    • $team_one_class, string, the CSS class for the first team
    • $team_one_name, string, the name of the first team in the series
    • $team_two, Sports_Bench_Team object, the team object for the second team in the playoff series
    • $team_two_class, string, the CSS class for the second team
    • $team_two_name, string, the name of the second team in the series
    • $game_numbers, string, list of game ids for the current series

    Returns

    • string, the HTML to show the playoff series

    Since: 1.5

    Source: playoff-function.php, line 111, 133, 156, 179, 202, 225, 267, 289, 311, 334, 357, 399, 421, 443, 465, 487

    sports_bench_playoff_team_row – apply_filters( ‘sports_bench_playoff_team_row’, $styles, $$team )

    Output styles for the table body row for a team in the playoff series

    Parameters

    • $styles, string, current styles for the row
    • $player, Sports_Bench_Team object, the team that this row is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: playoff-functions.php, line 506, 513

    sports_bench_scoreboard_left – apply_filters( ‘sports_bench_scoreboard_left’, $html, $location )

    Outputs the HTML for the left side of the scoreboard navigation

    Parameters

    • $html, string, current HTML for the left side div
    • $location, string, whether this for the scoreboard bar, widget or page

    Returns

    • string, the HTML for the left side of the scoreboard navigation

    Since: 1.5
    Source: scoreboard.php, line 67, 387

    sports_bench_scoreboard_right – apply_filters( ‘sports_bench_scoreboard_right’, $html, $location )

    Outputs the HTML for the left side of the scoreboard navigation

    Parameters

    • $html, string, current HTML for the right side div
    • $location, string, whether this for the scoreboard bar, widget or page

    Returns

    • string, the HTML for the right side of the scoreboard navigation

    Since: 1.5
    Source: scoreboard.php, line 83, 397

    sports_bench_scoreboard_bar_game – apply_filters( ‘sports_bench_scoreboard_bar_game’, $html, $game )

    Outputs the HTML for a game in the scoreboard bar

    Parameters

    • $html, string, the current HTML for the game
    • $game, Sports_Bench_Game object, the game object for the current game

    Returns

    • string, the HTML for the game in the scoreboard bar

    Since: 1.5
    Source: scoreboard.php, line 75

    sports_bench_scoreboard_game – apply_filters( ‘sports_bench_scoreboard_game’, $html, $game, $count, $num_games )

    Outputs the HTML for a game in the scoreboard

    Parameters

    • $html, string, the current HTML for the game
    • $game, Sports_Bench_Game object, the game object for the current game
    • $count, integer, the current count of games being looped through
    • $num_games, integer, the total number of games

    Returns

    • string, the HTML for the game in the scoreboard

    Since: 1.5
    Source: scoreboard.php, line 219, 407

    sports_bench_scoreboard_widget_game – apply_filters( ‘sports_bench_scoreboard_widget_game’, $html, $game )

    Outputs the HTML for a game in the scoreboard widget

    Parameters

    • $html, string, the current HTML for the game
    • $game, Sports_Bench_Game object, the game object for the current game

    Returns

    • string, the HTML for the game in the scoreboard widget

    Since: 1.5
    Source: scoreboard.php, line 304

    sports_bench_before_scoreboard_widget_game – apply_filters( ‘sports_bench_before_scoreboard_widget_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for before a game in the scoreboard widget

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for before the game in the scoreboard widget

    Since: 1.5
    Source: scoreboard.php, line 485

    sports_bench_scoreboard_row_styles – apply_filters( ‘sports_bench_scoreboard_row_styles’, $styles, $team, $location )

    Output styles for the table body row for a team in the scoreboard game

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this row is for
    • $location, string, whether this row is in the scoreboard template or widget

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 488, 494, 658, 664

    sports_bench_after_scoreboard_widget_game – apply_filters( ‘sports_bench_after_scoreboard_widget_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for after a game in the scoreboard widget

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for after the game in the scoreboard widget

    Since: 1.5
    Source: scoreboard.php, line 518

    sports_bench_scoreboard_modal – apply_filters( ‘sports_bench_scoreboard_modal’, $html, $game, $away_team, $home_team, $status, $time, $period )

    Outputs the HTML for a modal if you want to use one or are using the Sports Bench theme

    Parameters

    • $html, string, the current HTML for the modal
    • $game, Sports_Bench_Game object, the game object for the current game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $status, string, the status for the game
    • $time, string, the current time in the game
    • $period, string, the current period, half, set or quarter the game is in

    Returns

    • string, the HTML for the modal

    Since: 1.5
    Source: scoreboard.php, line 520, 686

    sports_bench_before_scoreboard_bar_game – apply_filters( ‘sports_bench_before_scoreboard_bar_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for before a game in the scoreboard bar

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for before the game in the scoreboard bar

    Since: 1.5
    Source: scoreboard.php, line 561

    sports_bench_scoreboard_bar_row_styles – apply_filters( ‘sports_bench_scoreboard_bar_row_styles’, $styles, $team )

    Output styles for the table body row for a team in the scoreboard game

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team that this row is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 565, 571

    sports_bench_after_scoreboard_bar_game – apply_filters( ‘sports_bench_after_scoreboard_bar_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for after a game in the scoreboard bar

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for after the game in the scoreboard bar

    Since: 1.5
    Source: scoreboard.php, line 597

    sports_bench_before_scoreboard_game – apply_filters( ‘sports_bench_before_scoreboard_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for before a game in the scoreboard template

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for before the game in the scoreboard template

    Since: 1.5
    Source: scoreboard.php, line 651

    sports_bench_after_scoreboard_game – apply_filters( ‘sports_bench_after_scoreboard_game’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for after a game in the scoreboard template

    Parameters

    • $html, string, the current HTML for the game
    • $game_id, integer, the game id for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML for after the game in the scoreboard template

    Since: 1.5
    <strongSource: scoreboard.php, line 689

    sports_bench_game_shortcode_game_row – apply_filters( ‘sports_bench_game_shortcode_game_row’, $styles, $game, $away_team, $home_team )

    Output styles for the table body row for the game shortcode

    Parameters

    • $styles, string, current styles for the row
    • $game, Sports_Bench_Game object, the game object for the game that’s being used
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the away team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 761

    sports_bench_rivalry_shortcode_top_row – apply_filters( ‘sports_bench_rivalry_shortcode_top_row’, $styles, $game_id, $team_one, $team_two )

    Output styles for the table body row for the top table in the rivalry shortcode

    Parameters

    • $styles, string, current styles for the row
    • $game_id, integer, the game id for the game that’s being used
    • $team_one, Sports_Bench_Team object, the team object for the first team
    • $team_two, Sports_Bench_Team object, the team object for the second team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 761

    sports_bench_rivalry_shortcode_recent_head_row – apply_filters( ‘sports_bench_rivalry_shortcode_recent_head_row’, $styles, $team_one, $team_two )

    Output styles for the table head row for the recent games table in the rivalry shortcode

    Parameters

    • $styles, string, current styles for the row
    • $team_one, Sports_Bench_Team object, the team object for the first team
    • $team_two, Sports_Bench_Team object, the team object for the second team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 802

    sports_bench_rivalry_shortcode_recent_row – apply_filters( ‘sports_bench_rivalry_shortcode_recent_row’, $styles, $game_id, $team_one, $team_two )

    Output styles for the table body row for the recent games table in the rivalry shortcode

    Parameters

    • $styles, string, current styles for the row
    • $game_id, integer, the game id for the game that’s being used
    • $team_one, Sports_Bench_Team object, the team object for the first team
    • $team_two, Sports_Bench_Team object, the team object for the second team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: scoreboard.php, line 832

    sports_bench_team_roster_table – apply_filters( ‘sports_bench_team_roster_table’, $html, $players, $team_id )

    Outputs the table for the team’s roster

    Parameters

    • $html, string, the current HTML for the table
    • $players, array, the players and their information that are on the team
    • $team_id, integer, the team id for the team

    Returns

    • string, the HTML for the roster table

    Since: 1.5
    Source: team-functions.php, line 100

    sports_bench_team_roster_head_row – apply_filters( ‘sports_bench_team_roster_head_row’, $styles, $team_id )

    Outputs styles for the table head row for the team roster table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 108

    sports_bench_team_roster_player_row – apply_filters( ‘sports_bench_team_roster_player_row’, $styles, $team_id )

    Outputs styles for the table body row for the team roster table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 120

    sports_bench_schedule_table – apply_filters( ‘sports_bench_schedule_table’, $html, $schedule, $team_id )

    Outputs the table for the team’s schedule

    Parameters

    • $html, string, the current HTML for the table
    • $schedule, array, the schedule for the team
    • $team_id, integer, the team id for the team

    Returns

    • string, the HTML for the schedule table

    Since: 1.5
    Source: team-functions.php, line 150

    sports_bench_team_schedule_head_row – apply_filters( ‘sports_bench_team_schedule_head_row’, $styles, $team_id )

    Outputs styles for the table head row for the team schedule table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 158

    sports_bench_team_schedule_game_row – apply_filters( ‘sports_bench_team_schedule_game_row’, $styles, $team_id )

    Outputs styles for the table body row for the team schedule table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 190

    sports_bench_team_listing_info – apply_filters( ‘sports_bench_team_listing_info’, $html, $team_id, $team_name, $num_teams, $count )

    Outputs the HTML for the team listing for the team listing page

    Parameters

    • $html, string, the current HTML for the team listing
    • $team_id, integer, the team id for the team
    • $team_name, string, the team name
    • $num_teams, integer, the total number of teams
    • $count, integer, the current count of teams being looped through

    Returns

    • string, HTML for the team listing for the team listing page

    Since: 1.5
    Source: team-functions.php, line 219; shortcodes.php, line 537

    sports_bench_team_info – apply_filters( ‘sports_bench_team_info’, $html, $team )

    Outputs the HTML for the team information

    Parameters

    • $html, string, the current HTML for the team listing
    • $team, Sports_Bench_Team object, the team object for the current team

    Returns

    • string, the HTML for the team information

    Since: 1.5
    Source: team-functions.php, line 239

    sports_bench_before_team_listing – apply_filters( ‘sports_bench_before_team_listing’, $html, $current_team )

    Outputs the HTML for before the team listing

    Parameters

    • $html, string, the current HTML for the listing
    • $current_team, Sports_Bench_Team object, the team object for the current team

    Returns

    • string, the HTML to be outputted before the team listing

    Since: 1.5
    Source: team-functions.php, line 269

    sports_bench_after_team_listing – apply_filters( ‘sports_bench_after_team_listing’, $html, $current_team )

    Outputs the HTML for after the team listing

    Parameters

    • $html, string, the current HTML for the listing
    • $current_team, Sports_Bench_Team object, the team object for the current team

    Returns

    • string, the HTML to be outputted after the team listing

    Since: 1.5
    Source: team-functions.php, line 288

    sports_bench_team_shortcode_recent_head_row – apply_filters( ‘sports_bench_team_shortcode_recent_head_row’, $styles, $team_id )

    Outputs styles for the table head row for the team shortcode recent games table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team object for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 317

    sports_bench_team_shortcode_recent_row – apply_filters( ‘sports_bench_team_shortcode_recent_row’, $styles, $team_id )

    Outputs styles for the table body row for the team shortcode recent games table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team object for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 330

    sports_bench_team_shortcode_upcoming_head_row – apply_filters( ‘sports_bench_team_shortcode_upcoming_head_row’, $styles, $team_id )

    Outputs styles for the table head row for the team shortcode upcoming games table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team object for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 348

    sports_bench_team_shortcode_upcoming_row – apply_filters( ‘sports_bench_team_shortcode_upcoming_row’, $styles, $team_id )

    Outputs styles for the table body row for the team shortcode upcoming games table

    Parameters

    • $styles, string, current styles for the row
    • $team, Sports_Bench_Team object, the team object for the team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: team-functions.php, line 359

    sports_bench_stat_leader_table – apply_filters( ‘sports_bench_stat_leader_table’, $html, $players, $stat, $location )

    Outputs the leaderboard table for a given stat

    Parameters

    • $html, string, the current HTML for the table
    • $the_players, array, the players for the table
    • $stat, string, the stat the table is for
    • $location, string, whether this is the first set of players or not

    Returns

    • string, the HTML for the table

    Since: 1.5
    Source: statistics.php, line 63, 94, 126, 149, 181, 217, 240, 271, 302, 333, 356, 379, 402, 425, 462, 498, 522, 545, 578, 601, 657, 692, 728, 749, 785, 821, 845, 880, 915, 950, 974, 997, 1021, 1046, 1086, 1122, 1148, 1172, 1208, 1232

    sports_bench_before_stat – apply_filters( ‘sports_bench_before_stat’, $html, $stat )

    Outputs the HTML for before the stat table

    Parameters

    • $html, string, the current HTML for the stat table
    • $stat, string, the stat that this table is for

    Returns

    • string, the HTML to be outputted before the stat table

    Since: 1.5
    Source: statistics.php, line 1454

    sports_bench_after_stat – apply_filters( ‘sports_bench_after_stat’, $html, $stat )

    Outputs the HTML for after the stat table

    Parameters

    • $html, string, the current HTML for the stat table
    • $stat, string, the stat that this table is for

    Returns

    • string, the HTML to be outputted after the stat table

    Since: 1.5
    Source: statistics.php, line 1460

    sports_bench_stats_head_row – apply_filters( ‘sports_bench_stats_head_row’, $styles, $stat )

    Outputs styles for the table head row for the stat leaders table

    Parameters

    • $styles, string, current styles for the row
    • $stat, string, the stat this table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: statistics.php, line 1478

    sports_bench_stats_player_row – apply_filters( ‘sports_bench_stats_player_row’, $styles, $player, $team, $stat )

    Outputs styles for the table body row for the stat leaders table

    Parameters

    • $styles, string, current styles for the row
    • $player, Sports_Bench_Player object, the player object for the player this stat is for
    • $team, Sports_Bench_Player object, the team object for the current player’s team
    • $stat, string, the stat this table is for

    Returns

    • string, the CSS styles for the row

    Since:

    1.5
    Source: statistics.php, line 1488, 1507

    sports_bench_team_player_stats_head_row – apply_filters( ‘sports_bench_team_player_stats_head_row’, $styles, $team_id )

    Outputs styles for the table head row for the team stats table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team the table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: statistics.php, line 1535, 1583, 1624, 1642, 1713, 1750, 1785, 1825, 1870, 1907, 1936, 1990, 2019, 2064, 2097, 2128

    sports_bench_team_player_stats_row – apply_filters( ‘sports_bench_team_player_stats_row’, $styles, $team_id )

    Outputs styles for the table body row for the team stats table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the team the table is for

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: statistics.php, line 1554, 1601, 1678, 1728, 1762, 1797, 1842, 1883, 1919, 1968, 2002, 2039, 2079, 2110, 2153

    sports_bench_team_division_standings – apply_filters( ‘sports_bench_team_division_standings’, $html, $teams, $division_id, $sport )

    Outputs the HTML for the division/conference standings for a team

    Parameters

    • $html, string, current HTML for the standings
    • $teams, array, the teams in the division/conference standings
    • $division_id, integer, the id for the division or conference
    • $sport, string, the sport used for the site

    Returns

    • string, the HTML for the conference/division standings

    Since: 1.5
    Source: standings.php, line 31

    sports_bench_standings_table – apply_filters( ‘sports_bench_standings_table’, $html, $teams, $division_id, $sport, $type, $items )

    Outputs the HTML for the standings table

    Parameters

    • $html, string, current HTML for the standings
    • $teams, array, the teams in the division/conference standings
    • $division_id, integer, the id for the division or conference
    • $sport, string, the sport used for the site
    • $type, string, whether this is all teams, conference or division standings

    Returns

    • string, the HTML for the standings table

    Since: 1.5
    Source: standings.php, line 50, 93

    sports_bench_standings_widget – apply_filters( ‘sports_bench_standings_widget’, $html, $teams, $sport, $division )

    Outputs the HTML for the widget standings table

    Parameters

    • $html, string, current HTML for the standings
    • $teams, array, the teams in the division/conference standings
    • $sport, string, the sport used for the site
    • $division, stdClass object|integer, the data for the division or conference or 0 if the widget is using the league/all option

    Returns

    • string, the HTML for the widget standings table

    Since: 1.5
    Source: standings.php, line 143

    sports_bench_before_standings_container – apply_filters( ‘sports_bench_before_standings_container’, $html, $type, $division_id )

    Outputs the HTML for before the standings table

    Parameters

    • $html, string, the current HTML for the stat table
    • $type, string, whether this is all teams, conference or division standings
    • $division_id, integer, the id for the division or conference

    Returns

    • string, the HTML to be outputted before the standings table

    Since: 1.5
    Source: standings.php, line 193, 212, 240

    sports_bench_after_standings_container – apply_filters( ‘sports_bench_after_standings_container’, $html, $type, $division_id )

    Outputs the HTML for after the standings table

    Parameters

    • $html, string, the current HTML for the stat table
    • $type, string, whether this is all teams, conference or division standings
    • $division_id, integer, the id for the division or conference

    Returns

    • string, the HTML to be outputted after the standings table

    Since: 1.5
    Source: standings.php, line 197, 216, 244

    sports_bench_standings_widget_head_row – apply_filters( ‘sports_bench_standings_widget_head_row’, $styles, $division )

    Outputs styles for the table head row for the standings widget table

    Parameters

    • $styles, string, current styles for the row
    • $division, stdClass object|integer, the data for the division or conference or 0 if the widget is using the league/all option

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: standings.php, line 279, 284, 332, 338, 410, 416

    sports_bench_standings_widget_team_row – apply_filters( ‘sports_bench_standings_widget_team_row’, $styles, $team_id )

    Outputs styles for the table head row for the standings widget table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the current team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: standings.php, line 299, 352, 430

    sports_bench_standings_head_row – apply_filters( ‘sports_bench_standings_head_row’, $styles, $division )

    Outputs styles for the table head row for the standings table

    Parameters

    • $styles, string, current styles for the row
    • $division, stdClass object|integer, the data for the division or conference or 0 if the standings league/all

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: standings.php, line 479, 525, 587, 672, 796, 922, 1044, 1216, 1415

    sports_bench_standings_team_row – apply_filters( ‘sports_bench_standings_team_row’, $styles, $team_id )

    Outputs styles for the table head row for the standings table

    Parameters

    • $styles, string, current styles for the row
    • $team_id, integer, the team id for the current team

    Returns

    • string, the CSS styles for the row

    Since: 1.5
    Source: standings.php, line 493, 538, 601, 718, 842, 967, 1089, 1274, 1473

    sports_bench_before_team_shortcode – apply_filters( ‘sports_bench_before_team_shortcode’, $html, $team )

    Outputs the HTML for before the team shortcode

    Parameters

    • $html, string, the current HTML for before the team shortcode
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team shortcode

    Since: 1.5
    Source: shortcodes.php, line 57

    sports_bench_after_team_shortcode – apply_filters( ‘sports_bench_after_team_shortcode’, $html, $team )

    Outputs the HTML for after the team shortcode

    Parameters

    • $html, string, the current HTML for after the team shortcode
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team shortcode

    Since: 1.5
    Source: shortcodes.php, line 71

    sports_bench_team_shortcode_information – apply_filters( ‘sports_bench_team_shortcode_information’, $html, $team, $record )

    Outputs the HTML for the team information section of the team shortcode

    Parameters

    • $html, string, the current HTML for the team information section
    • $team, Sports_Bench_Team object, the team object for the selected team
    • $record, array, the record for the team in wins, losses and draws/ties

    Returns

    • string, the HTML to be outputted for the team information section of the team shortcode

    Since: 1.5
    Source: shortcodes.php, line 59

    sports_bench_team_shortcode_recent_games – apply_filters( ‘sports_bench_team_shortcode_recent_games’, $html, $team, $schedule )

    Outputs the HTML for the recent games section of the team shortcode

    Parameters

    • $html, string, the current HTML for before the recent games section
    • $team, Sports_Bench_Team object, the team object for the selected team
    • $schedule, array, the recent schedule of games for a team

    Returns

    • string, the HTML to be outputted for the recent games section of the team shortcode

    Since: 1.5
    Source: shortcodes.php, line 64

    sports_bench_team_shortcode_upcoming_games – apply_filters( ‘sports_bench_team_shortcode_upcoming_games’, $html, $team, $schedule )

    Outputs the HTML for the upcoming games section of the team shortcode

    Parameters

    • $html, string, the current HTML for before the upcoming games section
    • $team, Sports_Bench_Team object, the team object for the selected team
    • $schedule, array, the upcoming schedule of games for a team

    Returns

    • string, the HTML to be outputted for the upcoming games section of the team shortcode

    Since: 1.5
    Source: shortcodes.php, line 68

    sports_bench_before_player_shortcode – apply_filters( ‘sports_bench_before_player_shortcode’, $html, $player )

    Outputs the HTML for before the player shortcode

    Parameters

    • $html, string, the current HTML for before the player shortcode
    • $player, Sports_Bench_Player object, the player object for the selected player

    Returns

    • string, the HTML to be outputted before the player shortcode

    Since: 1.5
    Source: shortcodes.php, line 97

    sports_bench_after_player_shortcode – apply_filters( ‘sports_bench_after_player_shortcode’, $html, $player )

    Outputs the HTML for after the player shortcode

    Parameters

    • $html, string, the current HTML for after the player shortcode
    • $player, Sports_Bench_Player object, the player object for the selected player

    Returns

    • string, the HTML to be outputted after the player shortcode

    Since: 1.5
    Source: shortcodes.php, line 103

    sports_bench_player_shortcode_information – apply_filters( ‘sports_bench_player_shortcode_information’, $html, $team, $team_id )

    Outputs the HTML for the player information section of the player shortcode

    Parameters

    • $html, string, the current HTML for the player information section
    • $player, Sports_Bench_Player object, the player object for the selected player
    • $team_id, integer, the team id for the team the player is on

    Returns

    • string, the HTML to be outputted for the player information section of the player shortcode

    Since: 1.5
    Source: shortcodes.php, line 99

    sports_bench_before_game_shortcode – apply_filters( ‘sports_bench_before_game_shortcode’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for before the game shortcode

    Parameters

    • $html, string, the current HTML for before the game shortcode
    • $game_id, integer, the game id for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML to be outputted before the game shortcode

    Since: 1.5
    Source: shortcodes.php, line 159

    sports_bench_after_game_shortcode – apply_filters( ‘sports_bench_after_game_shortcode’, $html, $game_id, $away_team, $home_team )

    Outputs the HTML for after the game shortcode

    Parameters

    • $html, string, the current HTML for after the game shortcode
    • $game_id, integer, the game id for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team

    Returns

    • string, the HTML to be outputted after the game shortcode

    Since: 1.5
    Source: shortcodes.php, line 161

    sports_bench_game_shortcode_info – apply_filters( ‘sports_bench_game_shortcode_info’, $html, $game, $away_team, $away_team_name, $away_score, $home_team, $home_team_name, $home_score, $time_in_game, $location )

    Outputs the HTML for the game information section of the game shortcode

    Parameters

    • $html, string, the current HTML for before the player shortcode
    • $game, Sports_Bench_Game object, the game object for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $away_team_name, string, the team name for the away team
    • $away_score, string, the score for the away team if the game is final
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $home_team_name, string, the team name for the home team
    • $home_score, string, the score for the home team if the game is final
    • $time_in_game, string, the current time and period for the game if it is in progress, otherwise it’s the date and time of the game or final
    • $location, string, the location for the game

    Returns

    • string, the HTML to be outputted for the game information section of the game shortcode

    Since: 1.5
    Source: shortcodes.php, line 160

    sports_bench_before_player_stats – apply_filters( ‘sports_bench_before_player_stats’, $html, $team )

    Outputs the HTML for before the player stats table

    Parameters

    • $html, string, the current HTML for before the player stats table
    • $team, Sports_Bench_Team object, the team object for the selected player’s team

    Returns

    • string, the HTML to be outputted before the player stats table

    Since: 1.5
    Source: shortcodes.php, line 326

    sports_bench_after_player_stats – apply_filters( ‘sports_bench_after_player_stats’, $html, $team )

    Outputs the HTML for after the player stats table

    Parameters

    • $html, string, the current HTML for after the player stats table
    • $team, Sports_Bench_Team object, the team object for the selected player’s team

    Returns

    • string, the HTML to be outputted after the player stats table

    Since: 1.5
    Source: shortcodes.php, line 332

    sports_bench_before_team_stats – apply_filters( ‘sports_bench_before_team_stats’, $html, $team )

    Outputs the HTML for before the team’s player stats table

    Parameters

    • $html, string, the current HTML for before the team’s player stats table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team’s player stats table

    Since: 1.5
    Source: shortcodes.php, line 378

    sports_bench_after_team_stats – apply_filters( ‘sports_bench_after_team_stats’, $html, $team )

    Outputs the HTML for after the team’s player stats table

    Parameters

    • $html, string, the current HTML for after the team’s player stats table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team’s player stats table

    Since: 1.5
    Source: shortcodes.php, line 381

    sports_bench_before_team_roster – apply_filters( ‘sports_bench_before_team_roster’, $html, $team )

    Outputs the HTML for before the team’s roster table

    Parameters

    • $html, string, the current HTML for before the team’s roster table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team’s roster table

    Since: 1.5
    Source: shortcodes.php, line 387

    sports_bench_after_team_roster – apply_filters( ‘sports_bench_after_team_roster’, $html, $team )

    Outputs the HTML for after the team’s roster table

    Parameters

    • $html, string, the current HTML for after the team’s roster table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team’s roster table

    Since: 1.5
    Source: shortcodes.php, line 390

    sports_bench_before_team_schedule – apply_filters( ‘sports_bench_before_team_schedule’, $html, $team )

    Outputs the HTML for before the team’s schedule table

    Parameters

    • $html, string, the current HTML for before the team’s schedule table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team’s schedule table

    Since: 1.5
    Source: shortcodes.php, line 396

    sports_bench_after_team_schedule – apply_filters( ‘sports_bench_after_team_schedule’, $html, $team )

    Outputs the HTML for after the team’s schedule table

    Parameters

    • $html, string, the current HTML for after the team’s schedule table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team’s schedule table

    Since: 1.5
    Source: shortcodes.php, line 399

    sports_bench_before_team_standings – apply_filters( ‘sports_bench_before_team_standings’, $html, $team )

    Outputs the HTML for before the team’s standings table

    Parameters

    • $html, string, the current HTML for before the team’s standings table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team’s standings table

    Since: 1.5
    Source: shortcodes.php, line 409

    sports_bench_after_team_standings – apply_filters( ‘sports_bench_after_team_standings’, $html, $team )

    Outputs the HTML for after the team’s standings table

    Parameters

    • $html, string, the current HTML for after the team’s standings table
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team’s standings table

    Since: 1.5
    Source: shortcodes.php, line 413

    sports_bench_before_team_info – apply_filters( ‘sports_bench_before_team_info’, $html, $team )

    Outputs the HTML for before the team’s information section

    Parameters

    • $html, string, the current HTML for before the team’s information section
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted before the team’s information section

    Since: 1.5
    Source: shortcodes.php, line 419

    sports_bench_after_team_info – apply_filters( ‘sports_bench_after_team_info’, $html, $team )

    Outputs the HTML for after the team’s information section

    Parameters

    • $html, string, the current HTML for after the team’s information section
    • $team, Sports_Bench_Team object, the team object for the selected team

    Returns

    • string, the HTML to be outputted after the team’s information section

    Since: 1.5
    Source: shortcodes.php, line 422

    sports_bench_before_rivalry_shortcode – apply_filters( ‘sports_bench_before_rivalry_shortcode’, $html, $team_one, $team_two )

    Outputs the HTML for before the rivalry shortcode

    Parameters

    • $html, string, the current HTML for before the team’s information section
    • $team_one, Sports_Bench_Team object, the team object for the first selected team
    • $team_two, Sports_Bench_Team object, the team object for the second selected team

    Returns

    • string, the HTML to be outputted before the rivalry shortcode

    Since: 1.5
    Source: shortcodes.php, line 505

    sports_bench_after_rivalry_shortcode – apply_filters( ‘sports_bench_after_rivalry_shortcode’, $html, $team_one, $team_two )

    Outputs the HTML for after the rivalry shortcode

    Parameters

    • $html, string, the current HTML for after the team’s information section
    • $team_one, Sports_Bench_Team object, the team object for the first selected team
    • $team_two, Sports_Bench_Team object, the team object for the second selected team

    Returns

    • string, the HTML to be outputted after the rivalry shortcode

    Since: 1.5
    Source: shortcodes.php, line 509

    sports_bench_rivalry_shortcode_info – apply_filters( ‘sports_bench_rivalry_shortcode_info’, $html, $team_one, $team_one_name, $team_two, $team_two_name, $series_score )

    Outputs the HTML for the rivarly information section of the rivalry shortcode

    Parameters

    • $html, string, the current HTML for before the rivarly information section of the rivalry shortcode
    • $team_one, Sports_Bench_Team object, the team object for the first selected team
    • $team_one_name, string, the team name of the first team
    • $team_two, Sports_Bench_Team object, the team object for the second selected team
    • $team_two_name, string, the team name of the first team
    • $series_score, string, the score of the series between the two teams

    Returns

    • string, the HTML to be outputted before rivarly information section of the rivalry shortcode

    Since: 1.5
    Source: shortcodes.php, line 506

    sports_bench_after_rivalry_shortcode – apply_filters( ‘sports_bench_after_rivalry_shortcode’, $html, $games, $team_one, $team_two )

    Outputs the HTML for the recent games table between the two teams

    Parameters

    • $html, string, the current HTML for the recent games table between the two teams
    • $games, array, the games the two teams have played against each other
    • $team_one, Sports_Bench_Team object, the team object for the first selected team
    • $team_two, Sports_Bench_Team object, the team object for the second selected team

    Returns

    • string, the HTML to be outputted for the recent games table between the two teams

    Since: 1.5
    Source: shortcodes.php, line 508

    sports_bench_game_linescore – apply_filters( ‘sports_bench_game_linescore’, $html, $game, $away_team, $home_team, $sport, $game_info, $linescore_array )

    Outputs the HTML for the linescore table for a game

    Parameters

    • $html, string, the current HTML for the linescore table
    • $game, Sports_Bench_Game object, the game object for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $sport, string, the sport that’s being used on the site
    • $game_info, array, information for the game, used for all sports but baseball
    • $linescore_array, array, linescore information for the game, used only for baseball

    Returns

    • string, the HTML for the linescore table

    Since: 1.5
    Source: baseball-game-info.php, line 79; basketball-game-info.php, line 32; football-game-info.php, line 32; hockey-game-info.php, line 34; rugby-game-info.php, line 33; soccer-game-info.php, line 33; volleyball-game-info.php, line 33

    sports_bench_game_events – apply_filters( ‘sports_bench_game_events’, $html, $events, $away_team, $home_team, $sport )

    Outputs the HTML for the game events table for a game

    Parameters

    • $html, string, the current HTML for the game events table
    • $events, array, the list of game events for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $sport, string, the sport that’s being used on the site

    Returns

    • string, the HTML for the game events table

    Since: 1.5
    Source: baseball-game-info.php, line 123; football-game-info.php, line 53; hockey-game-info.php, line 55; rugby-game-info.php, line 54; soccer-game-info.php, line 52

    sports_bench_team_stats – apply_filters( ‘sports_bench_team_stats’, $html, $game_info, $away_team, $home_team, $game, $sport )

    Outputs the HTML for the team stats table for a game

    Parameters

    • $html, string, the current HTML for the team stats table
    • $game_info, array, the list of game team stats for the selected game
    • $away_team, Sports_Bench_Team object, the team object for the away team
    • $home_team, Sports_Bench_Team object, the team object for the home team
    • $game, Sports_Bench_Game object, the game object for the current game
    • $sport, string, the sport that’s being used on the site

    Returns

    • string, the HTML for the team stats table

    Since: 1.5
    Source: basketball-game-info.php, line 53; football-game-info.php, line 75; hockey-game-info.php, line 76; rugby-game-info.php, line 75; soccer-game-info.php, line 73; volleyball-game-info.php, line 54

    sports_bench_individual_game_stats – apply_filters( ‘sports_bench_individual_game_stats’, $html, $stats, $team, $away_home, $sport )

    Outputs the HTML table for a team’s individual stats for a game

    Parameters

    • $html, string, the current HTML for the individual stats table
    • $stats, array, the stats for the table
    • $team, Sports_Bench_Team object, the team object for the team
    • $away_home, string, whether the team is the away or home team
    • $sport, string, the sport that’s being used on the site

    Returns

    • string, the HTML for the individual stats table

    Since: 1.5
    Source: baseball-game-info.php, line 144, 165; basketball-game-info.php, line 74, 95; football-game-info.php, line 107, 138; hockey-game-info.php, line 97, 118; rugby-game-info.php, line 96, 117; soccer-game-info.php, line 94, 115; volleyball-game-info.php, line 99, 120

    sports_bench_player_stats_table – apply_filters( ‘sports_bench_player_stats_table’, $html, $player, $sport, $seasons )

    Outputs the HTML player’s career stats table

    Parameters

    • $html, string, the current HTML for the player stats table
    • $player, Sports_Bench_Player object, the player object for the player
    • $sport, string, the sport that’s being used on the site
    • $seasons, array, the stats for the player

    Returns

    • string, the HTML for the player’s career stats table

    Since: 1.5
    Source: baseball-player-info.php, line 106; basketball-player-info.php, line 78; football-player-info.php, line 61; hockey-player-info.php, line 79; rugby-player-info.php, line 27; soccer-game-info.php, line 66; volleyball-player-info.php, line 51

    sports_bench_player_game_stats_table – apply_filters( ‘sports_bench_player_game_stats_table’, $html, $game, $team_id, $seasons, $POST )

    Outputs the HTML player’s individual game stats table row

    Parameters

    • $html, string, the current HTML for the individual game stats table row
    • $game, array, information for the game
    • $team_id, integer, the team id for the player’s team that season
    • $sport, string, the sport that’s being used on the site
    • $POST, array, information from the screen that can be used (includes team, player and season)

    Returns

    • string, the HTML for the player’s individual game stats table row

    Since: 1.5
    Source: baseball-player-info.php, line 141; basketball-player-info.php, line 113; football-player-info.php, line 96; hockey-player-info.php, line 114; rugby-player-info.php, line 62; soccer-game-info.php, line 100; volleyball-player-info.php, line 86

    sports_bench_team_stats_table – apply_filters( ‘sports_bench_team_stats_table’, $html, $player_stats_array, $sport )

    Outputs the HTML for the player stats table for a team

    Parameters

    • $html, string, the current HTML for the player stats table
    • $player_stats_array, array, the stats for the table
    • $sport, string, the sport that’s being used on the site

    Returns

    • string, the HTML for the team’s player’s stats table

    Since: 1.5
    Source: baseball-team-info.php, line 93; basketball-team-info.php, line 85; football-team-info.php, line 97; hockey-team-info.php, line 82; rugby-team-info.php, line 76; soccer-game-info.php, line 78; volleyball-team-info.php, line 83

  • WP REST API Integration

    JavaScript frameworks and the WP REST API are the hot thing in web development. If you’re creating a site that uses the REST API and any of the popular frameworks, Sports Bench has the tools to help you. Below you’ll find the available endpoints you can use to access players, teams and games hook up the plugin to your website.

    Brackets

    URLs: /sportsbench/brackets, /sportsbench/brackets/id
    Accepted Parameters: bracket_id, num_teams, bracket_format, bracket_title, bracket_season
    Outputs: JSON array of all of the brackets that match the parameters with all of the columns in the brackets table (see “Available Columns” section below)

    Divisions

    URLs: /sportsbench/divisions, /sportsbench/divisions/id
    Accepted Parameters: division_id, division_name, division_conference, division_conference_id, division_color
    Outputs: JSON array of all of the divisions that match the parameters with all of the columns in the divisions table (see “Available Columns” section below)

    Games

    URLs: /sportsbench/games, /sportsbench/games/id
    Accepted Parameters: game_id, game_week, game_season, game_day, game_home_id, game_away_id, game_attendance, game_status
    Outputs: JSON array of all of the games that match the parameters with all of the columns in the game table depending on the sport (see “Available Columns” section below)

    Game Info

    URLs: /sportsbench/game_info, /sportsbench/game_info/id
    Accepted Paramenters: game_info_id, game_id, game_info_inning (if baseball), game_info_quarter (if football), game_info_period (if hockey)
    Outputs: JSON array of all of the game info rows that match the parameters with all of the columns in the game_info table depending on the sport (see “Available Columns” section below)

    Game Stats

    URLs: /sportsbench/game_stats, /sportsbench/game_stats/id
    Accepted Parameters: game_stats_player_id, game_id, game_team_id, game_player_id
    Outputs: JSON array of all of the game stats rows that match the parameters with all of the columns in the game_stats table depending on the sport (see “Available Columns” section below)

    Players

    URLs: /sportsbench/players, /sportsbench/players/id
    Accepted Parameters: player_id, player_first_name, player_last_name, player_position, player_home_city, player_home_state, player_date_of_birth, team_id, player_weight, player_height, player_slug
    Outputs: JSON array of all of the players that match the parameters with all of the columns in the players table (see “Available Columns” section below)

    Series

    URLs: /sportsbench/series, /sportsbench/series/id
    Accepted Parameters: series_id, bracket_id, series_format, playoff_round, team_one_id, team_one_seed, team_two_id, team_two_seed, game_ids
    Outputs: JSON array of all of the playoff series that match the parameters with all of the columns in the series table (see “Available Columns” section below)

    Teams

    URLs: /sportsbench/teams, /sportsbench/teams/id
    Accepted Parameters: team_id, team_name, team_location, team_nickname, team_abbreviation, team_city, team_state, team_stadium, team_stadium_capacity, team_head_coach, team_division, team_name, team_primary_color, team_secondary_color, team_slug
    Outputs: JSON array of all of the teams that match the parameters with all of the columns in the teams table (see “Available Columns” section below)

  • Available Columns

    Sometimes, the best solution to accomplish what you’re trying to do is to just call the table columns themselves directly. Below are the names of the tables used, the table column names and their data type.

    Team Columns

    • team_id, integer
    • team_name, text
    • team_location, text
    • team_nickname, text
    • team_abbreviation
    • team_city, text
    • team_state, text
    • team_stadium, text
    • team_stadium_capacity, integer
    • team_head_coach, text
    • team_division, integer
    • team_primary_color, text
    • team_secondary_color, text
    • team_logo, text
    • team_photo, text
    • team_slug, text

    Player Columns

    • player_id, integer
    • player_first_name, text
    • player_last_name, text
    • player_birth_day, text
    • player_photo, text
    • player_position, text
    • player_home_city, text
    • player_home_state, text
    • team_id, integer
    • player_weight, integer
    • player_height, text
    • player_slug, text

    Division Columns

    • division_id, integer
    • division_name, text
    • division_conference, text
    • division_conference_id, integer
    • division_color, text

    Bracket Columns

    • bracket_id, integer
    • num_teams, integer
    • bracket_format, text
    • bracket_title, text
    • bracket_season, text

    Series Columns

    • series_id, integer
    • bracket_id, integer
    • series_format, text
    • playoff_round, text
    • team_one_id, integer
    • team_one_seed, integer
    • team_two_id, integer
    • team_two_seed, integer
    • game_ids, text

    Basic Game Columns

    • game_id, integer
    • game_week, integer
    • game_day, datetime
    • game_season, text
    • game_home_id, integer
    • game_away_id, integer
    • game_home_final, integer
    • game_away_final, integer
    • game_attendance, integer
    • game_status, text
    • game_current_period, text
    • game_current_time, text
    • game_current_home_score, integer
    • game_current_away_score, integer
    • game_recap, text
    • game_preview, text

    Basic Game Info Columns

    • game_info_id, integer
    • game_id, integer

    Basic Game Player Stats Columns

    • game_stats_player_id, integer
    • game_id, integer
    • game_team_id, integer
    • game_player_id, integer

    Baseball Game Columns

    • game_home_doubles, text
    • game_home_triples, text
    • game_home_homeruns, text
    • game_home_hits, integer
    • game_home_errors, integer
    • game_home_lob, integer
    • game_away_doubles, text
    • game_away_triples, text
    • game_away_homeruns, text
    • game_away_hits, integer, integer
    • game_away_errors, integer, integer
    • game_away_lob, integer, integer

    Baseball Game Info Columns

    • game_info_inning, text
    • game_info_top_bottom, text
    • game_info_home_score, integer
    • game_info_away_score, integer
    • game_info_runs_scored, integer
    • game_info_score_play, text

    Baseball Game Stats Columns

    • game_player_at_bats, integer
    • game_player_hits, integer
    • game_player_runs, integer
    • game_player_rbis, integer
    • game_player_doubles, integer
    • game_player_triples, integer
    • game_player_homeruns, integer
    • game_player_strikeouts, integer
    • game_player_walks, integer
    • game_player_hit_by_pitch, integer
    • game_player_fielders_choice, integer
    • game_player_position, text
    • game_player_innings_pitched, float
    • game_player_pitcher_strikeouts, integer
    • game_player_pitcher_walks, integer
    • game_player_hit_batters, integer
    • game_player_runs_allowed, integer
    • game_player_earned_runs, integer
    • game_player_hits_allowed, integer
    • game_player_homeruns_allowed, integer
    • game_player_pitch_count, integer
    • game_player_decision, text

    Basketball Game Columns

    • game_home_first_quarter, integer
    • game_home_second_quarter, integer
    • game_home_third_quarter, integer
    • game_home_fourth_quarter, integer
    • game_home_overtime, integer
    • game_home_fgm, integer
    • game_home_fga, integer
    • game_home_3pm, integer
    • game_home_3pa, integer
    • game_home_ftm, integer
    • game_home_fta, integer
    • game_home_off_rebound, integer
    • game_home_def_rebound, integer
    • game_home_assists, integer
    • game_home_steals, integer
    • game_home_blocks, integer
    • game_home_pip, integer
    • game_home_to, integer
    • game_home_pot, integer
    • game_home_fast_break, integer
    • game_home_fouls, integer
    • game_away_first_quarter, integer
    • game_away_second_quarter, integer
    • game_away_third_quarter, integer
    • game_away_fourth_quarter, integer
    • game_away_overtime, integer
    • game_away_fgm, integer
    • game_away_fga, integer
    • game_away_3pm, integer
    • game_away_3pa, integer
    • game_away_ftm, integer
    • game_away_fta, integer
    • game_away_off_rebound, integer
    • game_away_def_rebound, integer
    • game_away_assists, integer
    • game_away_steals, integer
    • game_away_blocks, integer
    • game_away_pip, integer
    • game_away_to, integer
    • game_away_pot, integer
    • game_away_fast_break, integer
    • game_away_fouls, integer

    Basketball Game Info Columns

    • game_info_referees, text
    • game_info_techs, text

    Basketball Game Stats Columns

    • game_player_started, text
    • game_player_minutes, integer
    • game_player_fgm, time
    • game_player_fga, integer
    • game_player_3pm, integer
    • game_player_3pa, integer
    • game_player_ftm, integer
    • game_player_fta, integer
    • game_player_points, integer
    • game_player_off_rebound, integer
    • game_player_def_rebound, integer
    • game_player_assists, integer
    • game_player_steals, integer
    • game_player_blocks, integer
    • game_player_to, integer
    • game_player_plus_minus, double

    Football Game Columns

    • game_home_first_quarter, integer
    • game_home_second_quarter, integer
    • game_home_third_quarter, integer
    • game_home_fourth_quarter, integer
    • game_home_overtime, integer
    • game_home_total, integer
    • game_home_pass, integer
    • game_home_rush, integer
    • game_home_to, integer
    • game_home_ints, integer
    • game_home_fumbles, integer
    • game_home_fumbles_lost, integer
    • game_home_possession, text
    • game_home_kick_returns, integer
    • game_home_kick_return_yards, integer
    • game_home_penalties, integer
    • game_home_penalty_yards, integer
    • game_home_first_downs, integer
    • game_away_first_quarter, integer
    • game_away_second_quarter, integer
    • game_away_third_quarter, integer
    • game_away_fourth_quarter, integer
    • game_away_overtime, integer
    • game_away_total, integer
    • game_away_pass, integer
    • game_away_rush, integer
    • game_away_to, integer
    • game_away_ints, integer
    • game_away_fumbles, integer
    • game_away_fumbles_lost, integer
    • game_away_possession, text
    • game_away_kick_returns, integer
    • game_away_kick_return_yards, integer
    • game_away_penalties, integer
    • game_away_penalty_yards, integer
    • game_away_first_downs, integer

    Football Game Info Columns

    • game_info_quarter, integer
    • game_info_time, integer
    • game_info_scoring_team_id, integer
    • game_info_home_score, integer
    • game_info_away_score, integer
    • game_info_play, text

    Football Game Stats Columns

    • game_player_completions, integer
    • game_player_attempts, integer
    • game_player_pass_yards, integer
    • game_player_pass_tds, integer
    • game_player_pass_ints, integer
    • game_player_rushes, integer
    • game_player_rush_yards, integer
    • game_player_rush_tds, integer
    • game_player_rush_fumbles, integer
    • game_player_catches, integer
    • game_player_receiving_yards, integer
    • game_player_receiving_tds, integer
    • game_player_receiving_fumbles, integer
    • game_player_tackles, float
    • game_player_tfl, float
    • game_player_sacks, float
    • game_player_pbu, integer
    • game_player_ints, integer
    • game_player_tds, integer
    • game_player_ff, integer
    • game_player_fr, integer
    • game_player_blocked, integer
    • game_player_yards, integer
    • game_player_fga, integer
    • game_player_fgm, integer
    • game_player_xpa, integer
    • game_player_xpm, integer
    • game_player_touchbacks, integer
    • game_player_returns, integer
    • game_player_return_yards, integer
    • game_player_return_tds, integer
    • game_player_return_fumbles, integer

    Hockey Game Columns

    • game_home_first_period, integer
    • game_home_first_sog, integer
    • game_home_second_period, integer
    • game_home_second_sog, integer
    • game_home_third_period, integer
    • game_home_third_sog, integer
    • game_home_overtime, integer
    • game_home_overtime_sog, integer
    • game_home_shootout, integer
    • game_home_power_plays, integer
    • game_home_pp_goals, integer
    • game_home_pen_minutes, integer
    • game_away_first_period, integer
    • game_away_first_sog, integer
    • game_away_second_period, integer
    • game_away_second_sog, integer
    • game_away_third_period, integer
    • game_away_third_sog, integer
    • game_away_overtime, integer
    • game_away_overtime_sog, integer
    • game_away_shootout, integer
    • game_away_power_plays, integer
    • game_away_pp_goals, integer
    • game_away_pen_minutes, integer

    Hockey Game Info Columns

    • game_info_event, text
    • game_info_period, integer
    • game_info_time, text
    • player_id, integer
    • game_info_assist_one_id, integer
    • game_info_assist_two_id, integer
    • game_info_penalty, text
    • team_id, integer

    Hockey Game Stats Columns

    • game_player_goals, integer
    • game_player_assists, integer
    • game_player_plus_minus, integer
    • game_player_penalties, integer
    • game_player_pen_minutes, integer
    • game_player_hits, integer
    • game_player_shifts, integer
    • game_player_time_on_ice, time
    • game_player_faceoffs, integer
    • game_player_faceoff_wins, integer
    • game_player_shots_faced, integer
    • game_player_saves, integer
    • game_player_goals_allowed, integer

    Rugby Game Columns

    • game_home_first_half, integer
    • game_home_second_half, integer
    • game_home_extratime, integer
    • game_home_shootout, integer
    • game_home_tries, integer
    • game_home_conversions, integer
    • game_home_penalty_goals, integer
    • game_home_kick_percentage, integer
    • game_home_meters_runs, integer
    • game_home_meters_hand, integer
    • game_home_meters_pass, integer
    • game_home_possession, integer
    • game_home_clean_breaks, integer
    • game_home_defenders_beaten, integer
    • game_home_offload, integer
    • game_home_rucks, integer
    • game_home_mauls, integer
    • game_home_turnovers_conceeded, integer
    • game_home_scrums, integer
    • game_home_lineouts, integer
    • game_home_penalties_conceeded, integer
    • game_home_red_cards, integer
    • game_home_yellow_cards, integer
    • game_home_free_kicks_conceeded, integer
    • game_away_first_half, integer
    • game_away_second_half, integer
    • game_away_extratime, integer
    • game_away_shootout, integer
    • game_away_tries, integer
    • game_away_conversions, integer
    • game_away_penalty_goals, integer
    • game_away_kick_percentage, integer
    • game_away_meters_runs, integer
    • game_away_meters_hand, integer
    • game_away_meters_pass, integer
    • game_away_possession, integer
    • game_away_clean_breaks, integer
    • game_away_defenders_beaten, integer
    • game_away_offload, integer
    • game_away_rucks, integer
    • game_away_mauls, integer
    • game_away_turnovers_conceeded, integer
    • game_away_scrums, integer
    • game_away_lineouts, integer
    • game_away_penalties_conceeded, integer
    • game_away_red_cards, integer
    • game_away_yellow_cards, integer
    • game_away_free_kicks_conceeded, integer

    Rugby Game Info Columns

    • team_id, integer
    • game_info_home_score, integer
    • game_info_away_score, integer
    • game_info_event, text
    • game_info_time, integer
    • player_id, integer

    Rugby Game Stats Columns

    • game_player_tries, integer
    • game_player_assists, integer
    • game_player_conversions, integer
    • game_player_penalty_goals, integer
    • game_player_drop_kicks, integer
    • game_player_points, integer
    • game_player_penalties_conceeded, integer
    • game_player_meters_run, integer
    • game_player_red_cards, integer
    • game_player_yellow_cards, integer

    Soccer Game Columns

    • game_home_first_half, integer
    • game_home_second_half, integer
    • game_home_extratime, integer
    • game_home_pks, integer
    • game_home_possession, integer
    • game_home_shots, integer
    • game_home_sog, integer
    • game_home_corners, integer
    • game_home_offsides, integer
    • game_home_fouls, integer
    • game_home_saves, integer
    • game_home_yellow, integer
    • game_home_red, integer
    • game_away_first_half, integer
    • game_away_second_half, integer
    • game_away_extratime, integer
    • game_away_pks, integer
    • game_away_possession, integer
    • game_away_shots, integer
    • game_away_sog, integer
    • game_away_corners, integer
    • game_away_offsides, integer
    • game_away_fouls, integer
    • game_away_saves, integer
    • game_away_yellow, integer
    • game_away_red, integer

    Soccer Game Info Columns

    • team_id, integer
    • game_info_home_score, integer
    • game_info_away_score, integer
    • game_info_event, text
    • game_info_time, integer
    • player_id, integer
    • game_player_name, text
    • game_info_assists, text

    Soccer Game Stats Columns

    • game_player_minutes, integer
    • game_player_goals, integer
    • game_player_assists, integer
    • game_player_shots, integer
    • game_player_sog, integer
    • game_player_fouls, integer
    • game_player_fouls_suffered, integer
    • game_player_shots_faced, integer
    • game_player_shots_saved, integer
    • game_player_goals_allowed, integer

    Volleyball Game Columns

    • game_home_first_set, integer
    • game_home_second_set, integer
    • game_home_third_set, integer
    • game_home_fourth_set, integer
    • game_home_fifth_set, integer
    • game_home_kills, integer
    • game_home_blocks, integer
    • game_home_aces, integer
    • game_home_assists, integer
    • game_home_digs, integer
    • game_home_attacks, integer
    • game_home_hitting_errors, integer
    • game_away_first_set, integer
    • game_away_second_set, integer
    • game_away_third_set, integer
    • game_away_fourth_set, integer
    • game_away_fifth_set, integer
    • game_away_kills, integer
    • game_away_blocks, integer
    • game_away_aces, integer
    • game_away_assists, integer
    • game_away_digs, integer
    • game_away_attacks, integer
    • game_away_hitting_errors, integer

    Volleyball Game Stats Columns

    • game_player_sets_played, integer
    • game_player_points, integer
    • game_player_kills, integer
    • game_player_hitting_errors, integer
    • game_player_attacks, integer
    • game_player_set_attempts, integer
    • game_player_set_errors, integer
    • game_player_serves, integer
    • game_player_serve_errors, integer
    • game_player_aces, integer
    • game_player_blocks, integer
    • game_player_block_attempts, integer
    • game_player_block_errors, integer
    • game_player_digs, integer
    • game_player_receiving_errors, integer
View Codex

See Sports Bench in Action

Want to see Sports Bench in action before deciding whether to purchase it or not? Click the link below to see the demo, where you can see all of the features the plugin and theme combo has to offer.

View Demo

Pricing Information

Plugin Only

  • Ability to integrate the plugin into a theme you’re already using.
  • Complete codex to customize usage of the plugin with the theme you already use.
  • Ability to add more functions and other customizations to the plugin.
$25.00

Plugin and Theme

  • Full integration between the theme and plugin with no extra work needed.
  • Comes with page templates for standings, scoreboards, stats, teams and players already created.
  • Complete codex to customize the theme and plugin to your liking.
  • Ability to add more functions and other customizations to the plugin.
$35.00

Theme Only

  • Nice, clean and modern WordPress theme.
  • Full-width featured post slider on the home page.
  • Tabbed post home page.
  • Social media options.
$10.00
Purchase

Other Documentation

Changelog

1.7 – September 8, 2018

Plugin
  • Added team stats for team page.
  • Added team and season filters for stat search.
Theme
  • Added styling for new Gutenberg block elements.
  • Added Sports Bench styles to the Gutenberg editor.

1.6 – July 19, 2017

Plugin
  • Added the ability to export league data as a CSV.
  • Added the ability to search for player stats on the front and back end of the website.
  • Added the ability to list basketball referees for games.
  • Fixed errors in Gutenberg blocks.
  • Fixed issue with shortcodes not having the correct amount of arguments for certain filters.
Theme
  • Updated the theme to make it run the best it can.

1.5.2 – April 4, 2018

Plugin
  • Fixed error when trying to load Gutenberg blocks without the Gutenberg plugin.

1.5.1 – April 3, 2018

Plugin
  • Added Gutenberg blocks for brackets, games, game recaps, list division, players, player pages, stats, scoreboard, standings, team, team pages and team schedules.

1.5 – March 7, 2018

Plugin
  • Redesigned the admin elements in order to make it look up to today’s web design standards.
  • Removed default font styling to make the plugin match the current theme better.
  • Added option to use the Josefin Sans font in the front-facing elements of the plugin.
  • Added the ability to create a stylesheet in your theme that will override any Sports Bench styling.
  • Made sure abbreviation guides were added if wanted.
  • Other smaller fixes to make Sports Bench the best it can be.
Theme
  • Redesigned theme to make it match the current web design standards.
  • Added an option to have a slider or tiled posts section at the top of the homepage.
  • Added color options for a red, orange, yellow, green, blue, purple or default theme.
  • Updated to match the Sports Bench plugin.
  • Other small changes to make Sports Bench the best it can be.

1.4 – December 6, 2017

Plugin
  • Added support for rugby and volleyball.
  • Added links to opposing teams from the team schedule.
  • Hid game time if it’s set to midnight. This helps for games with a TBA or TBD game time.
  • Added a shortcode to list teams by division or conference.
  • Added support for neutral site games.
  • Added the ability to include a Google Map with game previews.
  • Added an options endpoint for Sports Bench options.
  • Added the ability to display a link to a page in the scoreboard, standings and stats widgets.
  • Changed row class from “row” to “sports-bench-row” to eliminate conflicts with Bootstrap.
  • Added a team schedule widget.
  • Added the ability to add, create, update and delete items for brackets, divisions, games, game events, game stats, players, playoff series and teams with the WP REST API.
  • Other fixes to make Sports Bench better.
  • Tested with WordPress 4.9.
Theme
  • Added an option to show the homepage slider full-width or at a max-width of 1200px.
  • Tested with WordPress 4.9.

1.3 – September 6, 2017

Plugin
  • Changed some AJAX functions to use the WP REST API.
  • Added rivalry, team page, player page and game recap shortcodes.
  • Added Sports Bench Options page and removed the options from the Customizer.
  • Added a CSV import function.
Theme
  • Changed the sidebar on the player page template to show team information.

1.2.3 – August 3, 2017

Plugin
  • Fixed issue with date picker not showing up on add/edit player page.

1.2.2 – August 3, 2017

Plugin
  • Fixed issue with players not saving.
  • Fixed issue with games not saving because of difference in initial sport in ‘Add Game’ and the database.

1.2.1 – June 21, 2017

Plugin
  • Added better functionality for WP REST API routes, including the ability to group stats by players.
  • Fixed strip slashes issue with player’s height.

1.2 – June 7, 2017

Plugin
  • Fixed error that shows up in the standings widget and standings dashboard widget when there are no teams in the database.
  • Fixed issue with keepers not showing up in the right spot in the game recaps.
  • Changed the style of the teams adn players admin listing and edit pages to match the style of the games admin pages.
  • Added the ability to create playoff brackets.
  • Added an active/inactive option for teams.
  • Made “Free Agent” a team choice for players.
  • Redesigned the games dashboard widget to match the style of the games listing page.
  • Added shortcodes to show the scoreboard, standings or stats.
  • Fixed other minor issues with the plugin.
  • Tested to work with WordPress 4.8.
Theme
  • Fixed issue slider arrows not showing up and centered them vertically.
  • Fixed issue with header covering up top part of post title in the slider.
  • Centered the post title, details and excerpt vertically inside the slider.
  • Tested to work with WordPress 4.8.

1.1- January 7, 2017

Plugin
  • Added custom routes to the WP REST API for all tables.
  • Added standings and games dashboard widgets.
  • Changed the style of the game list page and add/edit game page to make adding game stats much easier.
Theme
  • Vertically centered the post title and information on the longform template.

1.0

  • Initial release to the world.

Licenses

GNU General Public License

http://www.gnu.org/licenses/gpl.html

Photo License

Except where otherwise noted, all photos in the screenshot are also licensed under the GNU General Public License. Copyright 2015 Jacob Martella

Social Media Icons License

All of the social media icons are licensed under the GNU General Public License (http://www.gnu.org/licenses/gpl.html).

Scripts License

All of the scripts used in this theme are licensed under the GNU General Public License (http://www.gnu.org/licenses/gpl.html).

Fonts License

PlayfairDisplay-Regular.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

PlayfairDisplay-Italic.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

PlayfairDisplay-Bold.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

Roboto-Light.ttf: Copyright 2011 Google Inc. All Rights Reserved.

Roboto-LightItalic.ttf: Copyright 2011 Google Inc. All Rights Reserved.

Roboto-Regular.ttf: Copyright 2011 Google Inc. All Rights Reserved.

Roboto-Italic.ttf: Copyright 2011 Google Inc. All Rights Reserved.

Roboto-Bold.ttf: Copyright 2011 Google Inc. All Rights Reserved.

Oswald-Regular.ttf: Copyright (c) 2011-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Names ‘Oswald’

Oswald-Bold.ttf: Copyright (c) 2011-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Names ‘Oswald’

Foundation License

Foundation is licensed under the MIT license. http://www.opensource.org/licenses/mit-license.php

JointsWP License

JointsWP is licensed under the GNU General Public License. http://www.gnu.org/licenses/gpl.html

  • Changelog

    1.7 – September 8, 2018

    Plugin
    • Added team stats for team page.
    • Added team and season filters for stat search.
    Theme
    • Added styling for new Gutenberg block elements.
    • Added Sports Bench styles to the Gutenberg editor.

    1.6 – July 19, 2017

    Plugin
    • Added the ability to export league data as a CSV.
    • Added the ability to search for player stats on the front and back end of the website.
    • Added the ability to list basketball referees for games.
    • Fixed errors in Gutenberg blocks.
    • Fixed issue with shortcodes not having the correct amount of arguments for certain filters.
    Theme
    • Updated the theme to make it run the best it can.

    1.5.2 – April 4, 2018

    Plugin
    • Fixed error when trying to load Gutenberg blocks without the Gutenberg plugin.

    1.5.1 – April 3, 2018

    Plugin
    • Added Gutenberg blocks for brackets, games, game recaps, list division, players, player pages, stats, scoreboard, standings, team, team pages and team schedules.

    1.5 – March 7, 2018

    Plugin
    • Redesigned the admin elements in order to make it look up to today’s web design standards.
    • Removed default font styling to make the plugin match the current theme better.
    • Added option to use the Josefin Sans font in the front-facing elements of the plugin.
    • Added the ability to create a stylesheet in your theme that will override any Sports Bench styling.
    • Made sure abbreviation guides were added if wanted.
    • Other smaller fixes to make Sports Bench the best it can be.
    Theme
    • Redesigned theme to make it match the current web design standards.
    • Added an option to have a slider or tiled posts section at the top of the homepage.
    • Added color options for a red, orange, yellow, green, blue, purple or default theme.
    • Updated to match the Sports Bench plugin.
    • Other small changes to make Sports Bench the best it can be.

    1.4 – December 6, 2017

    Plugin
    • Added support for rugby and volleyball.
    • Added links to opposing teams from the team schedule.
    • Hid game time if it’s set to midnight. This helps for games with a TBA or TBD game time.
    • Added a shortcode to list teams by division or conference.
    • Added support for neutral site games.
    • Added the ability to include a Google Map with game previews.
    • Added an options endpoint for Sports Bench options.
    • Added the ability to display a link to a page in the scoreboard, standings and stats widgets.
    • Changed row class from “row” to “sports-bench-row” to eliminate conflicts with Bootstrap.
    • Added a team schedule widget.
    • Added the ability to add, create, update and delete items for brackets, divisions, games, game events, game stats, players, playoff series and teams with the WP REST API.
    • Other fixes to make Sports Bench better.
    • Tested with WordPress 4.9.
    Theme
    • Added an option to show the homepage slider full-width or at a max-width of 1200px.
    • Tested with WordPress 4.9.

    1.3 – September 6, 2017

    Plugin
    • Changed some AJAX functions to use the WP REST API.
    • Added rivalry, team page, player page and game recap shortcodes.
    • Added Sports Bench Options page and removed the options from the Customizer.
    • Added a CSV import function.
    Theme
    • Changed the sidebar on the player page template to show team information.

    1.2.3 – August 3, 2017

    Plugin
    • Fixed issue with date picker not showing up on add/edit player page.

    1.2.2 – August 3, 2017

    Plugin
    • Fixed issue with players not saving.
    • Fixed issue with games not saving because of difference in initial sport in ‘Add Game’ and the database.

    1.2.1 – June 21, 2017

    Plugin
    • Added better functionality for WP REST API routes, including the ability to group stats by players.
    • Fixed strip slashes issue with player’s height.

    1.2 – June 7, 2017

    Plugin
    • Fixed error that shows up in the standings widget and standings dashboard widget when there are no teams in the database.
    • Fixed issue with keepers not showing up in the right spot in the game recaps.
    • Changed the style of the teams adn players admin listing and edit pages to match the style of the games admin pages.
    • Added the ability to create playoff brackets.
    • Added an active/inactive option for teams.
    • Made “Free Agent” a team choice for players.
    • Redesigned the games dashboard widget to match the style of the games listing page.
    • Added shortcodes to show the scoreboard, standings or stats.
    • Fixed other minor issues with the plugin.
    • Tested to work with WordPress 4.8.
    Theme
    • Fixed issue slider arrows not showing up and centered them vertically.
    • Fixed issue with header covering up top part of post title in the slider.
    • Centered the post title, details and excerpt vertically inside the slider.
    • Tested to work with WordPress 4.8.

    1.1- January 7, 2017

    Plugin
    • Added custom routes to the WP REST API for all tables.
    • Added standings and games dashboard widgets.
    • Changed the style of the game list page and add/edit game page to make adding game stats much easier.
    Theme
    • Vertically centered the post title and information on the longform template.

    1.0

    • Initial release to the world.
  • Licenses

    GNU General Public License

    http://www.gnu.org/licenses/gpl.html

    Photo License

    Except where otherwise noted, all photos in the screenshot are also licensed under the GNU General Public License. Copyright 2015 Jacob Martella

    Social Media Icons License

    All of the social media icons are licensed under the GNU General Public License (http://www.gnu.org/licenses/gpl.html).

    Scripts License

    All of the scripts used in this theme are licensed under the GNU General Public License (http://www.gnu.org/licenses/gpl.html).

    Fonts License

    PlayfairDisplay-Regular.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

    PlayfairDisplay-Italic.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

    PlayfairDisplay-Bold.ttf: Copyright (c) 2010-2012 by Claus Eggers Sørensen (es@forthehearts.net), with Reserved Font Name ‘Playfair’

    Roboto-Light.ttf: Copyright 2011 Google Inc. All Rights Reserved.

    Roboto-LightItalic.ttf: Copyright 2011 Google Inc. All Rights Reserved.

    Roboto-Regular.ttf: Copyright 2011 Google Inc. All Rights Reserved.

    Roboto-Italic.ttf: Copyright 2011 Google Inc. All Rights Reserved.

    Roboto-Bold.ttf: Copyright 2011 Google Inc. All Rights Reserved.

    Oswald-Regular.ttf: Copyright (c) 2011-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Names ‘Oswald’

    Oswald-Bold.ttf: Copyright (c) 2011-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Names ‘Oswald’

    Foundation License

    Foundation is licensed under the MIT license. http://www.opensource.org/licenses/mit-license.php

    JointsWP License

    JointsWP is licensed under the GNU General Public License. http://www.gnu.org/licenses/gpl.html

Get In Contact

If you have an issue with the item, a feature you wish to see in a later release or want me to customize your version of the item, use the conact form below to get in touch with me. Please note that customizations will cost extra depending on what you wish to customize.

Sports Bench Blog Posts

Sports Bench 1.7 released today

Sports Bench 1.7 is now available. Here’s what’s new in the newest update, including added functionality and support for a coming WordPress feature.

Adding a Google Map to games

Showing information before a game happens is great. But what about if you could show a Google Map to show where the game is taking place?

Customizing game preview information

The game preview areas are likely an area that you’re going to want to customize on your site. Fortunately, it’s pretty easy to do.

Other WordPress Plugins & Themes