Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 2. Include field type for ACF5
- // $version = 5 and can be ignored until ACF6 exists
- function include_field_types_flaticon( $version ) {
- include_once('acf-flaticon-v5.php');
- }
- //add_action('acf/include_field_types', 'include_field_types_flaticon');
- // Plugin will only work if there is an svg folder in the theme.
- function fi_plugin_admin_notices() {
- if (!file_exists(get_template_directory() . '/svg')) {
- 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>";
- } else {
- add_action('acf/include_field_types', 'include_field_types_flaticon');
- }
- }
- add_action('admin_notices', 'fi_plugin_admin_notices');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement