acf-extended
Last commit date
assets
7 years ago
includes
7 years ago
acf-extended.php
7 years ago
init.php
7 years ago
readme.txt
7 years ago
init.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | if(!defined('ABSPATH')) |
| 4 | exit; |
| 5 | |
| 6 | /** |
| 7 | * ACFE: Is ACF Pro Active |
| 8 | */ |
| 9 | function acfe_is_acf_pro(){ |
| 10 | |
| 11 | return class_exists('ACF') && defined('ACF_PRO') && defined('ACF_VERSION') && version_compare(ACF_VERSION, '5.7.10', '>='); |
| 12 | |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * ACFE: ACF Pro Check |
| 17 | */ |
| 18 | add_filter('plugin_row_meta', 'acfe_plugin_meta', 10, 4); |
| 19 | function acfe_plugin_meta($plugin_meta, $plugin_file, $plugin_data, $status){ |
| 20 | |
| 21 | if($plugin_file != ACFE_BASENAME || acfe_is_acf_pro()) |
| 22 | return $plugin_meta; |
| 23 | |
| 24 | $plugin_meta[] = '<span style="color:#a00;">Advanced Custom Fields PRO is required</span>'; |
| 25 | |
| 26 | return $plugin_meta; |
| 27 | |
| 28 | } |