PluginProbe
Advanced Custom Fields: Extended / 0.8.8.1
Advanced Custom Fields: Extended v0.8.8.1
0.9.2.7 0.9.2.6 0.9.2.5 0.8.6 0.8.6.1 0.8.6.3 0.8.6.5 0.8.6.6 0.8.6.7 0.8.6.8 0.8.6.9 0.8.7 0.8.7.1 0.8.7.2 0.8.7.3 0.8.7.4 0.8.7.5 0.8.7.6 0.8.8 0.8.8.1 0.8.8.10 0.8.8.11 0.8.8.2 0.8.8.3 0.8.8.4 All 92 releases
acf-extended / init.php
init.php
88 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if(!defined('ABSPATH'))
4 exit;
5
6 /**
7 * ACFE: Include
8 *
9 * @param string $filename
10 */
11 function acfe_include($filename = ''){
12
13 $file_path = ACFE_PATH . ltrim($filename, '/');
14
15 if(file_exists($file_path)){
16 include_once($file_path);
17 }
18
19 }
20
21 /**
22 * ACFE: Get URL
23 *
24 * @param string $filename
25 *
26 * @return string
27 */
28 function acfe_get_url($filename = ''){
29
30 if(!defined('ACFE_URL')){
31 define('ACFE_URL', acf_get_setting('acfe/url'));
32 }
33
34 return ACFE_URL . ltrim($filename, '/');
35 }
36
37 /**
38 * ACFE: ACF Pro Check
39 *
40 * @param $plugin_file
41 * @param $plugin_data
42 * @param $status
43 */
44 add_action('after_plugin_row_' . ACFE_BASENAME, 'acfe_plugin_row', 5, 3);
45 function acfe_plugin_row($plugin_file, $plugin_data, $status){
46
47 if(acfe()->has_acf())
48 return;
49
50 // >= WP 5.5
51 $colspan = 4;
52
53 // < WP 5.5
54 if(version_compare($GLOBALS['wp_version'], '5.5', '<'))
55 $colspan = 3;
56
57 ?>
58
59 <style>
60 .plugins tr[data-plugin='<?php echo ACFE_BASENAME; ?>'] th,
61 .plugins tr[data-plugin='<?php echo ACFE_BASENAME; ?>'] td{
62 box-shadow:none;
63 }
64
65 <?php if(isset($plugin_data['update']) && !empty($plugin_data['update'])){ ?>
66
67 .plugins tr.acfe-plugin-tr td{
68 box-shadow:none !important;
69 }
70
71 .plugins tr.acfe-plugin-tr .update-message{
72 margin-bottom:0;
73 }
74
75 <?php } ?>
76 </style>
77
78 <tr class="plugin-update-tr active acfe-plugin-tr">
79 <td colspan="<?php echo $colspan; ?>" class="plugin-update colspanchange">
80 <div class="update-message notice inline notice-error notice-alt">
81 <p><?php _e('ACF Extended requires <a href="https://www.advancedcustomfields.com/pro/" target="_blank">Advanced Custom Fields PRO</a> (minimum: 5.8).', 'acfe'); ?></p>
82 </div>
83 </td>
84 </tr>
85
86 <?php
87
88 }