acf-extended
Last commit date
assets
6 years ago
includes
6 years ago
acf-extended.php
6 years ago
init.php
6 years ago
readme.txt
6 years ago
init.php
61 lines
| 1 | <?php |
| 2 | |
| 3 | if(!defined('ABSPATH')) |
| 4 | exit; |
| 5 | |
| 6 | /** |
| 7 | * ACFE: Include |
| 8 | */ |
| 9 | function acfe_include($filename = ''){ |
| 10 | |
| 11 | $file_path = ACFE_PATH . ltrim($filename, '/'); |
| 12 | |
| 13 | if(file_exists($file_path)){ |
| 14 | |
| 15 | include_once($file_path); |
| 16 | |
| 17 | } |
| 18 | |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * ACFE: ACF Pro Check |
| 23 | */ |
| 24 | add_action('after_plugin_row_' . ACFE_BASENAME, 'acfe_plugin_row', 5, 3); |
| 25 | function acfe_plugin_row($plugin_file, $plugin_data, $status){ |
| 26 | |
| 27 | if(acfe()->has_acf()) |
| 28 | return; |
| 29 | |
| 30 | ?> |
| 31 | |
| 32 | <style> |
| 33 | .plugins tr[data-plugin='<?php echo ACFE_BASENAME; ?>'] th, |
| 34 | .plugins tr[data-plugin='<?php echo ACFE_BASENAME; ?>'] td{ |
| 35 | box-shadow:none; |
| 36 | } |
| 37 | |
| 38 | <?php if(isset($plugin_data['update']) && !empty($plugin_data['update'])){ ?> |
| 39 | |
| 40 | .plugins tr.acfe-plugin-tr td{ |
| 41 | box-shadow:none !important; |
| 42 | } |
| 43 | |
| 44 | .plugins tr.acfe-plugin-tr .update-message{ |
| 45 | margin-bottom:0; |
| 46 | } |
| 47 | |
| 48 | <?php } ?> |
| 49 | </style> |
| 50 | |
| 51 | <tr class="plugin-update-tr active acfe-plugin-tr"> |
| 52 | <td colspan="3" class="plugin-update colspanchange"> |
| 53 | <div class="update-message notice inline notice-error notice-alt"> |
| 54 | <p><?php _e('ACF Extended requires Advanced Custom Fields PRO (minimum: 5.7.10).', 'acfe'); ?></p> |
| 55 | </div> |
| 56 | </td> |
| 57 | </tr> |
| 58 | |
| 59 | <?php |
| 60 | |
| 61 | } |