WordPress filter hook

wpab_banner_show

Fired by 9 WordPress plugins, running on 200+ sites between them.

“Return false to hide the banner, for example on sites that already hold a Pro licence.”

How to use wpab_banner_show

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

functions.php
add_filter( 'wpab_banner_show', function( $value, $slugs ) {
	// Change $value here.
	return $value;
}, 10, 2 );

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

9 plugins that fire wpab_banner_show

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

  1. CampaignBay icon CampaignBay30+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:213
  2. CartBay icon CartBay30+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:246
  3. SpaceBay icon SpaceBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:246
  4. OptionBay icon OptionBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:213
  5. TubeBay icon TubeBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:213
  6. NotifyBay icon NotifyBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:213
  7. ProductBay icon ProductBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:246
  8. UpsellBay icon UpsellBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:246
  9. PointBay icon PointBay20+ installs apply_filters( 'wpab_banner_show', true, $slugs ) includes/wpab-banner/wpab-banner-loader.php:213

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.