Merge branch 'release/5.6.3' into develop

This commit is contained in:
Remco Tolsma 2017-10-18 15:51:42 +02:00
commit 1a73a1b6c0
39 changed files with 4267 additions and 3511 deletions

24
acf.php
View File

@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com/
Description: Customise WordPress with powerful, professional and intuitive fields.
Version: 5.6.2
Version: 5.6.3
Author: Elliot Condon
Author URI: http://www.elliotcondon.com/
Copyright: Elliot Condon
@ -17,8 +17,12 @@ if( ! class_exists('acf') ) :
class acf {
// vars
var $version = '5.6.2';
/** @var string The plugin version number */
var $version = '5.6.3';
/** @var array The plugin settings array */
var $settings = array();
/*
@ -234,29 +238,35 @@ class acf {
acf_include('includes/fields/class-acf-field-text.php');
acf_include('includes/fields/class-acf-field-textarea.php');
acf_include('includes/fields/class-acf-field-number.php');
acf_include('includes/fields/class-acf-field-range.php');
acf_include('includes/fields/class-acf-field-email.php');
acf_include('includes/fields/class-acf-field-url.php');
acf_include('includes/fields/class-acf-field-password.php');
acf_include('includes/fields/class-acf-field-image.php');
acf_include('includes/fields/class-acf-field-file.php');
acf_include('includes/fields/class-acf-field-wysiwyg.php');
acf_include('includes/fields/class-acf-field-oembed.php');
acf_include('includes/fields/class-acf-field-image.php');
acf_include('includes/fields/class-acf-field-link.php');
acf_include('includes/fields/class-acf-field-file.php');
acf_include('includes/fields/class-acf-field-select.php');
acf_include('includes/fields/class-acf-field-checkbox.php');
acf_include('includes/fields/class-acf-field-radio.php');
acf_include('includes/fields/class-acf-field-range.php');
acf_include('includes/fields/class-acf-field-button-group.php');
acf_include('includes/fields/class-acf-field-true_false.php');
acf_include('includes/fields/class-acf-field-link.php');
acf_include('includes/fields/class-acf-field-post_object.php');
acf_include('includes/fields/class-acf-field-page_link.php');
acf_include('includes/fields/class-acf-field-relationship.php');
acf_include('includes/fields/class-acf-field-taxonomy.php');
acf_include('includes/fields/class-acf-field-user.php');
acf_include('includes/fields/class-acf-field-google-map.php');
acf_include('includes/fields/class-acf-field-date_picker.php');
acf_include('includes/fields/class-acf-field-date_time_picker.php');
acf_include('includes/fields/class-acf-field-time_picker.php');
acf_include('includes/fields/class-acf-field-color_picker.php');
acf_include('includes/fields/class-acf-field-message.php');
//acf_include('includes/fields/class-acf-field-separator.php');
acf_include('includes/fields/class-acf-field-tab.php');

View File

@ -466,6 +466,15 @@ html[dir="rtl"] input.acf-is-prepended.acf-is-appended {
}
/*---------------------------------------------------------------------------------------------
*
* Color Picker
*
*---------------------------------------------------------------------------------------------*/
.acf-color-picker .wp-picker-active {
position: relative;
z-index: 1;
}
/*---------------------------------------------------------------------------------------------
*
* Url
*
*---------------------------------------------------------------------------------------------*/
@ -728,6 +737,10 @@ ul.acf-radio-list li span,
ul.acf-checkbox-list li span {
float: none;
}
ul.acf-radio-list li i,
ul.acf-checkbox-list li i {
vertical-align: middle;
}
ul.acf-radio-list.acf-hl li,
ul.acf-checkbox-list.acf-hl li {
margin-right: 20px;
@ -742,6 +755,76 @@ html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
}
/*---------------------------------------------------------------------------------------------
*
* Button Group
*
*---------------------------------------------------------------------------------------------*/
.acf-button-group {
display: inline-block;
/* default (horizontal) */
padding-left: 1px;
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
/* vertical */
}
.acf-button-group label {
display: inline-block;
border: #ccc solid 1px;
position: relative;
z-index: 1;
padding: 5px 10px;
background: #fff;
}
.acf-button-group label:hover {
border-color: #999999;
z-index: 2;
}
.acf-button-group label.selected {
border-color: #2b9af3;
background: #309cf3;
color: #fff;
z-index: 2;
}
.acf-button-group label.selected:hover {
background: #48a8f4;
}
.acf-button-group input {
display: none;
}
.acf-button-group label {
margin: 0 0 0 -1px;
flex: 1;
text-align: center;
white-space: nowrap;
}
.acf-button-group label:first-child {
border-radius: 3px 0 0 3px;
}
.acf-button-group label:last-child {
border-radius: 0 3px 3px 0;
}
.acf-button-group label:only-child {
border-radius: 3px;
}
.acf-button-group.-vertical {
padding-left: 0;
padding-top: 1px;
flex-direction: column;
}
.acf-button-group.-vertical label {
margin: -1px 0 0 0;
}
.acf-button-group.-vertical label:first-child {
border-radius: 3px 3px 0 0;
}
.acf-button-group.-vertical label:last-child {
border-radius: 0 0 3px 3px;
}
.acf-button-group.-vertical label:only-child {
border-radius: 3px;
}
/*---------------------------------------------------------------------------------------------
*
* Checkbox
*
*---------------------------------------------------------------------------------------------*/
@ -758,10 +841,10 @@ html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
border-radius: 5px;
cursor: pointer;
position: relative;
background: #f1f1f1;
background: #f8f8f8;
height: 30px;
vertical-align: middle;
box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.1);
border: #ccc solid 1px;
-webkit-transition: background 0.25s ease;
-moz-transition: background 0.25s ease;
-o-transition: background 0.25s ease;
@ -789,9 +872,9 @@ html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
}
.acf-switch .acf-switch-slider {
position: absolute;
top: 3px;
left: 3px;
bottom: 3px;
top: 2px;
left: 2px;
bottom: 2px;
right: 50%;
z-index: 1;
background: #fff;
@ -801,17 +884,23 @@ html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
-moz-transition: all 0.25s ease;
-o-transition: all 0.25s ease;
transition: all 0.25s ease;
transition-property: left, right;
}
.acf-switch:hover {
background: #eeeeee;
.acf-switch:hover .acf-switch-slider {
border-color: #b3b3b3;
}
.acf-switch.-on {
background: #2a9bd9;
background: #309cf3;
border-color: #2b9af3;
/* hover */
}
.acf-switch.-on .acf-switch-slider {
left: 50%;
right: 3px;
border-color: #1f7db1;
right: 2px;
border-color: #0d84e3;
}
.acf-switch.-on:hover {
background: #48a8f4;
}
.acf-switch.-focus .acf-switch-slider {
border-color: #5b9dd9;
@ -830,6 +919,12 @@ html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
position: absolute;
margin: 0;
}
/* in media modal */
.compat-item .acf-true-false .message {
float: none;
padding: 0;
vertical-align: middle;
}
/*--------------------------------------------------------------------------
*
* Google Map
@ -1789,7 +1884,7 @@ html[dir="rtl"] .acf-file-uploader .file-info {
}
.acf-range-wrap input[type="number"] {
display: inline-block;
width: 50px;
min-width: 3em;
margin-left: 10px;
vertical-align: middle;
}

View File

@ -1652,17 +1652,17 @@
// vars
var key = $field.attr('data-key'),
$ancestors = $field.parents('.acf-field-list'),
$tr = $field.find('.acf-field[data-name="conditional_logic"]:last');
var key = $field.attr('data-key');
var $lists = $field.parents('.acf-field-list');
var $tr = $field.find('.acf-field-setting-conditional_logic:last');
// choices
var choices = [];
// loop over ancestors
$.each( $ancestors, function( i ){
// loop over ancestor lists
$.each( $lists, function( i ){
// vars
var group = (i == 0) ? acf._e('sibling_fields') : acf._e('parent_fields');
@ -1679,7 +1679,7 @@
// validate
if( $.inArray(this_type, ['select', 'checkbox', 'true_false', 'radio']) === -1 ) {
if( $.inArray(this_type, ['select', 'checkbox', 'true_false', 'radio', 'button_group']) === -1 ) {
return;
@ -1766,7 +1766,7 @@
});
// select
} else if( field_type == "select" || field_type == "checkbox" || field_type == "radio" ) {
} else if( field_type == "select" || field_type == "checkbox" || field_type == "radio" || field_type == "button_group" ) {
// vars
var lines = $field.find('.acf-field[data-name="choices"] textarea').val().split("\n");
@ -2179,22 +2179,58 @@
$field: null,
$settings: null,
tag: function( tag ) {
// vars
var type = this.type;
// explode, add 'field' and implode
// - open => open_field
// - change_type => change_field_type
var tags = tag.split('_');
tags.splice(1, 0, 'field');
tag = tags.join('_');
// add type
if( type ) {
tag += '/type=' + type;
}
// return
return tag;
},
selector: function(){
// vars
var selector = '.acf-field-object';
var type = this.type;
// add type
if( type ) {
selector += '-' + type;
selector = acf.str_replace('_', '-', selector);
}
// return
return selector;
},
_add_action: function( name, callback ) {
// vars
var model = this;
// name
// - open => open_field/type=x
// - change_type => change_field_type/type=x
var names = name.split('_');
names.splice(1, 0, 'field');
name = names.join('_') + '/type=' + model.type;
// add action
acf.add_action(name, function( $field ){
acf.add_action( this.tag(name), function( $field ){
// focus
model.set('$field', $field);
@ -2213,16 +2249,8 @@
var model = this;
// name
// - open => open_field/type=x
// - change_type => change_field_type/type=x
var names = name.split('_');
names.splice(1, 0, 'field');
name = names.join('_') + '/type=' + model.type;
// add action
acf.add_filter(name, function( $field ){
acf.add_filter( this.tag(name), function( $field ){
// focus
model.set('$field', $field);
@ -2238,10 +2266,10 @@
_add_event: function( name, callback ) {
// vars
var model = this,
event = name.substr(0,name.indexOf(' ')),
selector = name.substr(name.indexOf(' ')+1),
context = acf.field_group.get_selector(model.type);
var model = this;
var event = name.substr(0,name.indexOf(' '));
var selector = name.substr(name.indexOf(' ')+1);
var context = this.selector();
// add event

File diff suppressed because one or more lines are too long

View File

@ -2288,6 +2288,39 @@ var acf;
},
/**
* esc_html
*
* This function will escape HTML characters for safe use
*
* @source https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
* @date 20/9/17
* @since 5.6.3
*
* @param n/a
* @return n/a
*/
esc_html: function( string ){
var entityMap = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
'/': '&#x2F;',
'`': '&#x60;',
'=': '&#x3D;'
};
return String(string).replace(/[&<>"'`=\/]/g, function (s) {
return entityMap[s];
});
},
/*
* render_select
*
@ -2344,7 +2377,7 @@ var acf;
// append select
$optgroup.append( '<option value="' + item.value + '">' + item.label + '</option>' );
$optgroup.append( '<option value="' + item.value + '">' + acf.esc_html(item.label) + '</option>' );
// selectedIndex
@ -4386,6 +4419,65 @@ var acf;
})(jQuery);
(function($){
acf.fields.button_group = acf.field.extend({
type: 'button_group',
$div: null,
events: {
'click input[type="radio"]': 'click'
},
focus: function(){
// focus on $select
this.$div = this.$field.find('.acf-button-group');
// get options
this.o = acf.get_data(this.$div, {
allow_null: 0
});
},
click: function( e ){
// vars
var $radio = e.$el;
var $label = $radio.parent('label');
var selected = $label.hasClass('selected');
// remove previous selected
this.$div.find('.selected').removeClass('selected');
// add active class
$label.addClass('selected');
// allow null
if( this.o.allow_null && selected ) {
// unselect
e.$el.prop('checked', false);
$label.removeClass('selected');
// trigger change
e.$el.trigger('change');
}
}
});
})(jQuery);
(function($){
acf.fields.checkbox = acf.field.extend({
@ -5023,7 +5115,7 @@ var acf;
// input with :checked
if( type == 'true_false' || type == 'checkbox' || type == 'radio' ) {
if( type == 'true_false' || type == 'checkbox' || type == 'radio' || type == 'button_group' ) {
match = this.calculate_checkbox( rule, $trigger );
@ -11826,7 +11918,11 @@ var acf;
// get options
this.o = acf.get_data( this.$el );
this.o = acf.get_data(this.$el, {
save: '',
type: '',
taxonomy: ''
});
// extra
@ -12331,7 +12427,7 @@ var acf;
ready: function( $el ){
// reference
$el.find('.acf-field input').filter('[type="number"], [type="email"], [type="url"]').on('invalid', function( e ){
$el.find('.acf-field input').on('invalid', function( e ){
// prvent defual
// fixes chrome bug where 'hidden-by-tab' field throws focus error
@ -13767,6 +13863,7 @@ var acf;
// @codekit-prepend "../js/event-manager.js";
// @codekit-prepend "../js/acf.js";
// @codekit-prepend "../js/acf-ajax.js";
// @codekit-prepend "../js/acf-button-group.js";
// @codekit-prepend "../js/acf-checkbox.js";
// @codekit-prepend "../js/acf-color-picker.js";
// @codekit-prepend "../js/acf-conditional-logic.js";

File diff suppressed because one or more lines are too long

View File

@ -604,7 +604,7 @@ class acf_admin_field_groups {
<div class="acf-box">
<div class="inner">
<h2><?php echo acf_get_setting('name'); ?></h2>
<p><?php _e('Customise WordPress with powerful, professional and intuitive fields.'); ?></p>
<p><?php _e('Customise WordPress with powerful, professional and intuitive fields.','acf'); ?></p>
<h3><?php _e("Changelog",'acf'); ?></h3>
<p><?php

View File

@ -68,7 +68,6 @@ $atts['class'] = str_replace('_', '-', $atts['class']);
'instructions' => __('This is the name which will appear on the EDIT page','acf'),
'name' => 'label',
'type' => 'text',
'required' => 1,
'class' => 'field-label'
), true);
@ -79,7 +78,6 @@ $atts['class'] = str_replace('_', '-', $atts['class']);
'instructions' => __('Single word, no spaces. Underscores and dashes allowed','acf'),
'name' => 'name',
'type' => 'text',
'required' => 1,
'class' => 'field-name'
), true);
@ -88,7 +86,6 @@ $atts['class'] = str_replace('_', '-', $atts['class']);
acf_render_field_setting($field, array(
'label' => __('Field Type','acf'),
'instructions' => '',
'required' => 1,
'type' => 'select',
'name' => 'type',
'choices' => acf_get_field_types(),

View File

@ -284,7 +284,10 @@ function acf_get_field_label( $field ) {
$label = $field['label'];
if( $field['required'] ) $label .= ' <span class="acf-required">*</span>';
// required
if( $field['required'] ) {
$label .= ' <span class="acf-required">*</span>';
}
// filter for 3rd party customization
@ -413,23 +416,21 @@ function acf_render_field_wrap( $field, $el = 'div', $instruction = 'label' ) {
if( !$field ) return;
// el
$elements = apply_filters('acf/render_field_wrap/elements', array(
// elements
$elements = array(
'div' => 'div',
'tr' => 'td',
'ul' => 'li',
'ol' => 'li',
'dl' => 'dt',
'td' => 'div' // special case for sub field!
));
);
// validate $el
if( !array_key_exists($el, $elements) ) {
$el = 'div';
}
// vars
$el = isset($elements[ $el ]) ? $el : 'div';
$el2 = $elements[ $el ];
$show_label = ($el !== 'td') ? true : false;
// wrapper
@ -446,9 +447,7 @@ function acf_render_field_wrap( $field, $el = 'div', $instruction = 'label' ) {
// add required
if( $field['required'] ) {
$wrapper['data-required'] = 1;
}
@ -493,7 +492,7 @@ function acf_render_field_wrap( $field, $el = 'div', $instruction = 'label' ) {
if( $el == 'tr' || $el == 'td' ) {
$width = 0;
// do nothing
} elseif( $width > 0 && $width < 100 ) {
@ -504,43 +503,87 @@ function acf_render_field_wrap( $field, $el = 'div', $instruction = 'label' ) {
// remove empty attributes
foreach( $wrapper as $k => $v ) {
$wrapper = array_filter($wrapper);
if( $v == '' ) {
unset($wrapper[$k]);
// html
?>
<<?php echo $el; ?> <?php acf_esc_attr_e($wrapper); ?>>
<?php if( $show_label ): ?>
<<?php echo $el2; ?> class="acf-label">
<?php acf_the_field_wrap_label( $field ); ?>
<?php if( $instruction == 'label' ) acf_the_field_wrap_instructions( $field ); ?>
</<?php echo $el2; ?>>
<?php endif; ?>
<<?php echo $el2; ?> class="acf-input">
<?php acf_render_field( $field ); ?>
<?php if( $instruction == 'field' ) acf_the_field_wrap_instructions( $field ); ?>
<?php if( !empty($field['conditional_logic']) ): ?>
<script type="text/javascript">
if( typeof acf !== 'undefined' ) {
acf.conditional_logic.add( '<?php echo esc_js($field['key']); ?>', <?php echo wp_json_encode( $field['conditional_logic'] ); ?> );
}
</script>
<?php endif; ?>
</<?php echo $el2; ?>>
</<?php echo $el; ?>>
<?php
}
}
/**
* acf_render_field_wrap_label
*
* This function will maybe output the field's label
*
* @date 19/9/17
* @since 5.6.3
*
* @param array $field
* @return n/a
*/
function acf_the_field_wrap_label( $field ) {
// vars
$label = acf_get_field_label( $field );
// check
if( $label ) {
echo '<label' . ($field['id'] ? ' for="' . esc_attr($field['id']) . '"' : '' ) . '>' . acf_esc_html($label) . '</label>';
}
}
/**
* acf_render_field_wrap_description
*
* This function will maybe output the field's instructions
*
* @date 19/9/17
* @since 5.6.3
*
* @param array $field
* @return n/a
*/
function acf_the_field_wrap_instructions( $field ) {
// vars
$show_label = ($el !== 'td') ? true : false;
$instructions = $field['instructions'];
?><<?php echo $el; ?> <?php echo acf_esc_attr($wrapper); ?>>
<?php if( $show_label ): ?>
<<?php echo $elements[ $el ]; ?> class="acf-label">
<label for="<?php echo $field['id']; ?>"><?php echo acf_get_field_label($field); ?></label>
<?php if( $instruction == 'label' && $field['instructions'] ): ?>
<p class="description"><?php echo $field['instructions']; ?></p>
<?php endif; ?>
</<?php echo $elements[ $el ]; ?>>
<?php endif; ?>
<<?php echo $elements[ $el ]; ?> class="acf-input">
<?php acf_render_field( $field ); ?>
<?php if( $instruction == 'field' && $field['instructions'] ): ?>
<p class="description"><?php echo $field['instructions']; ?></p>
<?php endif; ?>
</<?php echo $elements[ $el ]; ?>>
<?php if( !empty($field['conditional_logic'])): ?>
<script type="text/javascript">
if(typeof acf !== 'undefined'){ acf.conditional_logic.add( '<?php echo $field['key']; ?>', <?php echo json_encode($field['conditional_logic']); ?>); }
</script>
<?php endif; ?>
</<?php echo $el; ?>>
<?php
// check
if( $instructions ) {
echo '<p class="description">' . acf_esc_html($instructions) . '</p>';
}
}
@ -1243,7 +1286,7 @@ function acf_update_field( $field = false, $specific = false ) {
// allow fields to contain the same name
add_filter( 'wp_unique_post_slug', 'acf_update_field_wp_unique_post_slug', 100, 6 );
add_filter( 'wp_unique_post_slug', 'acf_update_field_wp_unique_post_slug', 999, 6 );
// slash data
@ -1691,7 +1734,7 @@ function acf_prepare_fields_for_import( $fields = false ) {
// allow multiple fields to be returned ($field + $sub_fields)
if( acf_is_sequential_array($field) ) {
if( !isset($field['key']) && isset($field[0]) ) {
// merge in $field (1 or more fields)
array_splice($fields, $i, 1, $field);

View File

@ -538,7 +538,7 @@ function acf_nonce_input( $nonce = '' ) {
function acf_extract_var( &$array, $key, $default = null ) {
// check if exists
if( is_array($array) && array_key_exists($key, $array) ) {
if( is_array($array) && isset($array[ $key ]) ) {
// store value
$v = $array[ $key ];

View File

@ -30,6 +30,75 @@ function acf_esc_html( $string = '' ) {
}
/**
* acf_clean_atts
*
* This function will remove empty attributes
*
* @date 3/10/17
* @since 5.6.3
*
* @param array $atts
* @return array
*/
function acf_clean_atts( $atts = array() ) {
// loop
foreach( $atts as $k => $v ) {
if( $v === '' ) unset( $atts[ $k ] );
}
// return
return $atts;
}
/**
* acf_get_atts
*
* This function will return an array of HTML attributes
*
* @date 2/10/17
* @since 5.6.3
*
* @param n/a
* @return n/a
*/
/*
function acf_get_atts( $array, $keys ) {
// vars
$atts = array();
// append attributes
foreach( $keys as $k ) {
if( isset($array[ $k ]) ) $atts[ $k ] = $array[ $k ];
}
// modify special attributes
foreach( array('readonly', 'disabled', 'required') as $k ) {
$atts[ $k ] = $atts[ $k ] ? $k : '';
}
// clean up blank attributes
foreach( $atts as $k => $v ) {
if( $v === '' ) unset( $atts[ $k ] );
}
// return
return $atts;
}
*/
/*
* acf_esc_atts
*
@ -241,8 +310,9 @@ function acf_textarea_input( $atts = array() ) {
function acf_get_checkbox_input( $atts = array() ) {
$label = acf_extract_var( $atts, 'label', '' );
$checked = acf_maybe_get( $atts, 'checked', '' );
$atts['type'] = acf_maybe_get( $atts, 'type', 'checkbox' );
return '<label><input ' . acf_esc_attr( $atts ) . '/>' . acf_esc_html( $label ) . '</label>';
return '<label' . ($checked ? ' class="selected"' : '') . '><input ' . acf_esc_attr( $atts ) . '/>' . acf_esc_html( $label ) . '</label>';
}

View File

@ -313,12 +313,8 @@ function get_field_objects( $post_id = false, $format_value = true, $load_value
// populate vars
foreach( $meta as $k => $v ) {
// Hopefuly improve efficiency: bail early if $k does start with an '_'
if( $k[0] === '_' ) continue;
// does a field key exist for this value?
if( !array_key_exists("_{$k}", $meta) ) continue;
if( !isset($meta["_{$k}"]) ) continue;
// get field

View File

@ -0,0 +1,292 @@
<?php
if( ! class_exists('acf_field_button_group') ) :
class acf_field_button_group extends acf_field {
/**
* initialize()
*
* This function will setup the field type data
*
* @date 18/9/17
* @since 5.6.3
*
* @param n/a
* @return n/a
*/
function initialize() {
// vars
$this->name = 'button_group';
$this->label = __("Button Group",'acf');
$this->category = 'choice';
$this->defaults = array(
'choices' => array(),
'default_value' => '',
'allow_null' => 0,
'return_format' => 'value',
'layout' => 'horizontal',
);
}
/**
* render_field()
*
* Creates the field's input HTML
*
* @date 18/9/17
* @since 5.6.3
*
* @param array $field The field settings array
* @return n/a
*/
function render_field( $field ) {
// vars
$html = '';
$selected = null;
$buttons = array();
$value = esc_attr( $field['value'] );
// bail ealrly if no choices
if( empty($field['choices']) ) return;
// buttons
foreach( $field['choices'] as $_value => $_label ) {
// checked
$checked = ( $value === esc_attr($_value) );
if( $checked ) $selected = true;
// append
$buttons[] = array(
'name' => $field['name'],
'value' => $_value,
'label' => $_label,
'checked' => $checked
);
}
// maybe select initial value
if( !$field['allow_null'] && $selected === null ) {
$buttons[0]['checked'] = true;
}
// div
$div = array( 'class' => 'acf-button-group' );
if( $field['layout'] == 'vertical' ) { $div['class'] .= ' -vertical'; }
if( $field['class'] ) { $div['class'] .= ' ' . $field['class']; }
if( $field['allow_null'] ) { $div['data-allow_null'] = 1; }
// hdden input
$html .= acf_get_hidden_input( array('name' => $field['name']) );
// open
$html .= '<div ' . acf_esc_attr($div) . '>';
// loop
foreach( $buttons as $button ) {
// checked
if( $button['checked'] ) {
$button['checked'] = 'checked';
} else {
unset($button['checked']);
}
// append
$html .= acf_get_radio_input( $button );
}
// close
$html .= '</div>';
// return
echo $html;
}
/**
* render_field_settings()
*
* Creates the field's settings HTML
*
* @date 18/9/17
* @since 5.6.3
*
* @param array $field The field settings array
* @return n/a
*/
function render_field_settings( $field ) {
// encode choices (convert from array)
$field['choices'] = acf_encode_choices($field['choices']);
// choices
acf_render_field_setting( $field, array(
'label' => __('Choices','acf'),
'instructions' => __('Enter each choice on a new line.','acf') . '<br /><br />' . __('For more control, you may specify both a value and label like this:','acf'). '<br /><br />' . __('red : Red','acf'),
'type' => 'textarea',
'name' => 'choices',
));
// allow_null
acf_render_field_setting( $field, array(
'label' => __('Allow Null?','acf'),
'instructions' => '',
'name' => 'allow_null',
'type' => 'true_false',
'ui' => 1,
));
// default_value
acf_render_field_setting( $field, array(
'label' => __('Default Value','acf'),
'instructions' => __('Appears when creating a new post','acf'),
'type' => 'text',
'name' => 'default_value',
));
// layout
acf_render_field_setting( $field, array(
'label' => __('Layout','acf'),
'instructions' => '',
'type' => 'radio',
'name' => 'layout',
'layout' => 'horizontal',
'choices' => array(
'horizontal' => __("Horizontal",'acf'),
'vertical' => __("Vertical",'acf'),
)
));
// return_format
acf_render_field_setting( $field, array(
'label' => __('Return Value','acf'),
'instructions' => __('Specify the returned value on front end','acf'),
'type' => 'radio',
'name' => 'return_format',
'layout' => 'horizontal',
'choices' => array(
'value' => __('Value','acf'),
'label' => __('Label','acf'),
'array' => __('Both (Array)','acf')
)
));
}
/*
* update_field()
*
* This filter is appied to the $field before it is saved to the database
*
* @date 18/9/17
* @since 5.6.3
*
* @param array $field The field array holding all the field options
* @return $field
*/
function update_field( $field ) {
return acf_get_field_type('radio')->update_field( $field );
}
/*
* load_value()
*
* This filter is appied to the $value after it is loaded from the db
*
* @date 18/9/17
* @since 5.6.3
*
* @param mixed $value The value found in the database
* @param mixed $post_id The post ID from which the value was loaded from
* @param array $field The field array holding all the field options
* @return $value
*/
function load_value( $value, $post_id, $field ) {
return acf_get_field_type('radio')->load_value( $value, $post_id, $field );
}
/*
* translate_field
*
* This function will translate field settings
*
* @date 18/9/17
* @since 5.6.3
*
* @param array $field The field array holding all the field options
* @return $field
*/
function translate_field( $field ) {
return acf_get_field_type('radio')->translate_field( $field );
}
/*
* format_value()
*
* This filter is appied to the $value after it is loaded from the db and before it is returned to the template
*
* @date 18/9/17
* @since 5.6.3
*
* @param mixed $value The value found in the database
* @param mixed $post_id The post ID from which the value was loaded from
* @param array $field The field array holding all the field options
* @return $value
*/
function format_value( $value, $post_id, $field ) {
return acf_get_field_type('radio')->format_value( $value, $post_id, $field );
}
}
// initialize
acf_register_field_type( 'acf_field_button_group' );
endif; // class_exists check
?>

View File

@ -47,7 +47,7 @@ class acf_field_color_picker extends acf_field {
function input_admin_enqueue_scripts() {
// globals
global $wp_scripts, $wp_styles;
global $wp_scripts;
// register if not already (on front end)
@ -103,7 +103,7 @@ class acf_field_color_picker extends acf_field {
// html
?>
<div class="acf-color_picker">
<div class="acf-color-picker">
<?php acf_hidden_input( $hidden_input ); ?>
<?php acf_text_input( $text_input ); ?>
</div>

View File

@ -50,7 +50,7 @@ class acf_field_email extends acf_field {
// vars
$atts = array();
$keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
$html = '';
@ -72,18 +72,22 @@ class acf_field_email extends acf_field {
}
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// render
$html .= '<div class="acf-input-wrap">' . acf_get_text_input( $atts ) . '</div>';

View File

@ -342,11 +342,11 @@ class acf_field__group extends acf_field {
function render_field_block( $field ) {
// vars
$label_placement = $field['layout'] == 'block' ? 'top' : 'left';
$label_placement = ($field['layout'] == 'block') ? 'top' : 'left';
// html
echo '<div class="acf-fields -'.$label_placement.' -border">';
echo '<div class="acf-fields -' . $label_placement . ' -border">';
foreach( $field['sub_fields'] as $sub_field ) {
@ -407,10 +407,8 @@ class acf_field__group extends acf_field {
?>
<th <?php acf_esc_attr_e( $atts ); ?>>
<?php echo acf_get_field_label( $sub_field ); ?>
<?php if( $sub_field['instructions'] ): ?>
<p class="description"><?php echo $sub_field['instructions']; ?></p>
<?php endif; ?>
<?php acf_the_field_wrap_label( $sub_field ); ?>
<?php acf_the_field_wrap_instructions( $sub_field ); ?>
</th>
<?php endforeach; ?>
</tr>
@ -459,7 +457,6 @@ class acf_field__group extends acf_field {
?><tr class="acf-field acf-field-setting-sub_fields" data-setting="group" data-name="sub_fields">
<td class="acf-label">
<label><?php _e("Sub Fields",'acf'); ?></label>
<p class="description"></p>
</td>
<td class="acf-input">
<?php

View File

@ -76,7 +76,7 @@ class acf_field_message extends acf_field {
// return
echo $m;
echo acf_esc_html( $m );
}

View File

@ -53,7 +53,7 @@ class acf_field_number extends acf_field {
// vars
$atts = array();
$keys = array( 'type', 'id', 'class', 'name', 'value', 'min', 'max', 'step', 'placeholder', 'pattern' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
$html = '';
@ -81,18 +81,22 @@ class acf_field_number extends acf_field {
}
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// render
$html .= '<div class="acf-input-wrap">' . acf_get_text_input( $atts ) . '</div>';

View File

@ -52,7 +52,7 @@ class acf_field_range extends acf_field_number {
// vars
$atts = array();
$keys = array( 'type', 'id', 'class', 'name', 'value', 'min', 'max', 'step' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
$html = '';
@ -71,18 +71,22 @@ class acf_field_range extends acf_field_number {
}
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// open
$html .= '<div class="acf-range-wrap">';
@ -98,10 +102,13 @@ class acf_field_range extends acf_field_number {
// input
$len = strlen( (string) $field['max'] );
$html .= acf_get_text_input(array(
'type' => 'number',
'id' => $atts['id'] . '-alt',
'value' => $atts['value']
'value' => $atts['value'],
'step' => $atts['step'],
'style' => 'width: ' . (1.8 + $len*0.7) . 'em;'
));

View File

@ -576,6 +576,11 @@ class acf_field_taxonomy extends acf_field {
// get taxonomy
$taxonomy = get_taxonomy( $field['taxonomy'] );
// bail early if taxonomy does not exist
if( !$taxonomy ) return;
?>
<div <?php acf_esc_attr_e($div); ?>>
<?php if( $field['add_term'] && current_user_can( $taxonomy->cap->manage_terms) ): ?>
@ -705,7 +710,7 @@ class acf_field_taxonomy extends acf_field {
// vars
$args = array(
'taxonomy' => $field['taxonomy'],
'show_option_none' => __('No', 'acf') . ' ' . $taxonomy_obj->labels->name,
'show_option_none' => sprintf( _x('No %s', 'No terms', 'acf'), strtolower($taxonomy_obj->labels->name) ),
'hide_empty' => false,
'style' => 'none',
'walker' => new acf_taxonomy_field_walker( $field ),
@ -724,7 +729,7 @@ class acf_field_taxonomy extends acf_field {
<?php if( $field['field_type'] == 'radio' && $field['allow_null'] ): ?>
<li>
<label class="selectit">
<input type="radio" name="<?php echo $field['name']; ?>" value="" /> <?php _e("None", 'acf'); ?>
<input type="radio" name="<?php echo esc_attr($field['name']); ?>" value="" /> <?php _e("None", 'acf'); ?>
</label>
</li>
<?php endif; ?>

View File

@ -51,7 +51,7 @@ class acf_field_text extends acf_field {
// vars
$atts = array();
$keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'maxlength', 'pattern' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
$html = '';
@ -73,18 +73,22 @@ class acf_field_text extends acf_field {
}
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// render
$html .= '<div class="acf-input-wrap">' . acf_get_text_input( $atts ) . '</div>';

View File

@ -51,7 +51,7 @@ class acf_field_textarea extends acf_field {
// vars
$atts = array();
$keys = array( 'id', 'class', 'name', 'value', 'placeholder', 'rows', 'maxlength' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
// rows
@ -60,20 +60,24 @@ class acf_field_textarea extends acf_field {
}
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// return
echo acf_get_textarea_input( $atts );
acf_textarea_input( $atts );
}

View File

@ -97,8 +97,8 @@ class acf_field_true_false extends acf_field {
<?php acf_hidden_input($hidden); ?>
<label>
<input <?php echo acf_esc_attr($input); ?>/>
<?php if( $switch ) echo $switch; ?>
<?php if( $field['message'] ): ?><span><?php echo $field['message']; ?></span><?php endif; ?>
<?php if( $switch ) echo acf_esc_html($switch); ?>
<?php if( $field['message'] ): ?><span class="message"><?php echo acf_esc_html($field['message']); ?></span><?php endif; ?>
</label>
</div>
<?php

View File

@ -48,22 +48,26 @@ class acf_field_url extends acf_field {
// vars
$atts = array();
$keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
$keys2 = array( 'readonly', 'disabled' );
$keys2 = array( 'readonly', 'disabled', 'required' );
$html = '';
// atts
// atts (value="123")
foreach( $keys as $k ) {
if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
}
// atts2
// atts2 (disabled="disabled")
foreach( $keys2 as $k ) {
if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
}
// remove empty atts
$atts = acf_clean_atts( $atts );
// render
$html .= '<div class="acf-input-wrap acf-url">';
$html .= '<i class="acf-icon -globe -small"></i>' . acf_get_text_input( $atts ) ;

View File

@ -54,10 +54,6 @@ class acf_field_wysiwyg extends acf_field {
function add_filters() {
// globals
global $wp_version;
// wp-includes/class-wp-embed.php
if( !empty($GLOBALS['wp_embed']) ) {
@ -72,15 +68,11 @@ class acf_field_wysiwyg extends acf_field {
add_filter( 'acf_the_content', 'wptexturize' );
add_filter( 'acf_the_content', 'convert_smilies', 20 );
// Removed in 4.4
if( version_compare($wp_version, '4.4', '<' ) ) {
if( acf_version_compare('wp', '<', '4.4') ) {
add_filter( 'acf_the_content', 'convert_chars' );
}
add_filter( 'acf_the_content', 'wpautop' );
add_filter( 'acf_the_content', 'shortcode_unautop' );
@ -91,12 +83,9 @@ class acf_field_wysiwyg extends acf_field {
// Added in 4.4
if( function_exists('wp_make_content_images_responsive') ) {
add_filter( 'acf_the_content', 'wp_make_content_images_responsive' );
}
add_filter( 'acf_the_content', 'do_shortcode', 11);
}
@ -117,10 +106,6 @@ class acf_field_wysiwyg extends acf_field {
function get_toolbars() {
// global
global $wp_version;
// vars
$editor_id = 'acf_content';
@ -236,7 +221,7 @@ class acf_field_wysiwyg extends acf_field {
?>
<script type="text/javascript">
if( acf ) acf.tinymce.toolbars = <?php echo json_encode($json); ?>;
if( acf ) acf.tinymce.toolbars = <?php echo wp_json_encode($json); ?>;
</script>
<?php
@ -257,10 +242,6 @@ class acf_field_wysiwyg extends acf_field {
function render_field( $field ) {
// global
global $wp_version;
// enqueue
acf_enqueue_uploader();
@ -320,7 +301,7 @@ class acf_field_wysiwyg extends acf_field {
// WP 4.3
if( version_compare($wp_version, '4.3', '>=' ) ) {
if( acf_version_compare('wp', '>=', '4.3') ) {
add_filter( 'acf_the_editor_content', 'format_for_editor', 10, 2 );
@ -352,13 +333,21 @@ class acf_field_wysiwyg extends acf_field {
// delay
if( $field['delay'] ) {
$wrap['class'] .= ' delay';
}
// vars
$textarea = acf_get_textarea_input(array(
'id' => $id,
'class' => 'wp-editor-area',
'name' => $field['name'],
'style' => $height ? "height:{$height}px;" : '',
'value' => '%s'
));
?>
<div <?php echo acf_esc_attr($wrap); ?>>
<div <?php acf_esc_attr_e($wrap); ?>>
<div id="wp-<?php echo $id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">
<?php if( $field['media_upload'] ): ?>
<div id="wp-<?php echo $id; ?>-media-buttons" class="wp-media-buttons">
@ -376,7 +365,7 @@ class acf_field_wysiwyg extends acf_field {
<?php if( $field['delay'] ): ?>
<div class="acf-editor-toolbar"><?php _e('Click to initialize TinyMCE', 'acf'); ?></div>
<?php endif; ?>
<textarea id="<?php echo $id; ?>" class="wp-editor-area" name="<?php echo $field['name']; ?>" <?php if($height): ?>style="height:<?php echo $height; ?>px;"<?php endif; ?>><?php echo $field['value']; ?></textarea>
<?php printf( $textarea, $field['value'] ); ?>
</div>
</div>
<?php

View File

@ -7,7 +7,7 @@ if( ! class_exists('acf_updates') ) :
class acf_updates {
// vars
var $version = '2.1',
var $version = '2.2',
$plugins = array(),
$updates = false,
$dev = 0;
@ -105,7 +105,7 @@ class acf_updates {
* @return (mixed)
*/
function request( $query = 'index.php', $body = array() ) {
function request( $query = 'index.php', $body = null ) {
// vars
$url = 'https://connect.advancedcustomfields.com/' . $query;
@ -116,7 +116,7 @@ class acf_updates {
// log
//acf_log('acf connect: '. $url);
//acf_log('acf connect: '. $url, $body);
// post
@ -261,17 +261,19 @@ class acf_updates {
if( !$this->updates ) {
// vars
$plugins = $this->plugins;
$wp = array(
'wp_name' => get_bloginfo('name'),
'wp_url' => home_url(),
'wp_version' => get_bloginfo('version'),
'wp_language' => get_bloginfo('language'),
'wp_timezone' => get_option('timezone_string'),
);
$post = array(
'plugins' => wp_json_encode($plugins),
'wp' => wp_json_encode($wp),
'plugins' => wp_json_encode($this->plugins),
'wp' => wp_json_encode(array(
'wp_name' => get_bloginfo('name'),
'wp_url' => home_url(),
'wp_version' => get_bloginfo('version'),
'wp_language' => get_bloginfo('language'),
'wp_timezone' => get_option('timezone_string'),
)),
'acf' => wp_json_encode(array(
'acf_version' => get_option('acf_version'),
'acf_pro' => (defined('ACF_PRO') && ACF_PRO),
)),
);

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -333,13 +333,11 @@ class acf_field_clone extends acf_field {
// type specific
// note: seamless clone fields will not be triggered
/*
if( $field['type'] == 'clone' ) {
$field = $this->acf_clone_clone_field( $field, $clone_field );
}
*/
// return
@ -353,6 +351,7 @@ class acf_field_clone extends acf_field {
*
* This function is run when cloning a clone field
* Important to run the acf_clone_field function on sub fields to pass on settings such as 'parent_layout'
* Do not delete! Removing this logic causes major issues with cloned clone fields within a flexible content layout.
*
* @type function
* @date 28/06/2016
@ -365,13 +364,15 @@ class acf_field_clone extends acf_field {
function acf_clone_clone_field( $field, $clone_field ) {
// modify the $clone_field name
// This seems odd, however, the $clone_field is later passed into the acf_clone_field() function
// Do not delete!
// when cloning a clone field, it is important to also change the _name too
// this allows sub clone fields to appear correctly in get_row() row array
// - commented out. This may not be neccessary due to new line 315
if( $field['prefix_name'] ) {
//$field['name'] = $clone_field['_name'];
//$field['_name'] = $clone_field['_name'];
$clone_field['name'] = $field['_name'];
$clone_field['_name'] = $field['_name'];
}
@ -384,7 +385,7 @@ class acf_field_clone extends acf_field {
foreach( $field['sub_fields'] as &$sub_field ) {
// clone
$sub_field = acf_clone_field( $sub_field, $field );
$sub_field = acf_clone_field( $sub_field, $clone_field );
}

View File

@ -1,8 +1,8 @@
=== Advanced Custom Fields Pro ===
Contributors: elliotcondon
Tags: acf, advanced, custom, field, fields, custom field, custom fields, simple fields, magic fields, more fields, repeater, edit
Tags: acf, advanced, custom, field, fields, form, repeater, content
Requires at least: 3.6.0
Tested up to: 4.8.0
Tested up to: 4.9.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -10,102 +10,75 @@ Customise WordPress with powerful, professional and intuitive fields.
== Description ==
Advanced Custom Fields is the perfect solution for any WordPress website which needs more flexible data like other Content Management Systems.
Use the Advanced Custom Fields plugin to take full control of your WordPress edit screens & custom field data.
* Visually create your Fields
* Select from multiple input types (text, textarea, wysiwyg, image, file, page link, post object, relationship, select, checkbox, radio buttons, date picker, true / false, repeater, flexible content, gallery and more to come!)
* Assign your fields to multiple edit pages (via custom location rules)
* Easily load data through a simple and friendly API
* Uses the native WordPress custom post type for ease of use and fast processing
* Uses the native WordPress metadata for ease of use and fast processing
**Add fields on demand.** Our field builder allows you to quickly and easily add fields to WP edit screens with only the click of a few buttons!
= Field Types =
* Text (type text, api returns text)
* Text Area (type text, api returns text)
* Number (type number, api returns integer)
* Email (type email, api returns text)
* Password (type password, api returns text)
* WYSIWYG (a WordPress wysiwyg editor, api returns html)
* Image (upload an image, api returns the url)
* File (upload a file, api returns the url)
* Select (drop down list of choices, api returns chosen item)
* Checkbox (tickbox list of choices, api returns array of choices)
* Radio Buttons ( radio button list of choices, api returns chosen item)
* True / False (tick box with message, api returns true or false)
* Page Link (select 1 or more page, post or custom post types, api returns the selected url)
* Post Object (select 1 or more page, post or custom post types, api returns the selected post objects)
* Relationship (search, select and order post objects with a tidy interface, api returns the selected post objects)
* Taxonomy (select taxonomy terms with options to load, display and save, api returns the selected term objects)
* User (select 1 or more WP users, api returns the selected user objects)
* Google Maps (interactive map, api returns lat,lng,address data)
* Date Picker (jquery date picker, options for format, api returns string)
* Color Picker (WP color swatch picker)
* Tab (Group fields into tabs)
* Message (Render custom messages into the fields)
* Repeater (ability to create repeatable blocks of fields!)
* Flexible Content (ability to create flexible blocks of fields!)
* Gallery (Add, edit and order multiple images in 1 simple field)
* [Custom](https://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/) (Create your own field type!)
**Add them anywhere.** Fields can be added all over WP including posts, users, taxonomy terms, media, comments and even custom options pages!
= Tested on =
* Mac Firefox :)
* Mac Safari :)
* Mac Chrome :)
* PC Safari :)
* PC Chrome :)
* PC Firefox :)
* iPhone Safari :)
* iPad Safari :)
* PC ie7 :S
**Show them everywhere.** Load and display your custom field values in any theme template file with our hassle free developer friendly functions!
= Website =
https://www.advancedcustomfields.com/
= Features =
* Simple & Intuitive
* Powerful Functions
* Over 30 Field Types
* Extensive Documentation
* Millions of Users
= Documentation =
* [Getting Started](https://www.advancedcustomfields.com/resources/#getting-started)
* [Field Types](https://www.advancedcustomfields.com/resources/#field-types)
* [Functions](https://www.advancedcustomfields.com/resources/#functions)
* [Actions](https://www.advancedcustomfields.com/resources/#actions)
* [Filters](https://www.advancedcustomfields.com/resources/#filters)
* [How to guides](https://www.advancedcustomfields.com/resources/#how-to)
* [Tutorials](https://www.advancedcustomfields.com/resources/#tutorials)
= Links =
* [Website](https://www.advancedcustomfields.com)
* [Documentation](https://www.advancedcustomfields.com/resources/)
* [Support](https://support.advancedcustomfields.com)
* [ACF PRO](https://www.advancedcustomfields.com/resources/pro/)
= Bug Submission and Forum Support =
http://support.advancedcustomfields.com/
= Please Vote and Enjoy =
Your votes really make a difference! Thanks.
= PRO =
The Advanced Custom Fields plugin is also available in a professional version which includes more fields, more functionality, and more flexibility! [Learn more](https://www.advancedcustomfields.com/resources/pro/)
== Installation ==
1. Upload 'advanced-custom-fields' to the '/wp-content/plugins/' directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Click on the new menu item "Custom Fields" and create your first Custom Field Group!
4. Your custom field group will now appear on the page / post / template you specified in the field group's location rules!
5. Read the documentation to display your data:
From your WordPress dashboard
1. **Visit** Plugins > Add New
2. **Search** for "Advanced Custom Fields"
3. **Activate** Advanced Custom Fields from your Plugins page
4. **Click** on the new menu item "Custom Fields" and create your first Custom Field Group!
5. **Read** the documentation to [get started](https://www.advancedcustomfields.com/resources/getting-started-with-acf/)
== Frequently Asked Questions ==
= Q. I have a question =
A. Chances are, someone else has asked it. Check out the support forum at:
http://support.advancedcustomfields.com/
= What kind of support do you provide? =
**Help Desk.** Support is currently provided via our email help desk. Questions are generally answered within 24 hours, with the exception of weekends and holidays. We answer questions related to ACF, its usage and provide minor customization guidance. We cannot guarantee support for questions which include custom theme code, or 3rd party plugin conflicts & compatibility. [Open a Support Ticket](http://support.advancedcustomfields.com/new-ticket/)
**Support Forums.** Our Community Forums provide a great resource for searching and finding previously answered and asked support questions. You may create a new thread on these forums, however, it is not guaranteed that you will receive an answer from our support team. This is more of an area for developers to talk to one another, post ideas, plugins and provide basic help. [View the Support Forum](http://support.advancedcustomfields.com)
== Screenshots ==
1. Creating the Advanced Custom Fields
1. Simple & Intuitive
2. Adding the Custom Fields to a page and hiding the default meta boxes
2. Made for developers
3. The Page edit screen after creating the Advanced Custom Fields
4. Simple and intuitive API. Read the documentation at: https://www.advancedcustomfields.com/resources/
3. All about fields
== Changelog ==
= 5.6.3 =
* Button Group field: Added new field type
* Range field: Added missing 'step' attribute to number input
* Range field: Added width to number input based on max setting
* Basic fields: Added missing 'required' attribute to inputs
* Basic fields: Removed empty attributes from inputs
* API: Fixed `get_fields()` bug ignoring fields starting with an underscore
* Core: Minor fixes and improvements
* Language: Updated Portuguese translation - thanks to Pedro Mendonça
* Language: Updated French translation - thanks to Maxime Bernard-Jacquet
* Language: Updated Finnish translation - thanks to Sauli Rajala
* Language: Updated German translation - thanks to Ralf Koller
= 5.6.2 =
* Range field: Added new field type
* Clone field: Fixed bug causing value update issues for 'seamless' + widgets / nave menu items