PluginProbe ʕ •ᴥ•ʔ
Advanced Custom Fields: Extended / 0.8.9.3
Advanced Custom Fields: Extended v0.8.9.3
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 0.8.8.5 0.8.8.6 0.8.8.7 0.8.8.8 0.8.8.9 0.8.9 0.8.9.1 0.8.9.2 0.8.9.3 0.8.9.4 0.8.9.5 0.9 0.9.0.1 0.9.0.2 0.9.0.3 0.9.0.4 0.9.0.5 0.9.0.6 0.9.0.7 0.9.0.8 0.9.0.9 0.9.1 0.9.1.1 0.9.2 0.9.2.1 0.9.2.2 0.9.2.3 0.9.2.4 trunk 0.5 0.5.1 0.5.2 0.5.2.1 0.5.2.3 0.5.5 0.5.5.1 0.5.8 0.5.8.1 0.6 0.6.0.1 0.6.0.2 0.6.1 0.6.3 0.6.5 0.6.7 0.6.7.2 0.7 0.7.0.3 0.7.5 0.7.5.5 0.7.8 0.7.9 0.7.9.3 0.7.9.4 0.7.9.9.8 0.7.9.9.9 0.8 0.8.1 0.8.2 0.8.3 0.8.3.1 0.8.4 0.8.4.1 0.8.4.5 0.8.4.6 0.8.5 0.8.5.5
acf-extended / includes / init.php
acf-extended / includes Last commit date
admin 3 years ago field-groups 3 years ago fields 3 years ago fields-settings 3 years ago locations 3 years ago modules 3 years ago screens 3 years ago acfe-deprecated-functions.php 3 years ago acfe-field-functions.php 3 years ago acfe-field-group-functions.php 3 years ago acfe-file-functions.php 3 years ago acfe-form-functions.php 3 years ago acfe-helper-functions.php 3 years ago acfe-meta-functions.php 3 years ago acfe-post-functions.php 3 years ago acfe-screen-functions.php 3 years ago acfe-template-functions.php 3 years ago acfe-term-functions.php 3 years ago acfe-user-functions.php 3 years ago acfe-wp-functions.php 3 years ago assets.php 3 years ago compatibility-6.0.php 3 years ago compatibility.php 3 years ago field-extend.php 3 years ago field.php 3 years ago hooks.php 3 years ago init.php 3 years ago local-meta.php 3 years ago module-acf.php 3 years ago module-db.php 3 years ago module-l10n.php 3 years ago module-legacy.php 3 years ago module-manager.php 3 years ago module-post.php 3 years ago module-posts.php 3 years ago module-upgrades.php 3 years ago module.php 3 years ago multilang.php 3 years ago settings.php 3 years ago third-party.php 3 years ago upgrades.php 3 years ago
init.php
180 lines
1 <?php
2
3 if(!defined('ABSPATH')){
4 exit;
5 }
6
7 /**
8 * acfe_has_acf
9 *
10 * Checks ACF version
11 *
12 * @return bool
13 */
14 function acfe_has_acf(){
15 return class_exists('ACF') && defined('ACF_PRO') && defined('ACF_VERSION') && version_compare(ACF_VERSION, '5.8', '>=');
16 }
17
18
19 /**
20 * acfe_is_acf_admin_6
21 *
22 * @return bool
23 */
24 function acfe_is_acf_6(){
25 return acf_version_compare(acf_get_setting('version'), '>=', '6.0');
26 }
27
28
29 /**
30 * acfe_is_acf_admin_61
31 *
32 * @return bool
33 */
34 function acfe_is_acf_61(){
35 return acf_version_compare(acf_get_setting('version'), '>=', '6.1');
36 }
37
38 /**
39 * acfe_include
40 *
41 * Includes a file within the plugin
42 *
43 * @param string $filename
44 */
45 function acfe_include($filename = ''){
46
47 $file_path = ACFE_PATH . ltrim($filename, '/');
48
49 if(file_exists($file_path)){
50 return include_once($file_path);
51 }
52
53 return false;
54
55 }
56
57 /**
58 * acfe_get_path
59 *
60 * Returns the plugin path
61 *
62 * @param string $filename
63 *
64 * @return string
65 */
66 function acfe_get_path($filename = ''){
67 return ACFE_PATH . ltrim($filename, '/');
68 }
69
70 /**
71 * acfe_get_url
72 *
73 * Returns the plugin url
74 *
75 * @param string $filename
76 *
77 * @return string
78 */
79 function acfe_get_url($filename = ''){
80
81 if(!defined('ACFE_URL')){
82 define('ACFE_URL', acf_get_setting('acfe/url'));
83 }
84
85 return ACFE_URL . ltrim($filename, '/');
86 }
87
88 /**
89 * acfe_get_view
90 *
91 * Load in a file from the 'admin/views' folder and allow variables to be passed through
92 * Based on acf_get_view()
93 *
94 * @param string $path
95 * @param array $args
96 */
97 function acfe_get_view($path = '', $args = array()){
98
99 // allow view file name shortcut
100 if(substr($path, -4) !== '.php'){
101 $path = acfe_get_path("includes/admin/views/{$path}.php");
102 }
103
104 // include
105 if(file_exists($path)){
106
107 extract($args);
108 include($path);
109
110 }
111
112 }
113
114 /**
115 * acfe_load_textdomain
116 *
117 * Load textdomain files based on acf_load_textdomain()
118 *
119 * @param string $domain
120 *
121 * @return bool
122 */
123 function acfe_load_textdomain($domain = 'acfe'){
124
125 $locale = apply_filters('plugin_locale', acf_get_locale(), $domain);
126 $mofile = $domain . '-' . $locale . '.mo';
127
128 // Try to load from the languages directory first.
129 if(load_textdomain($domain, WP_LANG_DIR . '/plugins/' . $mofile)){
130 return true;
131 }
132
133 // Load from plugin lang folder.
134 return load_textdomain($domain, acfe_get_path('lang/' . $mofile));
135
136 }
137
138 /**
139 * acfe_after_plugin_row
140 *
141 * after_plugin_row
142 *
143 * @param $plugin_file
144 * @param $plugin_data
145 * @param $status
146 */
147 add_action('after_plugin_row_' . ACFE_BASENAME, 'acfe_after_plugin_row', 5, 3);
148 function acfe_after_plugin_row($plugin_file, $plugin_data, $status){
149
150 // bail early
151 if(acfe_has_acf()){
152 return;
153 }
154
155 // vars
156 $colspan = version_compare($GLOBALS['wp_version'], '5.5', '<') ? 3 : 4;
157
158 // class
159 $class = 'acfe-plugin-tr';
160 if(isset($plugin_data['update']) && !empty($plugin_data['update'])){
161 $class .= ' acfe-plugin-tr-update';
162 }
163
164 ?>
165 <style>
166 .plugins tr[data-plugin='<?php echo $plugin_file; ?>'] th,
167 .plugins tr[data-plugin='<?php echo $plugin_file; ?>'] td{
168 box-shadow:none;
169 }
170 </style>
171 <tr class="plugin-update-tr active <?php echo $class; ?>">
172 <td colspan="<?php echo $colspan; ?>" class="plugin-update colspanchange">
173 <div class="update-message notice inline notice-error notice-alt">
174 <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>
175 </div>
176 </td>
177 </tr>
178 <?php
179
180 }