Skip to content

Commit

Permalink
ACF 5.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcondon committed Aug 17, 2020
1 parent e0cf4dd commit 858d8c9
Show file tree
Hide file tree
Showing 110 changed files with 14,492 additions and 13,640 deletions.
50 changes: 44 additions & 6 deletions acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.8.14
Version: 5.9.0
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Expand All @@ -17,7 +17,7 @@
class ACF {

/** @var string The plugin version number. */
var $version = '5.8.14';
var $version = '5.9.0';

/** @var array The plugin settings array. */
var $settings = array();
Expand Down Expand Up @@ -108,7 +108,8 @@ function initialize() {
// Include classes.
acf_include('includes/class-acf-data.php');
acf_include('includes/fields/class-acf-field.php');
acf_include('includes/locations/class-acf-location.php');
acf_include('includes/locations/abstract-acf-legacy-location.php');
acf_include('includes/locations/abstract-acf-location.php');

// Include functions.
acf_include('includes/acf-helper-functions.php');
Expand All @@ -121,17 +122,18 @@ function initialize() {
acf_include('includes/acf-user-functions.php');
acf_include('includes/acf-value-functions.php');
acf_include('includes/acf-input-functions.php');
acf_include('includes/acf-wp-functions.php');

// Include core.
acf_include('includes/fields.php');
acf_include('includes/locations.php');
acf_include('includes/assets.php');
acf_include('includes/compatibility.php');
acf_include('includes/deprecated.php');
acf_include('includes/json.php');
acf_include('includes/l10n.php');
acf_include('includes/local-fields.php');
acf_include('includes/local-meta.php');
acf_include('includes/local-json.php');
acf_include('includes/loop.php');
acf_include('includes/media.php');
acf_include('includes/revisions.php');
Expand All @@ -146,6 +148,7 @@ function initialize() {
acf_include('includes/ajax/class-acf-ajax-upgrade.php');
acf_include('includes/ajax/class-acf-ajax-query.php');
acf_include('includes/ajax/class-acf-ajax-query-users.php');
acf_include('includes/ajax/class-acf-ajax-local-json-diff.php');

// Include forms.
acf_include('includes/forms/form-attachment.php');
Expand All @@ -169,6 +172,9 @@ function initialize() {
acf_include('includes/admin/admin-upgrade.php');
}

// Include legacy.
acf_include('includes/legacy/legacy-locations.php');

// Include PRO.
acf_include('pro/acf-pro.php');

Expand Down Expand Up @@ -415,12 +421,12 @@ function register_post_status() {

// Register the Disabled post status.
register_post_status('acf-disabled', array(
'label' => __( 'Inactive', 'acf' ),
'label' => _x( 'Disabled', 'post status', 'acf' ),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', 'acf' ),
'label_count' => _n_noop( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', 'acf' ),
));
}

Expand Down Expand Up @@ -586,6 +592,38 @@ function new_instance( $class ) {
$this->instances[ $name ] = $instance;
return $instance;
}

/**
* Magic __isset method for backwards compatibility.
*
* @date 24/4/20
* @since 5.9.0
*
* @param string $key Key name.
* @return bool
*/
public function __isset( $key ) {
return in_array( $key, array( 'locations', 'json' ) );
}

/**
* Magic __get method for backwards compatibility.
*
* @date 24/4/20
* @since 5.9.0
*
* @param string $key Key name.
* @return mixed
*/
public function __get( $key ) {
switch ( $key ) {
case 'locations':
return acf_get_instance( 'ACF_Legacy_Locations' );
case 'json':
return acf_get_instance( 'ACF_Local_JSON' );
}
return null;
}
}

/*
Expand Down
6 changes: 2 additions & 4 deletions assets/build/css/_field-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@
border: 0 none;
box-shadow: none;


// Hide metabox header.
// Hide metabox header.
> .postbox-header,
> .handlediv,
> .hndle {
display: none;
}


/* links */
a {
text-decoration: none;
Expand Down Expand Up @@ -180,7 +178,7 @@
float: left;

height: 28px;
line-height: 28px;
line-height: 26px;
width: 28px;
font-size: 13px;
color: #444;
Expand Down
132 changes: 98 additions & 34 deletions assets/build/css/_fields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,27 @@
margin: 0 0 15px;
background: #edf2ff;
color: #2183b9;
border: none;

.acf-notice-dismiss {
background: transparent;
color: inherit;

&:hover {
background: #fff;
}
}

// dismiss
&.-dismiss {
padding-right: 40px;
}

border-color: #2183b9;

// error
&.-error {
background: #ffe6e6;
color: #d12626;
border-color: #d12626;
}

// success
&.-success {
background: #eefbe8;
color: #32a23b;
border-color: #32a23b;
}

// warning
&.-warning {
background: #fff3e6;
color: #d16226;
border-color: #d16226;
}
}

Expand Down Expand Up @@ -579,21 +568,17 @@ body.acf-browser-firefox .acf-field select {
.acf-input-wrap {
position: relative;
overflow: hidden;
.acf-is-prepended {
border-radius: 0 3px 3px 0 !important;
}
acf-is-appended {
border-radius: 3px 0 0 3px !important;
}
.acf-is-prepended.acf-is-appended {
border-radius: 0 !important;
}
}

input.acf-is-prepended {
border-radius: 0 3px 3px 0 !important;
}

input.acf-is-appended {
border-radius: 3px 0 0 3px !important;
}

input.acf-is-prepended.acf-is-appended {
border-radius: 0 !important;
}


/* rtl */
html[dir="rtl"] .acf-input-prepend {
border-left-width: 0;
Expand Down Expand Up @@ -653,14 +638,14 @@ html[dir="rtl"] input.acf-is-prepended.acf-is-appended {

i {
position: absolute;
top: 4px;
left: 4px;
top: 5px;
left: 5px;
opacity: 0.5;
color: #A9A9A9;
color: #7e8993;
}

input[type="url"] {
padding-left: 25px !important;
padding-left: 27px !important;
}

&.-valid i {
Expand Down Expand Up @@ -2289,6 +2274,7 @@ html[dir="rtl"] .pac-container .pac-item {

img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
display: block;
Expand Down Expand Up @@ -2807,4 +2793,82 @@ html[dir="rtl"] .acf-accordion {
.compat-attachment-fields > tbody > tr > td {
padding-bottom: 5px;
}
}
}


/*---------------------------------------------------------------------------------------------
*
* Block Editor
*
*---------------------------------------------------------------------------------------------*/
.block-editor {

// Sidebar
.edit-post-sidebar {

// Remove metabox hndle border to simulate component panel.
.acf-postbox {
> .postbox-header,
> .hndle {
border-bottom-width: 0 !important;
}
&.closed {
>.postbox-header,
> .hndle {
border-bottom-width: 1px !important;
}
}
}

// Field wrap.
.acf-fields {
min-height: 1px;
overflow: auto; // Fixes margin-collapse issue in WP 5.3.

> .acf-field {
border-width: 0;
border-color: #e2e4e7;
margin: 16px;
padding: 0;

// Force full width.
width: auto !important;
min-height: 0 !important;
float: none !important;

// Field labels.
> .acf-label {
margin-bottom: 5px;
label {
font-weight: normal;
}
}

// Accordions.
&.acf-accordion {
padding: 0;
margin: 0;
border-top-width: 1px;

&:first-child {
border-top-width: 0;
}

.acf-accordion-title {
margin: 0;
padding: 15px;
label {
font-weight: bold;
}
}

.acf-accordion-content {
> .acf-fields {
border-top-width: 0;
}
}
}
}
}
}
}
Loading

0 comments on commit 858d8c9

Please sign in to comment.