Created
July 22, 2015 09:30
-
-
Save thierrypigot/ce2a7645e2ee82c9f109 to your computer and use it in GitHub Desktop.
Vérification de la présence ACF et du plugin ACF Gallery
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 | |
| if( !class_exists( 'acf' ) || !function_exists( 'acfgp_register_fields' ) ) | |
| { | |
| function tp_acf_admin_error_notice() | |
| { | |
| $plugin = get_plugin_data( __FILE__ ); | |
| echo '<div class="error"><p><strong>'. $plugin['Name'] .'</strong> need <strong>ACF</strong> and <strong>ACF Gallery Field</strong> plugin to work :(</p></div>'; | |
| } | |
| add_action( 'admin_notices', 'tp_acf_admin_error_notice' ); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment