Skip to content

Commit ef5555c

Browse files
committed
ACF 5.8.6
1 parent 92e3b3f commit ef5555c

16 files changed

+3338
-901
lines changed

acf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Advanced Custom Fields
44
Plugin URI: https://www.advancedcustomfields.com
55
Description: Customize WordPress with powerful, professional and intuitive fields.
6-
Version: 5.8.5
6+
Version: 5.8.6
77
Author: Elliot Condon
88
Author URI: https://www.advancedcustomfields.com
99
Text Domain: acf
@@ -17,7 +17,7 @@
1717
class ACF {
1818

1919
/** @var string The plugin version number. */
20-
var $version = '5.8.5';
20+
var $version = '5.8.6';
2121

2222
/** @var array The plugin settings array. */
2323
var $settings = array();

assets/build/css/_fields.scss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,74 +1295,74 @@ ul.acf-checkbox-list {
12951295
cursor: text;
12961296
}
12971297

1298-
.acf-actions {
1299-
1300-
}
1301-
13021298
.acf-loading {
13031299
position: absolute;
13041300
top: 10px;
13051301
right: 11px;
13061302
display: none;
13071303
}
13081304

1309-
&:hover {
1310-
.acf-actions { display: block; }
1305+
// Avoid icons disapearing when click/blur events conflict.
1306+
.acf-icon:active {
1307+
display: inline-block !important;
13111308
}
13121309
}
13131310

13141311
.canvas {
13151312
height: 400px;
13161313
}
13171314

1315+
// Show actions on hover.
1316+
&:hover .title .acf-actions {
1317+
display: block;
1318+
}
13181319

1319-
/* default is focused */
1320+
// Default state (show locate, hide search and cancel).
13201321
.title {
13211322
.acf-icon.-location {
13221323
display: inline-block;
13231324
}
1324-
.acf-icon.-cancel {
1325-
display: none;
1326-
}
1325+
.acf-icon.-cancel,
13271326
.acf-icon.-search {
13281327
display: none;
13291328
}
13301329
}
13311330

1332-
1333-
/* -search */
1334-
&.-search .title {
1331+
// Has value (hide locate, show cancel).
1332+
&.-value .title {
1333+
.search {
1334+
font-weight: bold;
1335+
}
13351336
.acf-icon.-location {
13361337
display: none;
13371338
}
13381339
.acf-icon.-cancel {
13391340
display: inline-block;
13401341
}
1341-
.acf-icon.-search {
1342-
display: inline-block;
1343-
}
13441342
}
13451343

1346-
1347-
1348-
/* -value */
1349-
&.-value .title {
1350-
.search {
1351-
font-weight: bold;
1352-
}
1344+
// Is searching (hide locate, show search and cancel).
1345+
&.-searching .title {
13531346
.acf-icon.-location {
13541347
display: none;
13551348
}
1356-
.acf-icon.-cancel {
1349+
.acf-icon.-cancel,
1350+
.acf-icon.-search {
13571351
display: inline-block;
13581352
}
1359-
.acf-icon.-search {
1360-
display: none;
1353+
1354+
// Show actions.
1355+
.acf-actions {
1356+
display: block;
1357+
}
1358+
1359+
// Change search font-weght.
1360+
.search {
1361+
font-weight: normal !important;
13611362
}
13621363
}
13631364

1364-
1365-
/* -loading */
1365+
// Loading.
13661366
&.-loading .title {
13671367
a {
13681368
display: none !important;

assets/build/js/_acf-field-checkbox.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,19 @@
3737

3838
onChange: function( e, $el ){
3939

40-
// vars
40+
// Vars.
4141
var checked = $el.prop('checked');
42+
var $label = $el.parent('label');
4243
var $toggle = this.$toggle();
4344

44-
// selected
45+
// Add or remove "selected" class.
4546
if( checked ) {
46-
$el.parent().addClass('selected');
47+
$label.addClass('selected');
4748
} else {
48-
$el.parent().removeClass('selected');
49+
$label.removeClass('selected');
4950
}
5051

51-
// determine if all inputs are checked
52+
// Update toggle state if all inputs are checked.
5253
if( $toggle.length ) {
5354
var $inputs = this.$inputs();
5455

@@ -67,9 +68,21 @@
6768
},
6869

6970
onClickToggle: function( e, $el ){
71+
72+
// Vars.
7073
var checked = $el.prop('checked');
71-
var $inputs = this.$inputs();
74+
var $inputs = this.$('input[type="checkbox"]');
75+
var $labels = this.$('label');
76+
77+
// Update "checked" state.
7278
$inputs.prop('checked', checked);
79+
80+
// Add or remove "selected" class.
81+
if( checked ) {
82+
$labels.addClass('selected');
83+
} else {
84+
$labels.removeClass('selected');
85+
}
7386
},
7487

7588
onClickCustom: function( e, $el ){

0 commit comments

Comments
 (0)