Advertisement
Guest User

Untitled

a guest
Sep 12th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // 2. Include field type for ACF5
  2. // $version = 5 and can be ignored until ACF6 exists
  3. function include_field_types_flaticon( $version ) {
  4. include_once('acf-flaticon-v5.php');
  5. }
  6. //add_action('acf/include_field_types', 'include_field_types_flaticon');
  7.  
  8. // Plugin will only work if there is an svg folder in the theme.
  9. function fi_plugin_admin_notices() {
  10. if (!file_exists(get_template_directory() . '/svg')) {
  11. echo "<div class='error'><p>ACF Flaticon Plugin: Your current theme does not have an svg folder in it. Please try another theme.</p></div>";
  12. } else {
  13. add_action('acf/include_field_types', 'include_field_types_flaticon');
  14. }
  15. }
  16. add_action('admin_notices', 'fi_plugin_admin_notices');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement