WordPress filter hook

sportspress_event_performance_icons

Defined by SportsPress and fired by 4 plugins in total, running on 10K+ sites between them.

How to use sportspress_event_performance_icons

It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'sportspress_event_performance_icons', function( $icon, $ID, $arg3 ) {
	// Change $icon here.
	return $icon;
}, 10, 3 );

Argument names come from SportsPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

4 plugins that fire sportspress_event_performance_icons

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. SportsPress icon SportsPress10,000+ installs apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 ) includes/class-sp-event.php:445
  2. Detailed Player Stats for SportsPress icon Detailed Player Stats for SportsPress100+ installs apply_filters( 'sportspress_event_performance_icons', $icon, $performance_id, 1 ) detailed-player-stats-for-sportspress.php:307
  3. Officials Templates for SportsPress icon Officials Templates for SportsPress70+ installs apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ) includes/class-otfs-officials.php:218
  4. Suspended Lists for SportsPress icon Suspended Lists for SportsPress10+ installs apply_filters( 'sportspress_event_performance_icons', '', $stat->ID, 1 ) includes/class-sl-suspended-list.php:224

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.