Sports Bench screenshot

Sports Bench 1.9 released today

It’s been a while, hasn’t it?

Sports Bench 1.9 was released today, and it is the first major release of the year. There are a few big new features for you to take advantage of and a couple of fixes as we gear up for a big change coming up in Sports Bench 2.0.

So let’s look through Sports Bench 1.9.

Box Scores

One of my favorite new things I’ve added into the plugin is automatic box scores. Previously you had to create a game recap in order for a box score to show.

But not anymore. To set up the box scores, simply create a new page and either set it as the box score page template (if using the theme), add in the box score block or add in the box score shortcode. Then update the box score setting in the Sports Bench options page.

From there, each game will have a link to the box score, which will be shown with games in the scoreboard page and widget. Eventually the link will be added to team schedules.

Player Bios

Also new is the ability to have player bios. You can add a bio to a player when you go to add them or edit them.

If you have the theme or use the block or shortcode for player pages, you don’t need to do anything to see them on the front end. If you’re customizing what’s done with Sports Bench, you can access the player bio through the player_bio attribute in the Sports_Bench_Player class.

Custom Files

For those of you who are trying to extend Sports Bench in interesting ways, things might have gotten a bit easier. You can now add in your own admin page templates. This works for any file that displays a place to enter in data, i.e. add/edit teams, add/edit players and add/edit games.

To get this to work, you’ll need to create a sports-bench directory inside of your theme. Then replicate the path to the file you’re overriding in your theme. So to create a new player admin page to override the plugin, your path to the new file would be: your-theme/sports-bench/admin/team-admin-page.php.

This can help you if you want to add in new fields/columns for teams, players and games.

You really only should do this if you are a developer and know what you’re doing. Otherwise things can go sideways quickly.

Division/Conference title filters

Also, if your conferences and divisions aren’t called divisions and conferences, you can now change that. To change what conferences are called, you can use the sports_bench_conference_name filter. And to change what divisions are called, you can use the sports_bench_division_name filter. And also you can change the “League” tab on the standings page to say whatever you want with the sports_bench_league_name filter.

Other fixes

As always there are a few other fixes that are in this update. The main one is an accessibility fix with the slider buttons. The buttons, which were technically anchor tags, are now actually buttons to make them semantically correct.

If you run into any accessibility issues with Sports Bench, please reach out on the forums.

What’s coming next

As for Sports Bench 2.0, this is going to be a pretty big update. The idea right now the idea is to completely refactor both the plugin and theme.

The plugin will be rebuilt as an object-oriented programming style plugin, with an eye towards making sure the performance is as good as it can be. Plus I want to make sure that the coding style and best practices are used as much as possible.

The theme will be rebuilt with WP Rig as the starter theme with an eye towards accessibility and performance to help websites running the theme.

Both of these might cause issues with previous versions of the plugin, and I will be mindful of them as I work with them. There will likely be beta and release candidate versions of Sports Bench 2.0, so if you have the plugin and want to test them, make sure to stay tuned to the blog here and the forums.

There’s no real timetable for 2.0 since I want this to be as good as possible, but I’m hoping for sometime around New Year’s.

If you run into any issues with updating to Sports Bench 1.9, please leave a comment here or reach out on the forums for help.

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.