PluginProbe ʕ •ᴥ•ʔ
Advanced Custom Fields: Extended / 0.8.9.2
Advanced Custom Fields: Extended v0.8.9.2
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-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.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
170 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 * acfe_include
30 *
31 * Includes a file within the plugin
32 *
33 * @param string $filename
34 */
35 function acfe_include($filename = ''){
36
37 $file_path = ACFE_PATH . ltrim($filename, '/');
38
39 if(file_exists($file_path)){
40 return include_once($file_path);
41 }
42
43 return false;
44
45 }
46
47 /**
48 * acfe_get_path
49 *
50 * Returns the plugin path
51 *
52 * @param string $filename
53 *
54 * @return string
55 */
56 function acfe_get_path($filename = ''){
57 return ACFE_PATH . ltrim($filename, '/');
58 }
59
60 /**
61 * acfe_get_url
62 *
63 * Returns the plugin url
64 *
65 * @param string $filename
66 *
67 * @return string
68 */
69 function acfe_get_url($filename = ''){
70
71 if(!defined('ACFE_URL')){
72 define('ACFE_URL', acf_get_setting('acfe/url'));
73 }
74
75 return ACFE_URL . ltrim($filename, '/');
76 }
77
78 /**
79 * acfe_get_view
80 *
81 * Load in a file from the 'admin/views' folder and allow variables to be passed through
82 * Based on acf_get_view()
83 *
84 * @param string $path
85 * @param array $args
86 */
87 function acfe_get_view($path = '', $args = array()){
88
89 // allow view file name shortcut
90 if(substr($path, -4) !== '.php'){
91 $path = acfe_get_path("includes/admin/views/{$path}.php");
92 }
93
94 // include
95 if(file_exists($path)){
96
97 extract($args);
98 include($path);
99
100 }
101
102 }
103
104 /**
105 * acfe_load_textdomain
106 *
107 * Load textdomain files based on acf_load_textdomain()
108 *
109 * @param string $domain
110 *
111 * @return bool
112 */
113 function acfe_load_textdomain($domain = 'acfe'){
114
115 $locale = apply_filters('plugin_locale', acf_get_locale(), $domain);
116 $mofile = $domain . '-' . $locale . '.mo';
117
118 // Try to load from the languages directory first.
119 if(load_textdomain($domain, WP_LANG_DIR . '/plugins/' . $mofile)){
120 return true;
121 }
122
123 // Load from plugin lang folder.
124 return load_textdomain($domain, acfe_get_path('lang/' . $mofile));
125
126 }
127
128 /**
129 * acfe_after_plugin_row
130 *
131 * after_plugin_row
132 *
133 * @param $plugin_file
134 * @param $plugin_data
135 * @param $status
136 */
137 add_action('after_plugin_row_' . ACFE_BASENAME, 'acfe_after_plugin_row', 5, 3);
138 function acfe_after_plugin_row($plugin_file, $plugin_data, $status){
139
140 // bail early
141 if(acfe_has_acf()){
142 return;
143 }
144
145 // vars
146 $colspan = version_compare($GLOBALS['wp_version'], '5.5', '<') ? 3 : 4;
147
148 // class
149 $class = 'acfe-plugin-tr';
150 if(isset($plugin_data['update']) && !empty($plugin_data['update'])){
151 $class .= ' acfe-plugin-tr-update';
152 }
153
154 ?>
155 <style>
156 .plugins tr[data-plugin='<?php echo $plugin_file; ?>'] th,
157 .plugins tr[data-plugin='<?php echo $plugin_file; ?>'] td{
158 box-shadow:none;
159 }
160 </style>
161 <tr class="plugin-update-tr active <?php echo $class; ?>">
162 <td colspan="<?php echo $colspan; ?>" class="plugin-update colspanchange">
163 <div class="update-message notice inline notice-error notice-alt">
164 <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>
165 </div>
166 </td>
167 </tr>
168 <?php
169
170 }