Skip to content

Commit 9787f2f

Browse files
committed
ACF Extended: 0.9.0.6
1 parent 6ad9de5 commit 9787f2f

25 files changed

+1308
-1025
lines changed

README.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you don't already own [ACF Pro](https://www.advancedcustomfields.com/pro/), y
1717
* Advanced Fields Validation
1818
* Flexible Content as Page Builder
1919
* Optimize metadata with Performance Mode
20-
* ACF Forms Manager
20+
* Advanced Front-End Forms Manager
2121
* ACF Options Pages / Block Types Manager
2222
* ACF & WordPress Meta Overview
2323
* WordPress Post Types / Taxonomies Manager
@@ -134,6 +134,10 @@ Display field groups on all post types edition screen.
134134

135135
Display field group on attachment admin list screen.
136136

137+
**[Location: Dashboard Widgets](https://www.acf-extended.com/features/field-groups/locations/dashboard)** **(PRO)**
138+
139+
Display field groups and update ACF Fields from the WP Dashboard.
140+
137141
**[Location: Field Value](https://www.acf-extended.com/features/field-groups/locations/field-value)** **(PRO)**
138142

139143
Display a field group based on the field value of an another field group.
@@ -154,6 +158,10 @@ Display field group on taxonomies admin list screen.
154158

155159
Display field group on user admin list screen.
156160

161+
**[Location: Woocommerce](https://www.acf-extended.com/features/field-groups/locations/woocommerce)** **(PRO)**
162+
163+
Display field groups on Woocommerce pages.
164+
157165
**[Location: WP Settings](https://www.acf-extended.com/features/field-groups/locations/wp-settings)** **(PRO)**
158166

159167
Display field groups on WP Settings pages: General, Writing, Reading, Discussion, Media and Permalinks.
@@ -548,14 +556,41 @@ Manage WordPress Options from the Settings > Options page. Options value (string
548556

549557
## 📋 Changelog
550558

559+
### 0.9.0.6
560+
561+
**ACF Extended Pro 0.9.0.6:**
562+
563+
* Field: Flexible Content - Grid - Added filter to rename columns (1/12, 2/12, 3/12…)
564+
* Field: Google Map - Added small UI settings tweaks
565+
* Field: Payment - Removed Polyfill library dependency
566+
* Field Settings: Global Condition - Fixed Global Field Condition operators with ACF 6.3
567+
* Field Settings: Instructions Tooltip - Fixed tooltip always visible when switching tab
568+
* Module: Force Sync - Fixed sync from Dashboard with Flexible Content Toggle Layout
569+
* Module: Force Sync - Enhanced Force Delete compatibility with Json and PHP sync
570+
571+
**ACF Extended Basic 0.9.0.6:**
572+
573+
* Field: Flexible Content - Added missing "Copy/Toggle Layout" localized strings
574+
* Field: Flexible Content - Added JS hook `acfe/flexible/preview/layout=my-layout` variation
575+
* Field: Flexible Content - Enhanced ACF UI CSS settings with "Tabs Hidden"
576+
* Field: Forms - Fixed potential warning when switching from Checkbox to Radio
577+
* Module: Form - Added safe guard logic for ACF fields in "Load" actions
578+
* Module: Form - Fixed outsourced Clone Seamless Fields values
579+
* Module: Form - Fixed Template Tags warning with PHP 8
580+
* Module: Form - User - Builtin Validation now check if email is already used
581+
* Module: Form - User - Builtin Validation now check the login during the insert
582+
* Module: Form - User - Builtin Validation now check the `illegal_user_logins` wp filter
583+
* Module: Form - User - Updating user login now automatically re-log the user
584+
* Global: Fixed Ajax Nonce verification compatibility with ACF 6.3.2
585+
551586
### 0.9.0.5
552587

553588
**ACF Extended Pro 0.9.0.5:**
554589

555590
* Field Group Location: Added "Dashboard > Widget" Location
556-
* Field Group Location: Dashboard Widget allows to update Field Groups from the WP Dashboard
557-
* Field Group Location: Added "Woocommerce" locations: Cart, Checkout, Account, Shop & Terms
558-
* Modules: AutoSync - `acfe/php` & `acfe/json` settings now control the AutoSync metabox visbility
591+
* Field Group Location: Dashboard Widget allows to update fields from the WP Dashboard
592+
* Field Group Location: Added "Woocommerce" Cart, Checkout, Account, Shop & Terms
593+
* Modules: AutoSync - `acfe/php` & `acfe/json` settings control the AutoSync metabox visbility
559594

560595
**ACF Extended Basic 0.9.0.5:**
561596

@@ -579,11 +614,11 @@ Manage WordPress Options from the Settings > Options page. Options value (string
579614
* Module: Form - Added `acfe.renderForm()` & `acfe.renderFormAjax()` JS helpers
580615
* Module: Form - Added `acfe_enqueue_form()` PHP helper
581616
* Module: Form - Added `acfe_get_form_action()` allowing dot notation & default arguments
582-
* Module: Form - Added `acfe/form/submit_success_data` PHP hook to pass data to the JS success hook
583-
* Module: Form - Added `acfe/form/validation_begin` JS hook to target front-end form validation
584-
* Module: Form - Added `acfe/form/validation_failure` JS hook to target front-end form validation
585-
* Module: Form - Added `acfe/form/validation_success` JS hook to target front-end form validation
586-
* Module: Form - Added `acfe/form/validation_complete` JS hook to target front-end form validation
617+
* Module: Form - Added `acfe/form/submit_success_data` PHP hook to pass data to the JS
618+
* Module: Form - Added `acfe/form/validation_begin` JS hook to target front-end validation
619+
* Module: Form - Added `acfe/form/validation_failure` JS hook to target front-end validation
620+
* Module: Form - Added `acfe/form/validation_success` JS hook to target front-end validation
621+
* Module: Form - Added `acfe/form/validation_complete` JS hook to target front-end validation
587622
* Field Groups: Advanced Settings - Added ability to assign field’s sub array settings using dot notation
588623
* Field Groups: AutoSync - Added ability to remove existing Json/PHP sync from the Field Group UI
589624
* Field Groups: AutoSync - `acfe/php` & `acfe/json` settings now control the sync metabox visbility

acf-extended.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Advanced Custom Fields: Extended
44
* Description: All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
5-
* Version: 0.9.0.5
5+
* Version: 0.9.0.6
66
* Author: ACF Extended
77
* Plugin URI: https://www.acf-extended.com
88
* Author URI: https://www.acf-extended.com
@@ -19,7 +19,7 @@
1919
class ACFE{
2020

2121
// vars
22-
var $version = '0.9.0.5';
22+
var $version = '0.9.0.6';
2323

2424
/**
2525
* construct

assets/css/acfe-field-group.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,4 +682,12 @@ body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select {
682682

683683
.acf-admin-6.acf-admin-single-field-group .acf-field-type-settings .acf-field {
684684
border-top-width: 0
685+
}
686+
687+
.acf-admin-6.acf-admin-single-field-group #acf-field-group-fields.hide-tabs .acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting {
688+
margin-bottom: 0
689+
}
690+
691+
.acf-admin-6.acf-admin-single-field-group #acf-field-group-fields.hide-tabs .acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul {
692+
margin-bottom: 0
685693
}

assets/css/acfe-field-group.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/acfe-input.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ input.acfe-flexible-control-title {
11001100
}
11011101

11021102
.acf-range-wrap input[type=number] {
1103-
min-width: 3.5em
1103+
min-width: 4.5em
11041104
}
11051105

11061106
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,

assets/css/acfe-input.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/acfe-input.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,6 +4501,7 @@
45014501
acf.doAction('acfe/fields/flexible_content/before_preview', $el, $layout, ajaxData);
45024502
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + name, $el, $layout, ajaxData);
45034503
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + key, $el, $layout, ajaxData);
4504+
acf.doAction('acfe/fields/flexible_content/before_preview/layout=' + layout, $el, $layout, ajaxData);
45044505
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + name + '&layout=' + layout, $el, $layout, ajaxData);
45054506
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + key + '&layout=' + layout, $el, $layout, ajaxData);
45064507

@@ -4516,6 +4517,7 @@
45164517
acf.doAction('acfe/fields/flexible_content/preview', response, $el, $layout, ajaxData);
45174518
acf.doAction('acfe/fields/flexible_content/preview/name=' + name, response, $el, $layout, ajaxData);
45184519
acf.doAction('acfe/fields/flexible_content/preview/key=' + key, response, $el, $layout, ajaxData);
4520+
acf.doAction('acfe/fields/flexible_content/preview/layout=' + layout, response, $el, $layout, ajaxData);
45194521
acf.doAction('acfe/fields/flexible_content/preview/name=' + name + '&layout=' + layout, response, $el, $layout, ajaxData);
45204522
acf.doAction('acfe/fields/flexible_content/preview/key=' + key + '&layout=' + layout, response, $el, $layout, ajaxData);
45214523

assets/js/acfe-input.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/acfe.js

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,42 +1787,68 @@
17871787
return;
17881788
}
17891789

1790+
this.toggle(field, $el, title);
1791+
1792+
},
1793+
1794+
toggle: function(field, $el, title) {
1795+
17901796
// clear title to avoid default browser tooltip
17911797
$el.attr('title', '');
17921798

17931799
// open
17941800
if (!this.tooltips[field.cid]) {
1795-
1796-
this.tooltips[field.cid] = acf.newTooltip({
1797-
text: title,
1798-
target: $el
1799-
});
1800-
1801-
if (acfe.versionCompare(acf.get('wp_version'), '>=', '5.5')) {
1802-
$el.removeClass('dashicons-info-outline').addClass('dashicons-remove');
1803-
}
1801+
this.open(field, $el, title);
18041802

18051803
// close
18061804
} else {
1805+
this.close(field, $el, title);
1806+
}
18071807

1808-
// hide tooltip
1809-
this.tooltips[field.cid].hide();
1810-
1811-
// restore title
1812-
$el.attr('title', this.tooltips[field.cid].get('text'));
1808+
},
18131809

1814-
this.tooltips[field.cid] = false;
1810+
open: function(field, $el, title) {
18151811

1816-
if (acfe.versionCompare(acf.get('wp_version'), '>=', '5.5')) {
1817-
$el.removeClass('dashicons-remove').addClass('dashicons-info-outline');
1818-
}
1812+
this.tooltips[field.cid] = acf.newTooltip({
1813+
text: title,
1814+
target: $el
1815+
});
18191816

1817+
if (acfe.versionCompare(acf.get('wp_version'), '>=', '5.5')) {
1818+
$el.removeClass('dashicons-info-outline').addClass('dashicons-remove');
18201819
}
18211820

18221821
},
18231822

1823+
close: function(field, $el, title) {
1824+
1825+
// hide tooltip
1826+
this.tooltips[field.cid].hide();
1827+
1828+
// restore title
1829+
$el.attr('title', this.tooltips[field.cid].get('text'));
1830+
1831+
this.tooltips[field.cid] = false;
1832+
1833+
if (acfe.versionCompare(acf.get('wp_version'), '>=', '5.5')) {
1834+
$el.removeClass('dashicons-remove').addClass('dashicons-info-outline');
1835+
}
1836+
1837+
}
1838+
18241839
});
18251840

1841+
new acf.Model({
1842+
actions: {
1843+
'hide_field': 'onHideField',
1844+
},
1845+
onHideField: function(field) {
1846+
if (tooltip.tooltips[field.cid]) {
1847+
tooltip.close(field, field.$el.find('.acfe-field-tooltip:first'));
1848+
}
1849+
}
1850+
})
1851+
18261852
})(jQuery);
18271853
(function($) {
18281854

assets/js/acfe.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/acfe-helper-functions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ function acfe_get_value_from_acf_values_by_key($acf, $field_key){
569569

570570
});
571571

572+
if($is_seamless && empty($value)){
573+
$value = null;
574+
}
575+
572576
// return
573577
return $value;
574578

includes/fields/field-clone.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ function initialize(){
3434
*/
3535
function ajax_query(){
3636

37+
$nonce = acf_request_arg('nonce', '');
38+
3739
// validate
38-
if(!acf_verify_ajax()){
40+
if(!acf_verify_ajax($nonce, 'acf/fields/clone/query')){
3941
die();
4042
}
4143

includes/fields/field-flexible-content-actions.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ function render_field_settings($field){
6969
*/
7070

7171
$choices = array(
72-
'title' => 'Inline Title Edit',
73-
'toggle' => 'Toggle Layout',
74-
'copy' => 'Copy/paste Layout',
75-
'lock' => 'Lock Layouts',
76-
'close' => 'Close Button',
72+
'title' => __('Inline Title Edit', 'acfe'),
73+
'toggle' => __('Toggle Layout', 'acfe'),
74+
'copy' => __('Copy/paste Layout', 'acfe'),
75+
'lock' => __('Lock Layouts', 'acfe'),
76+
'close' => __('Close Button', 'acfe'),
7777
);
7878

7979
if(acf_version_compare(acf_get_setting('version'), '<', '5.9')){
80-
$choices['clone'] = 'Clone';
80+
$choices['clone'] = __('Clone', 'acfe');
8181
}
8282

8383
acf_render_field_setting($field, array(
@@ -428,7 +428,7 @@ function layout_icons($icons, $layout, $field){
428428
if(in_array('toggle', $actions)){
429429

430430
$icons = array_merge(array(
431-
'toggle' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-hidden" href="#" title="Toggle layout" data-acfe-flexible-control-toggle="' . $layout['name'] . '"></a>'
431+
'toggle' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-hidden" href="#" title="'. __('Toggle layout', 'acfe') . '" data-acfe-flexible-control-toggle="' . $layout['name'] . '"></a>'
432432
), $icons);
433433

434434
}
@@ -437,7 +437,7 @@ function layout_icons($icons, $layout, $field){
437437
if(in_array('copy', $actions)){
438438

439439
$icons = array_merge(array(
440-
'copy' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-category" href="#" title="Copy layout" data-acfe-flexible-control-copy="' . $layout['name'] . '"></a>'
440+
'copy' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-category" href="#" title="'. __('Copy layout', 'acfe') .'" data-acfe-flexible-control-copy="' . $layout['name'] . '"></a>'
441441
), $icons);
442442

443443
}
@@ -446,7 +446,7 @@ function layout_icons($icons, $layout, $field){
446446
if(in_array('clone', $actions) && acf_version_compare(acf_get_setting('version'), '<', '5.9')){
447447

448448
$icons = array_merge($icons, array(
449-
'clone' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-admin-page" href="#" title="Clone layout" data-acfe-flexible-control-clone="' . $layout['name'] . '"></a>'
449+
'clone' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-admin-page" href="#" title="'. __('Clone layout', 'acfe'). '" data-acfe-flexible-control-clone="' . $layout['name'] . '"></a>'
450450
));
451451

452452
}

includes/fields/field-forms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function load_value($value, $post_id, $field){
518518
}
519519

520520
// check array
521-
if(!$is_array){
521+
if(!$is_array || $field['field_type'] === 'radio'){
522522
$value = acfe_unarray($value);
523523
}
524524

includes/fields/field-taxonomy-terms.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,17 @@ function get_ajax_query_allowed_terms($options = array()){
228228
*/
229229
function ajax_query(){
230230

231+
$nonce = acf_request_arg('nonce', '');
232+
$key = acf_request_arg('field_key', '');
233+
234+
// Back-compat for field settings.
235+
if(!acf_is_field_key($key)){
236+
$nonce = '';
237+
$key = '';
238+
}
239+
231240
// validate
232-
if(!acf_verify_ajax()){
241+
if(!acf_verify_ajax($nonce, $key)){
233242
die();
234243
}
235244

includes/modules/autosync-json.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ function __construct(){
4747
* @return bool
4848
*/
4949
function override_json($value){
50+
51+
// not very elegant, but it allows
52+
// acf_update_setting('json', false) to work mid-page request
53+
if($value === false){
54+
return false;
55+
}
56+
5057
return (bool) acf_get_setting('acfe/json', $value);
5158
}
5259

includes/modules/form/module-form-action-post.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ function load_action($form, $action){
8484
$post_thumbnail = acf_extract_var($load, 'post_thumbnail');
8585
$post_terms = acf_extract_var($load, 'post_terms');
8686
$acf_fields = acf_extract_var($load, 'acf_fields');
87+
$acf_fields = acf_get_array($acf_fields);
8788
$acf_fields_exclude = array();
8889

8990
// filters

includes/modules/form/module-form-action-term.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function load_action($form, $action){
6969
$load = $action['load'];
7070
$term_id = acf_extract_var($load, 'source');
7171
$acf_fields = acf_extract_var($load, 'acf_fields');
72+
$acf_fields = acf_get_array($acf_fields);
7273
$acf_fields_exclude = array();
7374

7475
// filters

0 commit comments

Comments
 (0)