Skip to content

Instantly share code, notes, and snippets.

@danmaby
Created May 27, 2025 11:34
Show Gist options
  • Save danmaby/0b3c4a0d37142d4a6edd1ef7afee0f57 to your computer and use it in GitHub Desktop.
Save danmaby/0b3c4a0d37142d4a6edd1ef7afee0f57 to your computer and use it in GitHub Desktop.
Prevent BetterDocs Essential Blocks banner from showing by setting the dismiss transient
<?php
/**
* Prevent BetterDocs Essential Blocks banner from showing by setting the dismiss transient.
*/
add_action( 'init', function() {
// Set the transient that BetterDocs checks to determine if banner should be hidden
if ( ! get_transient( 'wpdeveloper_eb_banner_promo_hide' ) ) {
set_transient( 'wpdeveloper_eb_banner_promo_hide', true, YEAR_IN_SECONDS );
}
}, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment