Created
February 5, 2021 13:35
-
-
Save wpmu-authors/ccb0160b806f55a0b0898aabba5c1fbe to your computer and use it in GitHub Desktop.
acf-notice.php
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
if( !function_exists( 'the_field' ) && empty( get_option( 'my-acf-notice-dismissed' ) ) ) { | |
add_action( 'admin_notices', 'my_acf_admin_notice' ); | |
} | |
function my_acf_admin_notice() { | |
?> | |
<div class="notice error my-acf-notice is-dismissible" > | |
<p><?php _e( 'ACF is not necessary for this plugin, but it will make your experience better, install it now!', 'my-text-domain' ); ?></p> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment