Skip to content

Commit

Permalink
Merge branch 'release/5.8.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Aug 12, 2019
2 parents 565fb55 + 8e4021b commit ce74fdd
Show file tree
Hide file tree
Showing 36 changed files with 5,086 additions and 2,506 deletions.
24 changes: 12 additions & 12 deletions acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.8.1
Version: 5.8.3
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.1';
var $version = '5.8.3';

/** @var array The plugin settings array */
var $settings = array();
Expand Down Expand Up @@ -118,30 +118,28 @@ function initialize() {
$this->define( 'ACF_VERSION', $version );
$this->define( 'ACF_PATH', $path );

// Include utility functions.
include_once( ACF_PATH . 'includes/acf-utility-functions.php');

// api
include_once( ACF_PATH . 'includes/api/api-helpers.php');
acf_include('includes/api/api-input.php');
// Include previous API functions.
acf_include('includes/api/api-helpers.php');
acf_include('includes/api/api-template.php');
acf_include('includes/api/api-term.php');

// Include models.
// Include classes.
acf_include('includes/class-acf-data.php');

// Include core functions.
acf_include('includes/acf-data-functions.php');
// Include functions.
acf_include('includes/acf-helper-functions.php');
acf_include('includes/acf-hook-functions.php');

// Include functions.
acf_include('includes/acf-deprecated-functions.php');
acf_include('includes/acf-field-functions.php');
acf_include('includes/acf-field-group-functions.php');
acf_include('includes/acf-form-functions.php');
acf_include('includes/acf-meta-functions.php');
acf_include('includes/acf-post-functions.php');
acf_include('includes/acf-user-functions.php');
acf_include('includes/acf-value-functions.php');
acf_include('includes/acf-input-functions.php');

// fields
acf_include('includes/fields.php');
Expand Down Expand Up @@ -203,7 +201,9 @@ function initialize() {
acf_include('pro/acf-pro.php');

// Include tests.
//acf_include('tests/tests.php');
if( defined('ACF_DEV') && ACF_DEV ) {
acf_include('tests/tests.php');
}

// actions
add_action('init', array($this, 'init'), 5);
Expand Down
2 changes: 1 addition & 1 deletion assets/css/acf-global.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/acf-input.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions assets/js/acf-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -7170,15 +7170,15 @@
return this.$('input[type="number"]');
},

setValue: function( val ){

setValue: function( val ){
this.busy = true;

// update range input (with change)
// Update range input (with change).
acf.val( this.$input(), val );

// update alt input (without change)
acf.val( this.$inputAlt(), val, true );
// Update alt input (without change).
// Read in input value to inherit min/max validation.
acf.val( this.$inputAlt(), this.$input().val(), true );

this.busy = false;
},
Expand Down Expand Up @@ -10770,7 +10770,7 @@
// convert any string values (tags) into array format
for( var tax in terms ) {
if( !acf.isArray(terms[tax]) ) {
terms[tax] = terms[tax].split(', ');
terms[tax] = terms[tax].split(/,[\s]?/);
}
}

Expand Down
8 changes: 4 additions & 4 deletions assets/js/acf-input.min.js

Large diffs are not rendered by default.

116 changes: 0 additions & 116 deletions includes/acf-deprecated-functions.php

This file was deleted.

1 change: 0 additions & 1 deletion includes/acf-field-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ function acf_get_fields( $parent ) {
* @param array $fields The array of fields.
*/
$fields = apply_filters( 'acf/load_fields', $fields, $parent );
$fields = apply_filters( 'acf/get_fields', $fields, $parent );

// Return fields
return $fields;
Expand Down
3 changes: 0 additions & 3 deletions includes/acf-field-group-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function acf_get_field_group( $id = 0 ) {
*
* @param array The field_group array.
*/
$field_group = apply_filters( 'acf/get_field_group', $field_group );
$field_group = apply_filters( 'acf/load_field_group', $field_group );

// Store field group using aliasses to also find via key, ID and name.
Expand Down Expand Up @@ -319,7 +318,6 @@ function acf_get_field_groups( $filter = array() ) {
}
}


/**
* Filters the $field_groups array.
*
Expand All @@ -329,7 +327,6 @@ function acf_get_field_groups( $filter = array() ) {
* @param array $field_groups The array of field_groups.
*/
$field_groups = apply_filters( 'acf/load_field_groups', $field_groups );
$field_groups = apply_filters( 'acf/get_field_groups', $field_groups );

// Filter results.
if( $filter ) {
Expand Down
81 changes: 79 additions & 2 deletions includes/acf-helper-functions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
<?php

/*
* acf_is_empty
*
* Returns true if the value provided is considered "empty". Allows numbers such as 0.
*
* @date 6/7/16
* @since 5.4.0
*
* @param mixed $var The value to check.
* @return bool
*/
function acf_is_empty( $var ) {
return ( !$var && !is_numeric($var) );
}

/**
* acf_not_empty
*
* Returns true if the value provided is considered "not empty". Allows numbers such as 0.
*
* @date 15/7/19
* @since 5.8.1
*
* @param mixed $var The value to check.
* @return bool
*/
function acf_not_empty( $var ) {
return ( $var || is_numeric($var) );
}

/**
* acf_uniqid
*
Expand Down Expand Up @@ -47,7 +77,7 @@ function acf_merge_attributes( $array1, $array2 ) {
}
}

// Return
// Return.
return $array3;
}

Expand Down Expand Up @@ -285,4 +315,51 @@ function acf_maybe_idval( $value ) {
*/
function acf_numval( $value ) {
return ( intval($value) == floatval($value) ) ? intval($value) : floatval($value);
}
}

/**
* acf_idify
*
* Returns an id attribute friendly string.
*
* @date 24/12/17
* @since 5.6.5
*
* @param string $str The string to convert.
* @return string
*/
function acf_idify( $str = '' ) {
return str_replace(array('][', '[', ']'), array('-', '-', ''), strtolower($str));
}

/**
* acf_slugify
*
* Returns a slug friendly string.
*
* @date 24/12/17
* @since 5.6.5
*
* @param string $str The string to convert.
* @return string
*/
function acf_slugify( $str = '' ) {
return str_replace(array('_', '/', ' '), '-', strtolower($str));
}

/**
* acf_punctify
*
* Returns a string with correct full stop puctuation.
*
* @date 12/7/19
* @since 5.8.2
*
* @param string $str The string to format.
* @return string
*/
function acf_punctify( $str = '' ) {
return trim($str, '.') . '.';
}


2 changes: 1 addition & 1 deletion includes/acf-hook-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function _acf_apply_deprecated_hook() {
if( has_filter($deprecated) ) {

// Log warning.
_deprecated_hook( $deprecated, $version, $hook );
//_deprecated_hook( $deprecated, $version, $hook );

// Apply filters.
if( $type === 'filter' ) {
Expand Down
Loading

0 comments on commit ce74fdd

Please sign in to comment.