Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Created July 22, 2015 09:30
Show Gist options
  • Save thierrypigot/ce2a7645e2ee82c9f109 to your computer and use it in GitHub Desktop.
Save thierrypigot/ce2a7645e2ee82c9f109 to your computer and use it in GitHub Desktop.
Vérification de la présence ACF et du plugin ACF Gallery
<?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