Actions

This is an extensive list of action hooks available in SportsPress Pro version 1.2 and above.

Typical Request Actions

These actions are called when a logged-in user opens the home page in Version 1.2. This list may show only the first time each action is called, and in many cases no function is hooked to the action. Actions are called with the function do_action().
Hook Called
sportspress_loaded After the core features have been loaded.
sportspress_widgets After registering core widgets.
before_sportspress_init Before localization, formats, and string options are loaded.
sportspress_init After SportsPress is initialized.
sportspress_register_taxonomy Before core taxonomies are registered.
sportspress_register_post_type Before core post types are registered.
sportspress_admin_css After enqueuing admin styles.
sportspress_include_post_type_handlers After admin post type classes are loaded.

Settings Actions

These actions are called on SportsPress settings pages.

Hook Called
sportspress_settings_start Before the settings page is displayed.
sportspress_settings_save_(tab) While a specific settings tab is saved.
sportspress_update_options_(tab) After a specific settings tab is saved.
sportspress_update_options After any settings tab is saved.
sportspress_settings_(tab) While displaying a settings tab.
sportspress_admin_field_(option_type) While displaying an input field for an option type.
sportspress_update_option_(option_type) While updating an option type.
sportspress_update_option While updating any option.
sportspress_settings_saved After saving settings.
sportspress_update_options_(tab) While updating a specific settings tab.
sportspress_settings_tabs Before displaying settings tabs.
sportspress_sections_(tab) Before displaying a specific settings tab.
sportspress_settings_(tab) While displaying a specific settings tab.
sportspress_process_(post_type)_meta While saving meta values for a specific post type.
Notes
  • (tab) can be replaced with: general, events, teams, players, staff, branding, league-menu, sponsors, text, or configure.
  • (option_type) can be replaced with: checkbox, textarea, text, email, number, select, color, password, radio, or multiselect.
  • (post_type) can be replaced with: event, calendar, team, table, player, list, staff, directory, or sponsor.

Template Actions

These actions are called when loading and displaying templates.

Hook Called
sportspress_before_template_part Before a template is loaded.
sportspress_after_template_part After a template is loaded.
sportspress_before_single_(post_type) Before content for a specific post type.
sportspress_single_(post_type)_content While outputting content of a specific post type.
sportspress_after_single_(post_type) After content is loaded for a specific post type.
Notes
  • (post_type) can be replaced with: event, calendar, team, table, player, list, staff, directory, or sponsor.

Still need help? Submit a Support Ticket Submit a Support Ticket