Created
May 27, 2025 11:34
-
-
Save danmaby/0b3c4a0d37142d4a6edd1ef7afee0f57 to your computer and use it in GitHub Desktop.
Prevent BetterDocs Essential Blocks banner from showing by setting the dismiss transient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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