Merge branch 'feature/acf-5.9.5-update' into develop

This commit is contained in:
Jean-Baptiste Bailly 2021-03-16 10:29:32 +01:00
commit 77a34284e1
45 changed files with 1962 additions and 1633 deletions

View File

@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields. Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.9.1 Version: 5.9.5
Author: Elliot Condon Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com Author URI: https://www.advancedcustomfields.com
Text Domain: acf Text Domain: acf
@ -17,7 +17,7 @@ if( ! class_exists('ACF') ) :
class ACF { class ACF {
/** @var string The plugin version number. */ /** @var string The plugin version number. */
var $version = '5.9.1'; var $version = '5.9.5';
/** @var array The plugin settings array. */ /** @var array The plugin settings array. */
var $settings = array(); var $settings = array();

File diff suppressed because one or more lines are too long

View File

@ -724,7 +724,7 @@
var copy = acf.__('copy'); var copy = acf.__('copy');
// increase suffix "1" // increase suffix "1"
if( $.isNumeric(end) ) { if( acf.isNumeric(end) ) {
var i = (end*1) + 1; var i = (end*1) + 1;
label = label.replace( end, i ); label = label.replace( end, i );
name = name.replace( end, i ); name = name.replace( end, i );

File diff suppressed because one or more lines are too long

View File

@ -3434,7 +3434,8 @@
wait: 'load', wait: 'load',
events: { events: {
'removeField': 'onRemove' 'removeField': 'onRemove',
'duplicateField': 'onDuplicate'
}, },
$input: function(){ $input: function(){
@ -3474,6 +3475,13 @@
if( this.select2 ) { if( this.select2 ) {
this.select2.destroy(); this.select2.destroy();
} }
},
onDuplicate: function( e, $el, $duplicate ){
if( this.select2 ) {
$duplicate.find('.select2-container').remove();
$duplicate.find('select').removeClass('select2-hidden-accessible');
}
} }
}); });
@ -5361,7 +5369,7 @@
label: __('Value is equal to'), label: __('Value is equal to'),
fieldTypes: [ 'text', 'textarea', 'number', 'range', 'email', 'url', 'password' ], fieldTypes: [ 'text', 'textarea', 'number', 'range', 'email', 'url', 'password' ],
match: function( rule, field ){ match: function( rule, field ){
if( $.isNumeric(rule.value) ) { if( acf.isNumeric(rule.value) ) {
return isEqualToNumber( rule.value, field.val() ); return isEqualToNumber( rule.value, field.val() );
} else { } else {
return isEqualTo( rule.value, field.val() ); return isEqualTo( rule.value, field.val() );
@ -5557,8 +5565,8 @@
// append // append
choices.push({ choices.push({
id: $.trim( line[0] ), id: line[0].trim(),
text: $.trim( line[1] ) text: line[1].trim()
}); });
}); });
@ -6058,7 +6066,7 @@
var getPostID = function() { var getPostID = function() {
var postID = acf.get('post_id'); var postID = acf.get('post_id');
return $.isNumeric(postID) ? postID : 0; return acf.isNumeric(postID) ? postID : 0;
} }
@ -7768,9 +7776,12 @@
}); });
} }
// remove conflicting atts // Temporarily remove conflicting attribute.
$select.removeData('ajax'); var attrAjax = $select.attr( 'data-ajax' );
$select.removeAttr('data-ajax'); if( attrAjax !== undefined ) {
$select.removeData('ajax');
$select.removeAttr('data-ajax');
}
// ajax // ajax
if( this.get('ajax') ) { if( this.get('ajax') ) {
@ -7831,6 +7842,11 @@
// add class // add class
$container.addClass('-acf'); $container.addClass('-acf');
// Add back temporarily removed attr.
if( attrAjax !== undefined ) {
$select.attr('data-ajax', attrAjax);
}
// action for 3rd party customization // action for 3rd party customization
acf.doAction('select2_init', $select, options, this.data, (field || false), this); acf.doAction('select2_init', $select, options, this.data, (field || false), this);
}, },

File diff suppressed because one or more lines are too long

View File

@ -2522,6 +2522,20 @@
} }
/**
* Returns true if value is a number or a numeric string.
*
* @date 30/11/20
* @since 5.9.4
* @link https://stackoverflow.com/questions/9716468/pure-javascript-a-function-like-jquerys-isnumeric/9716488#9716488
*
* @param mixed n The variable being evaluated.
* @return bool.
*/
acf.isNumeric = function( n ){
return !isNaN(parseFloat(n)) && isFinite(n);
}
/** /**
* Triggers a "refresh" action used by various Components to redraw the DOM. * Triggers a "refresh" action used by various Components to redraw the DOM.
* *
@ -2542,7 +2556,11 @@
}); });
$(window).on('load', function(){ $(window).on('load', function(){
acf.doAction('load');
// Use timeout to ensure action runs after Gutenberg has modified DOM elements during "DOMContentLoaded".
setTimeout(function(){
acf.doAction('load');
});
}); });
$(window).on('beforeunload', function(){ $(window).on('beforeunload', function(){

File diff suppressed because one or more lines are too long

View File

@ -1203,6 +1203,24 @@ function acf_untrash_field( $id = 0 ) {
return true; return true;
} }
/**
* Filter callback which returns the previous post_status instead of "draft" for the "acf-field" post type.
*
* Prior to WordPress 5.6.0, this filter was not needed as restored posts were always assigned their original status.
*
* @since 5.9.5
*
* @param string $new_status The new status of the post being restored.
* @param int $post_id The ID of the post being restored.
* @param string $previous_status The status of the post at the point where it was trashed.
* @return string.
*/
function _acf_untrash_field_post_status( $new_status, $post_id, $previous_status ) {
return ( get_post_type( $post_id ) === 'acf-field' ) ? $previous_status : $new_status;
}
add_action( 'wp_untrash_post_status', '_acf_untrash_field_post_status', 10, 3 );
/** /**
* acf_prefix_fields * acf_prefix_fields
* *

View File

@ -763,6 +763,24 @@ function acf_untrash_field_group( $id = 0 ) {
return true; return true;
} }
/**
* Filter callback which returns the previous post_status instead of "draft" for the "acf-field-group" post type.
*
* Prior to WordPress 5.6.0, this filter was not needed as restored posts were always assigned their original status.
*
* @since 5.9.5
*
* @param string $new_status The new status of the post being restored.
* @param int $post_id The ID of the post being restored.
* @param string $previous_status The status of the post at the point where it was trashed.
* @return string.
*/
function _acf_untrash_field_group_post_status( $new_status, $post_id, $previous_status ) {
return ( get_post_type( $post_id ) === 'acf-field-group' ) ? $previous_status : $new_status;
}
add_action( 'wp_untrash_post_status', '_acf_untrash_field_group_post_status', 10, 3 );
/** /**
* acf_is_field_group * acf_is_field_group
* *

View File

@ -124,6 +124,20 @@ function acf_request_args( $args = array() ) {
return $args; return $args;
} }
/**
* Returns a single $_REQUEST arg with fallback.
*
* @date 23/10/20
* @since 5.9.2
*
* @param string $key The property name.
* @param mixed $default The default value to fallback to.
* @return mixed
*/
function acf_request_arg( $name = '', $default = null ) {
return isset( $_REQUEST[ $name ] ) ? $_REQUEST[ $name ] : $default;
}
// Register store. // Register store.
acf_register_store( 'filters' ); acf_register_store( 'filters' );

View File

@ -1,64 +1,5 @@
<?php <?php
/**
* acf_decode_post_id
*
* Returns an array containing the object type and id for the given post_id string.
*
* @date 25/1/19
* @since 5.7.11
*
* @param (int|string) $post_id The post id.
* @return array()
*/
function acf_decode_post_id( $post_id = 0 ) {
// Default data
$data = array(
'type' => 'post',
'id' => 0
);
// Check if is numeric.
if( is_numeric($post_id) ) {
$data['id'] = (int) $post_id;
// Check if is string.
} elseif( is_string($post_id) ) {
// Determine "{$type}_{$id}" from string.
$bits = explode( '_', $post_id );
$id = array_pop( $bits );
$type = implode( '_', $bits );
// Check if is meta type.
if( function_exists("get_{$type}_meta") && is_numeric($id) ) {
$data['type'] = $type;
$data['id'] = (int) $id;
// Check if is taxonomy name.
} elseif( taxonomy_exists($type) && is_numeric($id) ) {
$data['type'] = 'term';
$data['id'] = (int) $id;
// Otherwise, default to option.
} else {
$data['type'] = 'option';
$data['id'] = $post_id;
}
}
/**
* Filters the $data array after it has been decoded.
*
* @date 12/02/2014
* @since 5.0.0
*
* @param array $data The type and id array.
*/
return apply_filters( "acf/decode_post_id", $data, $post_id );
}
/** /**
* acf_get_meta * acf_get_meta
* *
@ -74,20 +15,20 @@ function acf_get_meta( $post_id = 0 ) {
// Allow filter to short-circuit load_value logic. // Allow filter to short-circuit load_value logic.
$null = apply_filters( "acf/pre_load_meta", null, $post_id ); $null = apply_filters( "acf/pre_load_meta", null, $post_id );
if( $null !== null ) { if( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null; return ( $null === '__return_null' ) ? null : $null;
} }
// Decode $post_id for $type and $id. // Decode $post_id for $type and $id.
extract( acf_decode_post_id($post_id) ); extract( acf_decode_post_id($post_id) );
// Use get_$type_meta() function when possible. // Determine CRUD function.
if( function_exists("get_{$type}_meta") ) { // - Relies on decoded post_id result to identify option or meta types.
$allmeta = call_user_func("get_{$type}_meta", $id, ''); // - Uses xxx_metadata(type) instead of xxx_type_meta() to bypass additional logic that could alter the ID.
if( $type === 'option' ) {
// Default to wp_options.
} else {
$allmeta = acf_get_option_meta( $id ); $allmeta = acf_get_option_meta( $id );
} else {
$allmeta = get_metadata( $type, $id, '' );
} }
// Loop over meta and check that a reference exists for each value. // Loop over meta and check that a reference exists for each value.
@ -181,10 +122,10 @@ function acf_get_metadata( $post_id = 0, $name = '', $hidden = false ) {
// Allow filter to short-circuit logic. // Allow filter to short-circuit logic.
$null = apply_filters( "acf/pre_load_metadata", null, $post_id, $name, $hidden ); $null = apply_filters( "acf/pre_load_metadata", null, $post_id, $name, $hidden );
if( $null !== null ) { if( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null; return ( $null === '__return_null' ) ? null : $null;
} }
// Decode $post_id for $type and $id. // Decode $post_id for $type and $id.
extract( acf_decode_post_id($post_id) ); extract( acf_decode_post_id($post_id) );
@ -196,11 +137,11 @@ function acf_get_metadata( $post_id = 0, $name = '', $hidden = false ) {
return null; return null;
} }
// Check option. // Determine CRUD function.
// - Relies on decoded post_id result to identify option or meta types.
// - Uses xxx_metadata(type) instead of xxx_type_meta() to bypass additional logic that could alter the ID.
if( $type === 'option' ) { if( $type === 'option' ) {
return get_option( "{$prefix}{$id}_{$name}", null ); return get_option( "{$prefix}{$id}_{$name}", null );
// Check meta.
} else { } else {
$meta = get_metadata( $type, $id, "{$prefix}{$name}", false ); $meta = get_metadata( $type, $id, "{$prefix}{$name}", false );
return isset($meta[0]) ? $meta[0] : null; return isset($meta[0]) ? $meta[0] : null;
@ -225,10 +166,10 @@ function acf_update_metadata( $post_id = 0, $name = '', $value = '', $hidden = f
// Allow filter to short-circuit logic. // Allow filter to short-circuit logic.
$pre = apply_filters( "acf/pre_update_metadata", null, $post_id, $name, $value, $hidden ); $pre = apply_filters( "acf/pre_update_metadata", null, $post_id, $name, $value, $hidden );
if( $pre !== null ) { if( $pre !== null ) {
return $pre; return $pre;
} }
// Decode $post_id for $type and $id. // Decode $post_id for $type and $id.
extract( acf_decode_post_id($post_id) ); extract( acf_decode_post_id($post_id) );
@ -240,15 +181,13 @@ function acf_update_metadata( $post_id = 0, $name = '', $value = '', $hidden = f
return false; return false;
} }
// Update option. // Determine CRUD function.
// - Relies on decoded post_id result to identify option or meta types.
// - Uses xxx_metadata(type) instead of xxx_type_meta() to bypass additional logic that could alter the ID.
if( $type === 'option' ) { if( $type === 'option' ) {
// Unslash value to match update_metadata() functionality.
$value = wp_unslash( $value ); $value = wp_unslash( $value );
$autoload = (bool) acf_get_setting('autoload'); $autoload = (bool) acf_get_setting('autoload');
return update_option( "{$prefix}{$id}_{$name}", $value, $autoload ); return update_option( "{$prefix}{$id}_{$name}", $value, $autoload );
// Update meta.
} else { } else {
return update_metadata( $type, $id, "{$prefix}{$name}", $value ); return update_metadata( $type, $id, "{$prefix}{$name}", $value );
} }
@ -271,10 +210,10 @@ function acf_delete_metadata( $post_id = 0, $name = '', $hidden = false ) {
// Allow filter to short-circuit logic. // Allow filter to short-circuit logic.
$pre = apply_filters( "acf/pre_delete_metadata", null, $post_id, $name, $hidden ); $pre = apply_filters( "acf/pre_delete_metadata", null, $post_id, $name, $hidden );
if( $pre !== null ) { if( $pre !== null ) {
return $pre; return $pre;
} }
// Decode $post_id for $type and $id. // Decode $post_id for $type and $id.
extract( acf_decode_post_id($post_id) ); extract( acf_decode_post_id($post_id) );
@ -286,12 +225,11 @@ function acf_delete_metadata( $post_id = 0, $name = '', $hidden = false ) {
return false; return false;
} }
// Update option. // Determine CRUD function.
// - Relies on decoded post_id result to identify option or meta types.
// - Uses xxx_metadata(type) instead of xxx_type_meta() to bypass additional logic that could alter the ID.
if( $type === 'option' ) { if( $type === 'option' ) {
$autoload = (bool) acf_get_setting('autoload');
return delete_option( "{$prefix}{$id}_{$name}" ); return delete_option( "{$prefix}{$id}_{$name}" );
// Update meta.
} else { } else {
return delete_metadata( $type, $id, "{$prefix}{$name}" ); return delete_metadata( $type, $id, "{$prefix}{$name}" );
} }

View File

@ -40,18 +40,16 @@ function acf_get_reference( $field_name, $post_id ) {
} }
/** /**
* acf_get_value
*
* Retrieves the value for a given field and post_id. * Retrieves the value for a given field and post_id.
* *
* @date 28/09/13 * @date 28/09/13
* @since 5.0.0 * @since 5.0.0
* *
* @param (int|string) $post_id The post id. * @param int|string $post_id The post id.
* @param array $field The field array. * @param array $field The field array.
* @return mixed. * @return mixed
*/ */
function acf_get_value( $post_id = 0, $field ) { function acf_get_value( $post_id, $field ) {
// Allow filter to short-circuit load_value logic. // Allow filter to short-circuit load_value logic.
$value = apply_filters( "acf/pre_load_value", null, $post_id, $field ); $value = apply_filters( "acf/pre_load_value", null, $post_id, $field );
@ -163,7 +161,7 @@ acf_add_filter_variations( 'acf/format_value', array('type', 'name', 'key'), 2 )
* @param array $field The field array. * @param array $field The field array.
* @return bool. * @return bool.
*/ */
function acf_update_value( $value = null, $post_id = 0, $field ) { function acf_update_value( $value, $post_id, $field ) {
// Allow filter to short-circuit update_value logic. // Allow filter to short-circuit update_value logic.
$check = apply_filters( "acf/pre_update_value", null, $value, $post_id, $field ); $check = apply_filters( "acf/pre_update_value", null, $value, $post_id, $field );
@ -217,7 +215,7 @@ acf_add_filter_variations( 'acf/update_value', array('type', 'name', 'key'), 2 )
* @param (int|string) $post_id The post id. * @param (int|string) $post_id The post id.
* @return void * @return void
*/ */
function acf_update_values( $values = array(), $post_id = 0 ) { function acf_update_values( $values, $post_id ) {
// Loop over values. // Loop over values.
foreach( $values as $key => $value ) { foreach( $values as $key => $value ) {

View File

@ -106,3 +106,113 @@ function acf_get_object_type( $object_type, $object_subtype = '' ) {
*/ */
return apply_filters( 'acf/get_object_type', $object, $object_type, $object_subtype ); return apply_filters( 'acf/get_object_type', $object, $object_type, $object_subtype );
} }
/**
* Decodes a post_id value such as 1 or "user_1" into an array containing the type and ID.
*
* @date 25/1/19
* @since 5.7.11
*
* @param (int|string) $post_id The post id.
* @return array
*/
function acf_decode_post_id( $post_id = 0 ) {
$type = '';
$id = 0;
// Interpret numeric value (123).
if ( is_numeric($post_id) ) {
$type = 'post';
$id = $post_id;
// Interpret string value ("user_123" or "option").
} elseif ( is_string($post_id) ) {
$i = strrpos($post_id, '_');
if( $i > 0 ) {
$type = substr($post_id, 0, $i);
$id = substr($post_id, $i+1);
} else {
$type = $post_id;
$id = '';
}
// Handle incorrect param type.
} else {
return compact( 'type', 'id' );
}
// Validate props based on param format.
$format = $type . '_' . (is_numeric($id) ? '%d' : '%s');
switch ( $format ) {
case 'post_%d':
$type = 'post';
$id = absint( $id );
break;
case 'term_%d':
$type = 'term';
$id = absint( $id );
break;
case 'attachment_%d':
$type = 'post';
$id = absint( $id );
break;
case 'comment_%d':
$type = 'comment';
$id = absint( $id );
break;
case 'widget_%s':
case 'widget_%d':
$type = 'option';
$id = $post_id;
break;
case 'menu_%d':
$type = 'term';
$id = absint( $id );
break;
case 'menu_item_%d':
$type = 'post';
$id = absint( $id );
break;
case 'user_%d':
$type = 'user';
$id = absint( $id );
break;
case 'block_%s':
$type = 'block';
$id = $post_id;
break;
case 'option_%s':
$type = 'option';
$id = $post_id;
break;
case 'blog_%d':
case 'site_%d':
// Allow backwards compatibility for custom taxonomies.
$type = taxonomy_exists($type) ? 'term' : 'blog';
$id = absint( $id );
break;
default:
// Check for taxonomy name.
if( taxonomy_exists($type) && is_numeric($id) ) {
$type = 'term';
$id = absint( $id );
break;
}
// Treat unknown post_id format as an option.
$type = 'option';
$id = $post_id;
break;
}
/**
* Filters the decoded post_id information.
*
* @date 25/1/19
* @since 5.7.11
*
* @param array $props An array containing "type" and "id" information.
* @param (int|string) $post_id The post id.
*/
return apply_filters( "acf/decode_post_id", compact( 'type', 'id' ), $post_id );
}

View File

@ -133,7 +133,6 @@ class acf_admin_field_group {
add_action('acf/input/admin_head', array($this, 'admin_head')); add_action('acf/input/admin_head', array($this, 'admin_head'));
add_action('acf/input/form_data', array($this, 'form_data')); add_action('acf/input/form_data', array($this, 'form_data'));
add_action('acf/input/admin_footer', array($this, 'admin_footer')); add_action('acf/input/admin_footer', array($this, 'admin_footer'));
add_action('acf/input/admin_footer_js', array($this, 'admin_footer_js'));
// filters // filters
@ -339,27 +338,6 @@ class acf_admin_field_group {
} }
/*
* admin_footer_js
*
* description
*
* @type function
* @date 31/05/2016
* @since 5.3.8
*
* @param $post_id (int)
* @return $post_id (int)
*/
function admin_footer_js() {
// 3rd party hook
do_action('acf/field_group/admin_footer_js');
}
/* /*
* screen_settings * screen_settings
* *

View File

@ -62,8 +62,6 @@ class ACF_Ajax {
} }
/** /**
* set
*
* Sets request data for the given key. * Sets request data for the given key.
* *
* @date 31/7/18 * @date 31/7/18
@ -73,7 +71,7 @@ class ACF_Ajax {
* @param mixed $value The data value. * @param mixed $value The data value.
* @return ACF_Ajax * @return ACF_Ajax
*/ */
function set( $key = '', $value ) { function set( $key = '', $value = null ) {
$this->request[$key] = $value; $this->request[$key] = $value;
return $this; return $this;
} }

View File

@ -2611,7 +2611,8 @@ function acf_get_valid_post_id( $post_id = 0 ) {
} }
// $post_id may be an object // $post_id may be an object.
// todo: Compare class types instead.
if( is_object($post_id) ) { if( is_object($post_id) ) {
// post // post
@ -2627,7 +2628,7 @@ function acf_get_valid_post_id( $post_id = 0 ) {
// term // term
} elseif( isset($post_id->taxonomy, $post_id->term_id) ) { } elseif( isset($post_id->taxonomy, $post_id->term_id) ) {
$post_id = acf_get_term_post_id( $post_id->taxonomy, $post_id->term_id ); $post_id = 'term_' . $post_id->term_id;
// comment // comment
} elseif( isset($post_id->comment_ID) ) { } elseif( isset($post_id->comment_ID) ) {
@ -2815,36 +2816,6 @@ function acf_isset_termmeta( $taxonomy = '' ) {
} }
/*
* acf_get_term_post_id
*
* This function will return a valid post_id string for a given term and taxonomy
*
* @type function
* @date 6/2/17
* @since 5.5.6
*
* @param $taxonomy (string)
* @param $term_id (int)
* @return (string)
*/
function acf_get_term_post_id( $taxonomy, $term_id ) {
// WP < 4.4
if( !acf_isset_termmeta() ) {
return $taxonomy . '_' . $term_id;
}
// return
return 'term_' . $term_id;
}
/* /*
* acf_upload_files * acf_upload_files
* *
@ -3192,9 +3163,11 @@ function acf_get_attachment( $attachment ) {
case 'image': case 'image':
$sizes_id = $attachment->ID; $sizes_id = $attachment->ID;
$src = wp_get_attachment_image_src( $attachment->ID, 'full' ); $src = wp_get_attachment_image_src( $attachment->ID, 'full' );
$response['url'] = $src[0]; if ( $src ) {
$response['width'] = $src[1]; $response['url'] = $src[0];
$response['height'] = $src[2]; $response['width'] = $src[1];
$response['height'] = $src[2];
}
break; break;
case 'video': case 'video':
$response['width'] = acf_maybe_get( $meta, 'width', 0 ); $response['width'] = acf_maybe_get( $meta, 'width', 0 );
@ -3213,14 +3186,16 @@ function acf_get_attachment( $attachment ) {
// Load array of image sizes. // Load array of image sizes.
if( $sizes_id ) { if( $sizes_id ) {
$sizes = get_intermediate_image_sizes(); $sizes = get_intermediate_image_sizes();
$data = array(); $sizes_data = array();
foreach( $sizes as $size ) { foreach( $sizes as $size ) {
$src = wp_get_attachment_image_src( $sizes_id, $size ); $src = wp_get_attachment_image_src( $sizes_id, $size );
$data[ $size ] = $src[ 0 ]; if ( $src ) {
$data[ $size . '-width' ] = $src[ 1 ]; $sizes_data[ $size ] = $src[0];
$data[ $size . '-height' ] = $src[ 2 ]; $sizes_data[ $size . '-width' ] = $src[1];
$sizes_data[ $size . '-height' ] = $src[2];
}
} }
$response['sizes'] = $data; $response['sizes'] = $sizes_data;
} }
/** /**
@ -4851,24 +4826,19 @@ function acf_array_camel_case( $array = array() ) {
} }
/** /**
* acf_is_block_editor * Returns true if the current screen is using the block editor.
* *
* Returns true if the current screen uses the block editor. * @date 13/12/18
* @since 5.8.0
* *
* @date 13/12/18 * @return bool
* @since 5.8.0
*
* @param void
* @return bool
*/ */
function acf_is_block_editor() { function acf_is_block_editor() {
if( function_exists('get_current_screen') ) { if ( function_exists( 'get_current_screen' ) ) {
$screen = get_current_screen(); $screen = get_current_screen();
if( method_exists($screen, 'is_block_editor') ) { if( $screen && method_exists( $screen, 'is_block_editor' ) ) {
return $screen->is_block_editor(); return $screen->is_block_editor();
} }
} }
return false; return false;
} }
?>

View File

@ -138,22 +138,19 @@ function acf_get_taxonomy_labels( $taxonomies = array() ) {
*/ */
function acf_get_term_title( $term ) { function acf_get_term_title( $term ) {
// set to term name
$title = $term->name; $title = $term->name;
// allow for empty name // Allow for empty name.
if( $title === '' ) { if( $title === '' ) {
$title = __('(no title)', 'acf'); $title = __('(no title)', 'acf');
} }
// prepent ancestors indentation // Prepend ancestors indentation.
if( is_taxonomy_hierarchical($term->taxonomy) ) { if( is_taxonomy_hierarchical($term->taxonomy) ) {
$ancestors = get_ancestors( $term->term_id, $term->taxonomy ); $ancestors = get_ancestors( $term->term_id, $term->taxonomy );
$title = str_repeat('- ', count($ancestors)) . $title; $title = str_repeat('- ', count($ancestors)) . $title;
} }
// return
return $title; return $title;
} }
@ -493,6 +490,19 @@ function acf_get_choice_from_term( $term, $format = 'term_id' ) {
); );
} }
/**
* Returns a valid post_id string for a given term and taxonomy.
?> * No longer needed since WP introduced the termmeta table in WP 4.4.
*
* @date 6/2/17
* @since 5.5.6
* @deprecated 5.9.2
*
* @param $taxonomy (string) The taxonomy type.
* @param $term_id (int) The term ID.
* @return (string)
*/
function acf_get_term_post_id( $taxonomy, $term_id ) {
_deprecated_function( __FUNCTION__, '5.9.2', 'string format term_%d' );
return 'term_' . $term_id;
}

View File

@ -47,18 +47,34 @@ class acf_field_color_picker extends acf_field {
function input_admin_enqueue_scripts() { function input_admin_enqueue_scripts() {
// Register scripts for non-admin. // Register scripts for non-admin.
// Applies logic from wp_default_scripts() function. // Applies logic from wp_default_scripts() function defined in "wp-includes/script-loader.php".
if( !is_admin() ) { if( !is_admin() ) {
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
$scripts = wp_scripts(); $scripts = wp_scripts();
$scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
$scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
$scripts->set_translations( 'wp-color-picker' );
// Handle localisation across multiple WP versions.
// WP 5.0+
if( method_exists($scripts, 'set_translations') ) {
$scripts->set_translations( 'wp-color-picker' );
// WP 4.9
} else {
$scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array(
'clear' => __( 'Clear' ),
'clearAriaLabel' => __( 'Clear color' ),
'defaultString' => __( 'Default' ),
'defaultAriaLabel' => __( 'Select default color' ),
'pick' => __( 'Select Color' ),
'defaultLabel' => __( 'Color value' ),
));
}
} }
// Enqueue. // Enqueue.
wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_script( 'wp-color-picker' );
} }

View File

@ -148,8 +148,28 @@ class acf_field_email extends acf_field {
'name' => 'append', 'name' => 'append',
)); ));
} }
/**
* Validate the email value. If this method returns TRUE, the input value is valid. If
* FALSE or a string is returned, the input value is invalid and the user is shown a
* notice. If a string is returned, the string is show as the message text.
*
* @param bool $valid Whether the value is valid.
* @param mixed $value The field value.
* @param array $field The field array.
* @param string $input The request variable name for the inbound field.
*
* @return bool|string
*/
public function validate_value( $valid, $value, $field, $input ) {
if ( $value && filter_var( $value, FILTER_VALIDATE_EMAIL ) === false ) {
return sprintf( __( "'%s' is not a valid email address", 'acf' ), $value );
}
return $valid;
}
} }

View File

@ -203,7 +203,7 @@ class acf_field_page_link extends acf_field {
// order posts by search // order posts by search
if( $is_search && empty($args['orderby']) ) { if( $is_search && empty($args['orderby']) && isset($args['s']) ) {
$posts = acf_order_by_search( $posts, $args['s'] ); $posts = acf_order_by_search( $posts, $args['s'] );

View File

@ -199,7 +199,7 @@ class acf_field_post_object extends acf_field {
// order posts by search // order posts by search
if( $is_search && empty($args['orderby']) ) { if( $is_search && empty($args['orderby']) && isset($args['s']) ) {
$posts = acf_order_by_search( $posts, $args['s'] ); $posts = acf_order_by_search( $posts, $args['s'] );

View File

@ -55,7 +55,6 @@ class acf_field_radio extends acf_field {
function render_field( $field ) { function render_field( $field ) {
// vars // vars
$i = 0;
$e = ''; $e = '';
$ul = array( $ul = array(
'class' => 'acf-radio-list', 'class' => 'acf-radio-list',
@ -157,14 +156,10 @@ class acf_field_radio extends acf_field {
$class = ''; $class = '';
// increase counter
$i++;
// vars // vars
$atts = array( $atts = array(
'type' => 'radio', 'type' => 'radio',
'id' => $field['id'], 'id' => sanitize_title( $field['id'] . '-' . $value ),
'name' => $field['name'], 'name' => $field['name'],
'value' => $value 'value' => $value
); );
@ -187,14 +182,6 @@ class acf_field_radio extends acf_field {
} }
// id (use crounter for each input)
if( $i > 1 ) {
$atts['id'] .= '-' . $value;
}
// append // append
$e .= '<li><label' . $class . '><input ' . acf_esc_attr( $atts ) . '/>' . $label . '</label></li>'; $e .= '<li><label' . $class . '><input ' . acf_esc_attr( $atts ) . '/>' . $label . '</label></li>';

View File

@ -250,7 +250,7 @@ class acf_field_relationship extends acf_field {
// order posts by search // order posts by search
if( $is_search && empty($args['orderby']) ) { if( $is_search && empty($args['orderby']) && isset($args['s']) ) {
$posts = acf_order_by_search( $posts, $args['s'] ); $posts = acf_order_by_search( $posts, $args['s'] );
@ -643,7 +643,7 @@ class acf_field_relationship extends acf_field {
/* /*
* format_value() * format_value()
* *
* This filter is appied to the $value after it is loaded from the db and before it is returned to the template * This filter is applied to the $value after it is loaded from the db and before it is returned to the template
* *
* @type filter * @type filter
* @since 3.6 * @since 3.6
@ -733,7 +733,7 @@ class acf_field_relationship extends acf_field {
/* /*
* update_value() * update_value()
* *
* This filter is appied to the $value before it is updated in the db * This filter is applied to the $value before it is updated in the db
* *
* @type filter * @type filter
* @since 3.6 * @since 3.6
@ -777,4 +777,4 @@ acf_register_field_type( 'acf_field_relationship' );
endif; // class_exists check endif; // class_exists check
?> ?>

View File

@ -32,13 +32,16 @@ class acf_field_taxonomy extends acf_field {
'field_type' => 'checkbox', 'field_type' => 'checkbox',
'multiple' => 0, 'multiple' => 0,
'allow_null' => 0, 'allow_null' => 0,
//'load_save_terms' => 0, // removed in 5.2.7
'return_format' => 'id', 'return_format' => 'id',
'add_term' => 1, // 5.2.3 'add_term' => 1, // 5.2.3
'load_terms' => 0, // 5.2.7 'load_terms' => 0, // 5.2.7
'save_terms' => 0 // 5.2.7 'save_terms' => 0 // 5.2.7
); );
// Register filter variations.
acf_add_filter_variations( 'acf/fields/taxonomy/query', array('name', 'key'), 1 );
acf_add_filter_variations( 'acf/fields/taxonomy/result', array('name', 'key'), 2 );
// ajax // ajax
add_action('wp_ajax_acf/fields/taxonomy/query', array($this, 'ajax_query')); add_action('wp_ajax_acf/fields/taxonomy/query', array($this, 'ajax_query'));
@ -156,8 +159,6 @@ class acf_field_taxonomy extends acf_field {
// filters // filters
$args = apply_filters('acf/fields/taxonomy/query', $args, $field, $options['post_id']); $args = apply_filters('acf/fields/taxonomy/query', $args, $field, $options['post_id']);
$args = apply_filters('acf/fields/taxonomy/query/name=' . $field['name'], $args, $field, $options['post_id'] );
$args = apply_filters('acf/fields/taxonomy/query/key=' . $field['key'], $args, $field, $options['post_id'] );
// get terms // get terms
@ -227,54 +228,35 @@ class acf_field_taxonomy extends acf_field {
} }
/**
/* * Returns the Term's title displayed in the field UI.
* get_term_title *
* * @date 1/11/2013
* This function returns the HTML for a result * @since 5.0.0
* *
* @type function * @param WP_Term $term The term object.
* @date 1/11/2013 * @param array $field The field settings.
* @since 5.0.0 * @param mixed $post_id The post_id being edited.
* * @return string
* @param $post (object) */
* @param $field (array)
* @param $post_id (int) the post_id to which this value is saved to
* @return (string)
*/
function get_term_title( $term, $field, $post_id = 0 ) { function get_term_title( $term, $field, $post_id = 0 ) {
$title = acf_get_term_title( $term );
// get post_id // Default $post_id to current post being edited.
if( !$post_id ) $post_id = acf_get_form_data('post_id'); $post_id = $post_id ? $post_id : acf_get_form_data('post_id');
/**
// vars * Filters the term title.
$title = ''; *
* @date 1/11/2013
* @since 5.0.0
// ancestors *
$ancestors = get_ancestors( $term->term_id, $field['taxonomy'] ); * @param string $title The term title.
* @param WP_Term $term The term object.
if( !empty($ancestors) ) { * @param array $field The field settings.
* @param (int|string) $post_id The post_id being edited.
$title .= str_repeat('- ', count($ancestors)); */
return apply_filters('acf/fields/taxonomy/result', $title, $term, $field, $post_id);
}
// title
$title .= $term->name;
// filters
$title = apply_filters('acf/fields/taxonomy/result', $title, $term, $field, $post_id);
$title = apply_filters('acf/fields/taxonomy/result/name=' . $field['_name'] , $title, $term, $field, $post_id);
$title = apply_filters('acf/fields/taxonomy/result/key=' . $field['key'], $title, $term, $field, $post_id);
// return
return $title;
} }
@ -347,9 +329,14 @@ class acf_field_taxonomy extends acf_field {
// load_terms // load_terms
if( $field['load_terms'] ) { if( $field['load_terms'] ) {
// Decode $post_id for $type and $id.
extract( acf_decode_post_id($post_id) );
if( $type === 'block' ) {
// Get parent block...
}
// get terms // get terms
$info = acf_get_post_id_info($post_id); $term_ids = wp_get_object_terms( $id, $field['taxonomy'], array('fields' => 'ids', 'orderby' => 'none') );
$term_ids = wp_get_object_terms($info['id'], $field['taxonomy'], array('fields' => 'ids', 'orderby' => 'none'));
// bail early if no terms // bail early if no terms
@ -481,11 +468,14 @@ class acf_field_taxonomy extends acf_field {
// Although not fully supported by WordPress, non "post" objects may use the term relationships table. // Although not fully supported by WordPress, non "post" objects may use the term relationships table.
// Sharing taxonomies across object types is discoraged, but unique taxonomies work well. // Sharing taxonomies across object types is discoraged, but unique taxonomies work well.
// Note: Do not attempt to restrict to "post" only. This has been attempted in 5.8.9 and later reverted. // Note: Do not attempt to restrict to "post" only. This has been attempted in 5.8.9 and later reverted.
$info = acf_get_post_id_info( $post_id ); extract( acf_decode_post_id($post_id) );
if( $type === 'block' ) {
// Get parent block...
}
// Loop over taxonomies and save terms. // Loop over taxonomies and save terms.
foreach( $this->save_post_terms as $taxonomy => $term_ids ){ foreach( $this->save_post_terms as $taxonomy => $term_ids ){
wp_set_object_terms( $info['id'], $term_ids, $taxonomy, false ); wp_set_object_terms( $id, $term_ids, $taxonomy, false );
} }
// Reset storage. // Reset storage.

View File

@ -141,7 +141,7 @@ class acf_form_nav_menu {
function update_nav_menu( $menu_id ) { function update_nav_menu( $menu_id ) {
// vars // vars
$post_id = acf_get_term_post_id( 'nav_menu', $menu_id ); $post_id = 'term_' . $menu_id;
// verify and remove nonce // verify and remove nonce
@ -288,7 +288,7 @@ class acf_form_nav_menu {
// vars // vars
$nav_menu_id = acf_get_data('nav_menu_id'); $nav_menu_id = acf_get_data('nav_menu_id');
$post_id = acf_get_term_post_id( 'nav_menu', $nav_menu_id ); $post_id = 'term_' . $nav_menu_id;
// get field groups // get field groups

View File

@ -136,7 +136,7 @@ class acf_form_taxonomy {
function add_term( $taxonomy ) { function add_term( $taxonomy ) {
// vars // vars
$post_id = acf_get_term_post_id( $taxonomy, 0 ); $post_id = 'term_0';
// update vars // update vars
@ -191,7 +191,7 @@ class acf_form_taxonomy {
function edit_term( $term, $taxonomy ) { function edit_term( $term, $taxonomy ) {
// vars // vars
$post_id = acf_get_term_post_id( $term->taxonomy, $term->term_id ); $post_id = 'term_' . $term->term_id;
// update vars // update vars
@ -345,7 +345,7 @@ if( $this->view == 'add' ): ?>
function save_term( $term_id, $tt_id, $taxonomy ) { function save_term( $term_id, $tt_id, $taxonomy ) {
// vars // vars
$post_id = acf_get_term_post_id( $taxonomy, $term_id ); $post_id = 'term_' . $term_id;
// verify and remove nonce // verify and remove nonce

View File

@ -213,7 +213,7 @@ class ACF_Local_JSON {
if( $field_group['ID'] ) { if( $field_group['ID'] ) {
$field_group['modified'] = get_post_modified_time( 'U', true, $field_group['ID'] ); $field_group['modified'] = get_post_modified_time( 'U', true, $field_group['ID'] );
} else { } else {
$field_group['modified'] = strtotime(); $field_group['modified'] = strtotime( 'now' );
} }
// Prepare for export. // Prepare for export.

View File

@ -169,13 +169,13 @@ class acf_revisions {
$value = $value[0]; $value = $value[0];
$key = $key[0]; $key = $key[0];
// Load field.
// bail early if $key is a not a field_key $field = acf_get_field( $key );
if( !acf_is_field_key($key) ) continue; if( !$field ) {
continue;
}
// get field // get field
$field = acf_get_field( $key );
$field_title = $field['label'] . ' (' . $name . ')'; $field_title = $field['label'] . ' (' . $name . ')';
$field_order = $field['menu_order']; $field_order = $field['menu_order'];
$ancestors = acf_get_field_ancestors( $field ); $ancestors = acf_get_field_ancestors( $field );

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -3,15 +3,15 @@ msgstr ""
"Project-Id-Version: Advanced Custom Fields Pro v5.8.5\n" "Project-Id-Version: Advanced Custom Fields Pro v5.8.5\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2020-08-17 10:46+0200\n" "POT-Creation-Date: 2020-08-17 10:46+0200\n"
"PO-Revision-Date: 2020-08-17 10:13+0000\n" "PO-Revision-Date: 2020-09-11 10:26+0930\n"
"Last-Translator: Maxime BJ <maxime@dysign.fr>\n" "Last-Translator: Elliot Condon <e@elliotcondon.com>\n"
"Language-Team: Français\n" "Language-Team: Français\n"
"Language: fr_FR\n" "Language: fr_FR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Loco https://localise.biz/\n" "X-Generator: Poedit 1.8.1\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
@ -500,7 +500,8 @@ msgid "Review sites & upgrade"
msgstr "Examiner les sites et mettre à niveau" msgstr "Examiner les sites et mettre à niveau"
# @ acf # @ acf
#: includes/admin/admin.php:48 includes/admin/views/field-group-options.php:110 #: includes/admin/admin.php:48
#: includes/admin/views/field-group-options.php:110
msgid "Custom Fields" msgid "Custom Fields"
msgstr "ACF" msgstr "ACF"
@ -1370,7 +1371,8 @@ msgid "jQuery"
msgstr "jQuery" msgstr "jQuery"
# @ acf # @ acf
#: includes/fields.php:354 includes/fields/class-acf-field-button-group.php:177 #: includes/fields.php:354
#: includes/fields/class-acf-field-button-group.php:177
#: includes/fields/class-acf-field-checkbox.php:389 #: includes/fields/class-acf-field-checkbox.php:389
#: includes/fields/class-acf-field-group.php:474 #: includes/fields/class-acf-field-group.php:474
#: includes/fields/class-acf-field-radio.php:290 #: includes/fields/class-acf-field-radio.php:290
@ -1487,7 +1489,7 @@ msgstr "Valeur par défaut"
#: includes/fields/class-acf-field-url.php:101 #: includes/fields/class-acf-field-url.php:101
#: includes/fields/class-acf-field-wysiwyg.php:372 #: includes/fields/class-acf-field-wysiwyg.php:372
msgid "Appears when creating a new post" msgid "Appears when creating a new post"
msgstr "Valeur affichée à la création dune publicaiton" msgstr "Valeur affichée à la création dune publication"
#: includes/fields/class-acf-field-button-group.php:183 #: includes/fields/class-acf-field-button-group.php:183
#: includes/fields/class-acf-field-checkbox.php:396 #: includes/fields/class-acf-field-checkbox.php:396
@ -2749,8 +2751,8 @@ msgid "Validate Email"
msgstr "Valider le-mail" msgstr "Valider le-mail"
# @ acf # @ acf
#: includes/forms/form-front.php:104 pro/fields/class-acf-field-gallery.php:510 #: includes/forms/form-front.php:104
#: pro/options-page.php:81 #: pro/fields/class-acf-field-gallery.php:510 pro/options-page.php:81
msgid "Update" msgid "Update"
msgstr "Mise à jour" msgstr "Mise à jour"
@ -2995,7 +2997,8 @@ msgid "<b>Error</b>. Could not connect to update server"
msgstr "<b>Erreur</b>. Impossible de joindre le serveur" msgstr "<b>Erreur</b>. Impossible de joindre le serveur"
# @ acf # @ acf
#: pro/admin/admin-updates.php:118 pro/admin/views/html-settings-updates.php:12 #: pro/admin/admin-updates.php:118
#: pro/admin/views/html-settings-updates.php:12
msgid "Updates" msgid "Updates"
msgstr "Mises à jour" msgstr "Mises à jour"
@ -3026,12 +3029,12 @@ msgstr "Informations sur la licence"
#, php-format #, php-format
msgid "" msgid ""
"To unlock updates, please enter your license key below. If you don't have a " "To unlock updates, please enter your license key below. If you don't have a "
"licence key, please see <a href=\"%s\" target=\"_blank\">details & " "licence key, please see <a href=\"%s\" target=\"_blank\">details & pricing</"
"pricing</a>." "a>."
msgstr "" msgstr ""
"Pour débloquer les mises à jour, veuillez entrer votre clé de licence ci-" "Pour débloquer les mises à jour, veuillez entrer votre clé de licence ci-"
"dessous. Si vous nen possédez pas encore une, jetez un oeil à nos <a " "dessous. Si vous nen possédez pas encore une, jetez un oeil à nos <a href="
"href=\"%s\" target=\"_blank\">détails & tarifs</a>." "\"%s\" target=\"_blank\">détails & tarifs</a>."
# @ acf # @ acf
#: pro/admin/views/html-settings-updates.php:28 #: pro/admin/views/html-settings-updates.php:28
@ -3414,9 +3417,9 @@ msgstr "Options mises à jour"
#: pro/updates.php:97 #: pro/updates.php:97
#, php-format #, php-format
msgid "" msgid ""
"To enable updates, please enter your license key on the <a href=\"%s\">" "To enable updates, please enter your license key on the <a href=\"%s"
"Updates</a> page. If you don't have a licence key, please see <a href=\"%s\">" "\">Updates</a> page. If you don't have a licence key, please see <a href=\"%s"
"details & pricing</a>." "\">details & pricing</a>."
msgstr "" msgstr ""
"Pour activer les mises à jour, veuillez entrer votre clé de licence sur la " "Pour activer les mises à jour, veuillez entrer votre clé de licence sur la "
"page <a href=\"%s\">Mises à jour</a>. Si vous nen possédez pas encore une, " "page <a href=\"%s\">Mises à jour</a>. Si vous nen possédez pas encore une, "

Binary file not shown.

View File

@ -1,16 +1,16 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Advanced Custom Fields Pro v5.2.9\n" "Project-Id-Version: Advanced Custom Fields Pro v5.9.3\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2015-08-11 23:33+0200\n" "POT-Creation-Date: 2015-08-11 23:33+0200\n"
"PO-Revision-Date: 2018-02-06 10:06+1000\n" "PO-Revision-Date: 2021-01-11 23:02+0900\n"
"Last-Translator: Elliot Condon <e@elliotcondon.com>\n" "Last-Translator: Elliot Condon <e@elliotcondon.com>\n"
"Language-Team: shogo kato <s_kato@crete.co.jp>\n" "Language-Team: game-ryo <gr@game-ryo.com>\n"
"Language: ja_JP\n" "Language: ja_JP\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.1\n" "X-Generator: Poedit 2.4.2\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;"
@ -101,16 +101,15 @@ msgstr "フィールドが見つかりませんでした"
msgid "No Fields found in Trash" msgid "No Fields found in Trash"
msgstr "ゴミ箱の中にフィールドは見つかりませんでした" msgstr "ゴミ箱の中にフィールドは見つかりませんでした"
#: acf.php:268 admin/field-group.php:283 admin/field-groups.php:583 #: acf.php:268 admin/field-group.php:283 admin/field-groups.php:583 admin/views/field-group-options.php:18
#: admin/views/field-group-options.php:18
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr "無効状態"
#: acf.php:273 #: acf.php:273
#, php-format #, php-format
msgid "Disabled <span class=\"count\">(%s)</span>" msgid "Disabled <span class=\"count\">(%s)</span>"
msgid_plural "Disabled <span class=\"count\">(%s)</span>" msgid_plural "Disabled <span class=\"count\">(%s)</span>"
msgstr[0] "" msgstr[0] "無効状態 <span class=\"count\">(%s)</span>"
#: admin/admin.php:57 admin/views/field-group-options.php:120 #: admin/admin.php:57 admin/views/field-group-options.php:120
msgid "Custom Fields" msgid "Custom Fields"
@ -118,31 +117,31 @@ msgstr "カスタムフィールド"
#: admin/field-group.php:68 admin/field-group.php:69 admin/field-group.php:71 #: admin/field-group.php:68 admin/field-group.php:69 admin/field-group.php:71
msgid "Field group updated." msgid "Field group updated."
msgstr "フィールドグループを更新しました" msgstr "フィールドグループを更新しました"
#: admin/field-group.php:70 #: admin/field-group.php:70
msgid "Field group deleted." msgid "Field group deleted."
msgstr "フィールドグループを削除しました" msgstr "フィールドグループを削除しました"
#: admin/field-group.php:73 #: admin/field-group.php:73
msgid "Field group published." msgid "Field group published."
msgstr "フィールドグループを公開しました" msgstr "フィールドグループを公開しました"
#: admin/field-group.php:74 #: admin/field-group.php:74
msgid "Field group saved." msgid "Field group saved."
msgstr "フィールドグループを保存しました" msgstr "フィールドグループを保存しました"
#: admin/field-group.php:75 #: admin/field-group.php:75
msgid "Field group submitted." msgid "Field group submitted."
msgstr "フィールドグループを送信しました" msgstr "フィールドグループを送信しました"
#: admin/field-group.php:76 #: admin/field-group.php:76
msgid "Field group scheduled for." msgid "Field group scheduled for."
msgstr "フィールドグループを公開予約しました" msgstr "フィールドグループを公開予約しました"
#: admin/field-group.php:77 #: admin/field-group.php:77
msgid "Field group draft updated." msgid "Field group draft updated."
msgstr "フィールドグループの下書きを更新しました" msgstr "フィールドグループの下書きを更新しました"
#: admin/field-group.php:176 #: admin/field-group.php:176
msgid "Move to trash. Are you sure?" msgid "Move to trash. Are you sure?"
@ -204,15 +203,15 @@ msgstr "位置"
#: admin/field-group.php:215 #: admin/field-group.php:215
msgid "Settings" msgid "Settings"
msgstr "" msgstr "設定"
#: admin/field-group.php:253 #: admin/field-group.php:253
msgid "Field Keys" msgid "Field Keys"
msgstr "" msgstr "フィールドキー"
#: admin/field-group.php:283 admin/views/field-group-options.php:17 #: admin/field-group.php:283 admin/views/field-group-options.php:17
msgid "Active" msgid "Active"
msgstr "" msgstr "アクティブ"
#: admin/field-group.php:744 #: admin/field-group.php:744
msgid "Front Page" msgid "Front Page"
@ -254,9 +253,9 @@ msgstr "バックエンドで表示"
msgid "Super Admin" msgid "Super Admin"
msgstr "ネットワーク管理者" msgstr "ネットワーク管理者"
#: admin/field-group.php:818 admin/field-group.php:826 admin/field-group.php:840 #: admin/field-group.php:818 admin/field-group.php:826 admin/field-group.php:840 admin/field-group.php:847
#: admin/field-group.php:847 admin/field-group.php:862 admin/field-group.php:872 fields/file.php:235 #: admin/field-group.php:862 admin/field-group.php:872 fields/file.php:235 fields/image.php:226
#: fields/image.php:226 pro/fields/gallery.php:653 #: pro/fields/gallery.php:653
msgid "All" msgid "All"
msgstr "全て" msgstr "全て"
@ -293,7 +292,7 @@ msgstr "フィールドを移動"
#, php-format #, php-format
msgid "Active <span class=\"count\">(%s)</span>" msgid "Active <span class=\"count\">(%s)</span>"
msgid_plural "Active <span class=\"count\">(%s)</span>" msgid_plural "Active <span class=\"count\">(%s)</span>"
msgstr[0] "" msgstr[0] "アクティブ <span class=\"count\">(%s)</span>"
#: admin/field-groups.php:142 #: admin/field-groups.php:142
#, php-format #, php-format
@ -304,7 +303,7 @@ msgstr "フィールドグループを複製しました。 %s"
#, php-format #, php-format
msgid "%s field group duplicated." msgid "%s field group duplicated."
msgid_plural "%s field groups duplicated." msgid_plural "%s field groups duplicated."
msgstr[0] "%s個 のフィールドグループを複製しました" msgstr[0] "%s個 のフィールドグループを複製しました"
#: admin/field-groups.php:228 #: admin/field-groups.php:228
#, php-format #, php-format
@ -315,7 +314,7 @@ msgstr "フィールドグループを同期しました。%s"
#, php-format #, php-format
msgid "%s field group synchronised." msgid "%s field group synchronised."
msgid_plural "%s field groups synchronised." msgid_plural "%s field groups synchronised."
msgstr[0] "%s個 のフィールドグループを同期しました" msgstr[0] "%s個 のフィールドグループを同期しました"
#: admin/field-groups.php:403 admin/field-groups.php:573 #: admin/field-groups.php:403 admin/field-groups.php:573
msgid "Sync available" msgid "Sync available"
@ -328,11 +327,11 @@ msgstr "タイトル"
#: admin/field-groups.php:517 admin/views/field-group-options.php:98 admin/views/update-network.php:20 #: admin/field-groups.php:517 admin/views/field-group-options.php:98 admin/views/update-network.php:20
#: admin/views/update-network.php:28 #: admin/views/update-network.php:28
msgid "Description" msgid "Description"
msgstr "" msgstr "説明"
#: admin/field-groups.php:518 admin/views/field-group-options.php:10 #: admin/field-groups.php:518 admin/views/field-group-options.php:10
msgid "Status" msgid "Status"
msgstr "" msgstr "状態"
#: admin/field-groups.php:616 admin/settings-info.php:76 pro/admin/views/settings-updates.php:111 #: admin/field-groups.php:616 admin/settings-info.php:76 pro/admin/views/settings-updates.php:111
msgid "Changelog" msgid "Changelog"
@ -426,7 +425,7 @@ msgstr "新着情報"
#: admin/settings-tools.php:54 admin/views/settings-tools-export.php:9 admin/views/settings-tools.php:31 #: admin/settings-tools.php:54 admin/views/settings-tools-export.php:9 admin/views/settings-tools.php:31
msgid "Tools" msgid "Tools"
msgstr "" msgstr "ツール"
#: admin/settings-tools.php:151 admin/settings-tools.php:365 #: admin/settings-tools.php:151 admin/settings-tools.php:365
msgid "No field groups selected" msgid "No field groups selected"
@ -438,7 +437,7 @@ msgstr "ファイルが選択されていません"
#: admin/settings-tools.php:201 #: admin/settings-tools.php:201
msgid "Error uploading file. Please try again" msgid "Error uploading file. Please try again"
msgstr "ファイルのアップロードに失敗しました。もう一度試してください" msgstr "ファイルのアップロードに失敗しました。もう一度試してください"
#: admin/settings-tools.php:210 #: admin/settings-tools.php:210
msgid "Incorrect file type" msgid "Incorrect file type"
@ -462,11 +461,11 @@ msgstr ""
#: admin/update.php:113 #: admin/update.php:113
msgid "Upgrade ACF" msgid "Upgrade ACF"
msgstr "" msgstr "ACFをアップグレード"
#: admin/update.php:143 #: admin/update.php:143
msgid "Review sites & upgrade" msgid "Review sites & upgrade"
msgstr "" msgstr "サイトをレビュー&アップグレード"
#: admin/update.php:298 #: admin/update.php:298
msgid "Upgrade" msgid "Upgrade"
@ -474,7 +473,7 @@ msgstr "アップグレード"
#: admin/update.php:328 #: admin/update.php:328
msgid "Upgrade Database" msgid "Upgrade Database"
msgstr "" msgstr "データベースをアップグレード"
#: admin/views/field-group-field-conditional-logic.php:29 #: admin/views/field-group-field-conditional-logic.php:29
msgid "Conditional Logic" msgid "Conditional Logic"
@ -494,8 +493,7 @@ msgstr "はい"
#: fields/post_object.php:435 fields/post_object.php:449 fields/select.php:412 fields/select.php:426 #: fields/post_object.php:435 fields/post_object.php:449 fields/select.php:412 fields/select.php:426
#: fields/select.php:440 fields/select.php:454 fields/tab.php:173 fields/taxonomy.php:685 #: fields/select.php:440 fields/select.php:454 fields/tab.php:173 fields/taxonomy.php:685
#: fields/taxonomy.php:771 fields/taxonomy.php:785 fields/taxonomy.php:799 fields/taxonomy.php:813 #: fields/taxonomy.php:771 fields/taxonomy.php:785 fields/taxonomy.php:799 fields/taxonomy.php:813
#: fields/user.php:458 fields/user.php:472 fields/wysiwyg.php:385 #: fields/user.php:458 fields/user.php:472 fields/wysiwyg.php:385 pro/admin/views/settings-updates.php:103
#: pro/admin/views/settings-updates.php:103
msgid "No" msgid "No"
msgstr "いいえ" msgstr "いいえ"
@ -573,7 +571,7 @@ msgstr "フィールド名"
#: admin/views/field-group-field.php:94 #: admin/views/field-group-field.php:94
msgid "Single word, no spaces. Underscores and dashes allowed" msgid "Single word, no spaces. Underscores and dashes allowed"
msgstr "スペースは不可、アンダースコアとダッシュは使用可能" msgstr "スペースは不可、アンダースコアとダッシュは使用可能"
#: admin/views/field-group-field.php:105 #: admin/views/field-group-field.php:105
msgid "Field Type" msgid "Field Type"
@ -631,7 +629,7 @@ msgstr "タイプ"
msgid "No fields. Click the <strong>+ Add Field</strong> button to create your first field." msgid "No fields. Click the <strong>+ Add Field</strong> button to create your first field."
msgstr "" msgstr ""
"フィールドはありません。<strong>+ 新規追加</strong>ボタンをクリックして最初のフィールドを作成してくださ" "フィールドはありません。<strong>+ 新規追加</strong>ボタンをクリックして最初のフィールドを作成してくださ"
"い" "い"
#: admin/views/field-group-fields.php:51 #: admin/views/field-group-fields.php:51
msgid "Drag and drop to reorder" msgid "Drag and drop to reorder"
@ -647,7 +645,7 @@ msgstr "ルール"
#: admin/views/field-group-locations.php:6 #: admin/views/field-group-locations.php:6
msgid "Create a set of rules to determine which edit screens will use these advanced custom fields" msgid "Create a set of rules to determine which edit screens will use these advanced custom fields"
msgstr "どの編集画面でカスタムフィールドを表示するかを決定するルールを作成します" msgstr "どの編集画面でカスタムフィールドを表示するかを決定するルールを作成します"
#: admin/views/field-group-locations.php:21 #: admin/views/field-group-locations.php:21
msgid "Show this field group if" msgid "Show this field group if"
@ -787,15 +785,15 @@ msgstr "フィールドの下"
#: admin/views/field-group-options.php:87 #: admin/views/field-group-options.php:87
msgid "Order No." msgid "Order No."
msgstr "順" msgstr "順序 No."
#: admin/views/field-group-options.php:88 #: admin/views/field-group-options.php:88
msgid "Field groups with a lower order will appear first" msgid "Field groups with a lower order will appear first"
msgstr "" msgstr "順番が小さいフィールドグループほど最初に表示されます"
#: admin/views/field-group-options.php:99 #: admin/views/field-group-options.php:99
msgid "Shown in field group list" msgid "Shown in field group list"
msgstr "" msgstr "フィールドグループリストに表示されます"
#: admin/views/field-group-options.php:109 #: admin/views/field-group-options.php:109
msgid "Hide on screen" msgid "Hide on screen"
@ -803,13 +801,15 @@ msgstr "画面に非表示"
#: admin/views/field-group-options.php:110 #: admin/views/field-group-options.php:110
msgid "<b>Select</b> items to <b>hide</b> them from the edit screen." msgid "<b>Select</b> items to <b>hide</b> them from the edit screen."
msgstr "編集画面で<b>表示しない</b>アイテムを<b>選択</b>" msgstr "編集画面で<b>表示しない</b>アイテムを<b>選択</b>"
#: admin/views/field-group-options.php:110 #: admin/views/field-group-options.php:110
msgid "" msgid ""
"If multiple field groups appear on an edit screen, the first field group's options will be used (the " "If multiple field groups appear on an edit screen, the first field group's options will be used (the "
"one with the lowest order number)" "one with the lowest order number)"
msgstr "" msgstr ""
"編集画面上に複数のフィールドグループが表示される場合、最初のフィールドグループ(=順番の数値が最も小さい"
"グループ)のオプションが使用されます。"
#: admin/views/field-group-options.php:117 #: admin/views/field-group-options.php:117
msgid "Permalink" msgid "Permalink"
@ -924,7 +924,7 @@ msgid ""
"allows you to drag and drop fields in and out of parent fields!" "allows you to drag and drop fields in and out of parent fields!"
msgstr "" msgstr ""
"データ構造を再設計したことでサブフィールドは親フィールドから独立して存在できるようになりました。これに" "データ構造を再設計したことでサブフィールドは親フィールドから独立して存在できるようになりました。これに"
"よって親フィールドの内外にフィールドをドラッグアンドドロップできるます。" "よって親フィールドの内外にフィールドをドラッグアンドドロップできます!"
#: admin/views/settings-info.php:45 #: admin/views/settings-info.php:45
msgid "Goodbye Add-ons. Hello PRO" msgid "Goodbye Add-ons. Hello PRO"
@ -975,8 +975,8 @@ msgid ""
"To help make upgrading easy, <a href=\"%s\">login to your store account</a> and claim a free copy of " "To help make upgrading easy, <a href=\"%s\">login to your store account</a> and claim a free copy of "
"ACF PRO!" "ACF PRO!"
msgstr "" msgstr ""
"簡単なアップグレードのために、<a href=\"%s\">ストアアカウントにログイン</a>してACF PROの無料コピーを申請" "アップグレードを簡単にするために、<a href=\"%s\">ストアアカウントにログイン</a>してACF PROの無料版を請求"
"してください" "してください!"
#: admin/views/settings-info.php:64 #: admin/views/settings-info.php:64
#, php-format #, php-format
@ -985,7 +985,7 @@ msgid ""
"please contact our support team via the <a href=\"%s\">help desk</a>" "please contact our support team via the <a href=\"%s\">help desk</a>"
msgstr "" msgstr ""
"我々は多くの質問に応えるために<a href=\"%s\">アップグレードガイド</a>を用意していますが、もし質問がある" "我々は多くの質問に応えるために<a href=\"%s\">アップグレードガイド</a>を用意していますが、もし質問がある"
"場合は<a href=\"%s\">ヘルプデスク</a>からサポートチームに連絡をしてください" "場合は<a href=\"%s\">ヘルプデスク</a>からサポートチームに連絡をしてください"
#: admin/views/settings-info.php:72 #: admin/views/settings-info.php:72
msgid "Under the Hood" msgid "Under the Hood"
@ -997,7 +997,7 @@ msgstr "よりスマートなフィールド設定"
#: admin/views/settings-info.php:78 #: admin/views/settings-info.php:78
msgid "ACF now saves its field settings as individual post objects" msgid "ACF now saves its field settings as individual post objects"
msgstr "ACFはそれぞれのフィールドを独立した投稿オブジェクトとして保存するようになりました" msgstr "ACFはそれぞれのフィールドを独立した投稿オブジェクトとして保存するようになりました"
#: admin/views/settings-info.php:82 #: admin/views/settings-info.php:82
msgid "More AJAX" msgid "More AJAX"
@ -1005,7 +1005,7 @@ msgstr "いっそうAJAXに"
#: admin/views/settings-info.php:83 #: admin/views/settings-info.php:83
msgid "More fields use AJAX powered search to speed up page loading" msgid "More fields use AJAX powered search to speed up page loading"
msgstr "ページの読み込み速度を高速化するために、より多くのフィールドがAJAXを利用するようになりました" msgstr "ページの読み込み速度を高速化するために、より多くのフィールドがAJAXを利用するようになりました"
#: admin/views/settings-info.php:87 #: admin/views/settings-info.php:87
msgid "Local JSON" msgid "Local JSON"
@ -1013,7 +1013,7 @@ msgstr "ローカルJSON"
#: admin/views/settings-info.php:88 #: admin/views/settings-info.php:88
msgid "New auto export to JSON feature improves speed" msgid "New auto export to JSON feature improves speed"
msgstr "新しいJSON形式の自動エクスポート機能の速度を改善" msgstr "新しいJSON形式の自動エクスポート機能の速度を改善"
#: admin/views/settings-info.php:94 #: admin/views/settings-info.php:94
msgid "Better version control" msgid "Better version control"
@ -1021,7 +1021,7 @@ msgstr "より良いバージョンコントロール"
#: admin/views/settings-info.php:95 #: admin/views/settings-info.php:95
msgid "New auto export to JSON feature allows field settings to be version controlled" msgid "New auto export to JSON feature allows field settings to be version controlled"
msgstr "新しいJSON形式の自動エクスポート機能は、フィールド設定のバージョンコントロールを可能にします" msgstr "新しいJSON形式の自動エクスポート機能は、フィールド設定のバージョンコントロールを可能にします"
#: admin/views/settings-info.php:99 #: admin/views/settings-info.php:99
msgid "Swapped XML for JSON" msgid "Swapped XML for JSON"
@ -1029,7 +1029,7 @@ msgstr "XMLからJSONへ"
#: admin/views/settings-info.php:100 #: admin/views/settings-info.php:100
msgid "Import / Export now uses JSON in favour of XML" msgid "Import / Export now uses JSON in favour of XML"
msgstr "インポート / エクスポートにXML形式より優れているJSON形式が使えます" msgstr "インポート / エクスポートにXML形式より優れているJSON形式が使えます"
#: admin/views/settings-info.php:104 #: admin/views/settings-info.php:104
msgid "New Forms" msgid "New Forms"
@ -1037,11 +1037,11 @@ msgstr "新しいフォーム"
#: admin/views/settings-info.php:105 #: admin/views/settings-info.php:105
msgid "Fields can now be mapped to comments, widgets and all user forms!" msgid "Fields can now be mapped to comments, widgets and all user forms!"
msgstr "コメントとウィジェット、全てのユーザーのフォームにフィールドを追加できます。" msgstr "コメントとウィジェット、全てのユーザーのフォームにフィールドを追加できるようになりました!"
#: admin/views/settings-info.php:112 #: admin/views/settings-info.php:112
msgid "A new field for embedding content has been added" msgid "A new field for embedding content has been added"
msgstr "新しいフィールドに「oEmbed埋め込みコンテンツ」を追加しています" msgstr "新しいフィールドに「oEmbed埋め込みコンテンツ」を追加しています"
#: admin/views/settings-info.php:116 #: admin/views/settings-info.php:116
msgid "New Gallery" msgid "New Gallery"
@ -1049,7 +1049,7 @@ msgstr "新しいギャラリー"
#: admin/views/settings-info.php:117 #: admin/views/settings-info.php:117
msgid "The gallery field has undergone a much needed facelift" msgid "The gallery field has undergone a much needed facelift"
msgstr "ギャラリーフィールドは多くのマイナーチェンジをしています" msgstr "ギャラリーフィールドは多くのマイナーチェンジをしています"
#: admin/views/settings-info.php:121 #: admin/views/settings-info.php:121
msgid "New Settings" msgid "New Settings"
@ -1057,7 +1057,7 @@ msgstr "新しい設定"
#: admin/views/settings-info.php:122 #: admin/views/settings-info.php:122
msgid "Field group settings have been added for label placement and instruction placement" msgid "Field group settings have been added for label placement and instruction placement"
msgstr "フィールドグループの設定に「ラベルの配置」と「説明の配置」を追加しています" msgstr "フィールドグループの設定に「ラベルの配置」と「説明の配置」を追加しています"
#: admin/views/settings-info.php:128 #: admin/views/settings-info.php:128
msgid "Better Front End Forms" msgid "Better Front End Forms"
@ -1065,7 +1065,7 @@ msgstr "より良いフロントエンドフォーム"
#: admin/views/settings-info.php:129 #: admin/views/settings-info.php:129
msgid "acf_form() can now create a new post on submission" msgid "acf_form() can now create a new post on submission"
msgstr "acf_form()は新しい投稿をフロントエンドから作成できるようになりました" msgstr "acf_form()は新しい投稿をフロントエンドから作成できるようになりました"
#: admin/views/settings-info.php:133 #: admin/views/settings-info.php:133
msgid "Better Validation" msgid "Better Validation"
@ -1073,7 +1073,7 @@ msgstr "より良いバリデーション"
#: admin/views/settings-info.php:134 #: admin/views/settings-info.php:134
msgid "Form validation is now done via PHP + AJAX in favour of only JS" msgid "Form validation is now done via PHP + AJAX in favour of only JS"
msgstr "フォームバリデーションは、JSのみより優れているPHP + AJAXで行われます" msgstr "フォームバリデーションは、JSのみより優れているPHP + AJAXで行われます"
#: admin/views/settings-info.php:138 #: admin/views/settings-info.php:138
msgid "Relationship Field" msgid "Relationship Field"
@ -1090,7 +1090,7 @@ msgstr "フィールド移動"
#: admin/views/settings-info.php:146 #: admin/views/settings-info.php:146
msgid "New field group functionality allows you to move a field between groups & parents" msgid "New field group functionality allows you to move a field between groups & parents"
msgstr "" msgstr ""
"新しいフィールドグループでは、フィールドが親フィールドやフィールドグループ間を移動することができます" "新しいフィールドグループでは、フィールドが親フィールドやフィールドグループ間を移動することができます"
#: admin/views/settings-info.php:150 fields/page_link.php:36 #: admin/views/settings-info.php:150 fields/page_link.php:36
msgid "Page Link" msgid "Page Link"
@ -1098,7 +1098,7 @@ msgstr "ページリンク"
#: admin/views/settings-info.php:151 #: admin/views/settings-info.php:151
msgid "New archives group in page_link field selection" msgid "New archives group in page_link field selection"
msgstr "新しいページリンクの選択肢に「アーカイブグループ」を追加しています" msgstr "新しいページリンクの選択肢に「アーカイブグループ」を追加しています"
#: admin/views/settings-info.php:155 #: admin/views/settings-info.php:155
msgid "Better Options Pages" msgid "Better Options Pages"
@ -1106,7 +1106,7 @@ msgstr "より良いオプションページ"
#: admin/views/settings-info.php:156 #: admin/views/settings-info.php:156
msgid "New functions for options page allow creation of both parent and child menu pages" msgid "New functions for options page allow creation of both parent and child menu pages"
msgstr "オプションページの新しい機能として、親と子の両方のメニューページを作ることができます" msgstr "オプションページの新しい機能として、親と子の両方のメニューページを作ることができます"
#: admin/views/settings-info.php:165 #: admin/views/settings-info.php:165
#, php-format #, php-format
@ -1176,30 +1176,32 @@ msgstr "インポート"
#: admin/views/update-network.php:8 admin/views/update.php:8 #: admin/views/update-network.php:8 admin/views/update.php:8
msgid "Advanced Custom Fields Database Upgrade" msgid "Advanced Custom Fields Database Upgrade"
msgstr "" msgstr "Advanced Custom Fields データベースのアップグレード"
#: admin/views/update-network.php:10 #: admin/views/update-network.php:10
msgid "" msgid ""
"The following sites require a DB upgrade. Check the ones you want to update and then click “Upgrade " "The following sites require a DB upgrade. Check the ones you want to update and then click “Upgrade "
"Database”." "Database”."
msgstr "" msgstr ""
"下記のサイトはデータベースのアップグレードが必要です。アップデートしたいサイトにチェックを入れ、「データ"
"ベースをアップグレード」をクリックしてください。"
#: admin/views/update-network.php:19 admin/views/update-network.php:27 #: admin/views/update-network.php:19 admin/views/update-network.php:27
msgid "Site" msgid "Site"
msgstr "" msgstr "サイト"
#: admin/views/update-network.php:47 #: admin/views/update-network.php:47
#, php-format #, php-format
msgid "Site requires database upgrade from %s to %s" msgid "Site requires database upgrade from %s to %s"
msgstr "" msgstr "%s から %s へのデータベースアップグレードが必要なサイト"
#: admin/views/update-network.php:49 #: admin/views/update-network.php:49
msgid "Site is up to date" msgid "Site is up to date"
msgstr "" msgstr "サイトは最新です"
#: admin/views/update-network.php:62 admin/views/update.php:16 #: admin/views/update-network.php:62 admin/views/update.php:16
msgid "Database Upgrade complete. <a href=\"%s\">Return to network dashboard</a>" msgid "Database Upgrade complete. <a href=\"%s\">Return to network dashboard</a>"
msgstr "" msgstr "データベースのアップグレードが完了しました。 <a href=\"%s\">ネットワークダッシュボードに戻る</a>"
#: admin/views/update-network.php:101 admin/views/update-notice.php:35 #: admin/views/update-network.php:101 admin/views/update-notice.php:35
msgid "" msgid ""
@ -1209,11 +1211,11 @@ msgstr "処理前にデータベースのバックアップを強く推奨しま
#: admin/views/update-network.php:157 #: admin/views/update-network.php:157
msgid "Upgrade complete" msgid "Upgrade complete"
msgstr "" msgstr "更新完了"
#: admin/views/update-network.php:161 #: admin/views/update-network.php:161
msgid "Upgrading data to" msgid "Upgrading data to"
msgstr "" msgstr "データをアップグレード"
#: admin/views/update-notice.php:23 #: admin/views/update-notice.php:23
msgid "Database Upgrade Required" msgid "Database Upgrade Required"
@ -1222,7 +1224,7 @@ msgstr "データベースのアップグレードが必要です"
#: admin/views/update-notice.php:25 #: admin/views/update-notice.php:25
#, php-format #, php-format
msgid "Thank you for updating to %s v%s!" msgid "Thank you for updating to %s v%s!"
msgstr "%s v%sへのアップグレードありがとうございます" msgstr "%s v%sへのアップグレードありがとうございます!"
#: admin/views/update-notice.php:25 #: admin/views/update-notice.php:25
msgid "" msgid ""
@ -1244,7 +1246,7 @@ msgstr "新着情報を見る"
#: admin/views/update.php:110 #: admin/views/update.php:110
msgid "No updates available." msgid "No updates available."
msgstr "" msgstr "利用可能なアップデートはありません。"
#: api/api-helpers.php:821 #: api/api-helpers.php:821
msgid "Thumbnail" msgid "Thumbnail"
@ -1352,16 +1354,16 @@ msgstr "検証に失敗"
#: core/input.php:133 #: core/input.php:133
msgid "1 field requires attention" msgid "1 field requires attention"
msgstr "" msgstr "注意が必要なフィールドが 1 個あります"
#: core/input.php:134 #: core/input.php:134
#, php-format #, php-format
msgid "%d fields require attention" msgid "%d fields require attention"
msgstr "" msgstr "注意が必要なフィールドが %d 個あります"
#: core/input.php:135 #: core/input.php:135
msgid "Restricted" msgid "Restricted"
msgstr "" msgstr "制限されています"
#: core/input.php:533 #: core/input.php:533
#, php-format #, php-format
@ -1382,11 +1384,11 @@ msgstr "選択肢"
#: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389 #: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389
msgid "Enter each choice on a new line." msgid "Enter each choice on a new line."
msgstr "選択肢を改行で区切って入力してください" msgstr "選択肢を改行で区切って入力してください"
#: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389 #: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389
msgid "For more control, you may specify both a value and label like this:" msgid "For more control, you may specify both a value and label like this:"
msgstr "下記のように記述すると、値とラベルの両方を制御することができます" msgstr "下記のように記述すると、値とラベルの両方を制御することができます:"
#: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389 #: fields/checkbox.php:209 fields/radio.php:194 fields/select.php:389
msgid "red : Red" msgid "red : Red"
@ -1412,11 +1414,11 @@ msgstr "水平"
#: fields/checkbox.php:240 #: fields/checkbox.php:240
msgid "Toggle" msgid "Toggle"
msgstr "" msgstr "トグル"
#: fields/checkbox.php:241 #: fields/checkbox.php:241
msgid "Prepend an extra checkbox to toggle all choices" msgid "Prepend an extra checkbox to toggle all choices"
msgstr "" msgstr "すべての選択肢をチェックするためのチェックボックスを先頭に追加する"
#: fields/color_picker.php:36 #: fields/color_picker.php:36
msgid "Color Picker" msgid "Color Picker"
@ -1837,7 +1839,7 @@ msgstr "関連"
#: fields/relationship.php:48 #: fields/relationship.php:48
msgid "Minimum values reached ( {min} values )" msgid "Minimum values reached ( {min} values )"
msgstr "" msgstr "最小値 ( {min} ) に達しました"
#: fields/relationship.php:49 #: fields/relationship.php:49
msgid "Maximum values reached ( {max} values )" msgid "Maximum values reached ( {max} values )"
@ -1877,11 +1879,11 @@ msgstr "要素"
#: fields/relationship.php:733 #: fields/relationship.php:733
msgid "Selected elements will be displayed in each result" msgid "Selected elements will be displayed in each result"
msgstr "選択した要素が表示されます" msgstr "選択した要素が表示されます"
#: fields/relationship.php:744 #: fields/relationship.php:744
msgid "Minimum posts" msgid "Minimum posts"
msgstr "" msgstr "最小投稿数"
#: fields/relationship.php:753 #: fields/relationship.php:753
msgid "Maximum posts" msgid "Maximum posts"
@ -1933,16 +1935,16 @@ msgstr "タブの配置"
#: fields/tab.php:167 #: fields/tab.php:167
msgid "End-point" msgid "End-point"
msgstr "" msgstr "エンドポイント"
#: fields/tab.php:168 #: fields/tab.php:168
msgid "Use this field as an end-point and start a new group of tabs" msgid "Use this field as an end-point and start a new group of tabs"
msgstr "" msgstr "このフィールドをエンドポイントとして使用し、新規のタブグループを開始する"
#: fields/taxonomy.php:565 #: fields/taxonomy.php:565
#, php-format #, php-format
msgid "Add new %s " msgid "Add new %s "
msgstr "" msgstr "新しい %s を追加"
#: fields/taxonomy.php:704 #: fields/taxonomy.php:704
msgid "None" msgid "None"
@ -1950,15 +1952,15 @@ msgstr "無"
#: fields/taxonomy.php:736 #: fields/taxonomy.php:736
msgid "Select the taxonomy to be displayed" msgid "Select the taxonomy to be displayed"
msgstr "" msgstr "表示されるタクソノミーを選択"
#: fields/taxonomy.php:745 #: fields/taxonomy.php:745
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr "外観"
#: fields/taxonomy.php:746 #: fields/taxonomy.php:746
msgid "Select the appearance of this field" msgid "Select the appearance of this field"
msgstr "" msgstr "このフィールドの外観を選択"
#: fields/taxonomy.php:751 #: fields/taxonomy.php:751
msgid "Multiple Values" msgid "Multiple Values"
@ -1978,27 +1980,27 @@ msgstr "ラジオボタン"
#: fields/taxonomy.php:779 #: fields/taxonomy.php:779
msgid "Create Terms" msgid "Create Terms"
msgstr "" msgstr "タームの作成"
#: fields/taxonomy.php:780 #: fields/taxonomy.php:780
msgid "Allow new terms to be created whilst editing" msgid "Allow new terms to be created whilst editing"
msgstr "" msgstr "編集中の新規ターム作成を許可"
#: fields/taxonomy.php:793 #: fields/taxonomy.php:793
msgid "Save Terms" msgid "Save Terms"
msgstr "" msgstr "タームの保存"
#: fields/taxonomy.php:794 #: fields/taxonomy.php:794
msgid "Connect selected terms to the post" msgid "Connect selected terms to the post"
msgstr "" msgstr "選択されたタームを投稿に関連付ける"
#: fields/taxonomy.php:807 #: fields/taxonomy.php:807
msgid "Load Terms" msgid "Load Terms"
msgstr "" msgstr "タームの読み込み"
#: fields/taxonomy.php:808 #: fields/taxonomy.php:808
msgid "Load value from posts terms" msgid "Load value from posts terms"
msgstr "" msgstr "投稿に関連付けられたタームを読み込む"
#: fields/taxonomy.php:826 #: fields/taxonomy.php:826
msgid "Term Object" msgid "Term Object"
@ -2011,21 +2013,21 @@ msgstr "ターム ID"
#: fields/taxonomy.php:886 #: fields/taxonomy.php:886
#, php-format #, php-format
msgid "User unable to add new %s" msgid "User unable to add new %s"
msgstr "" msgstr "新規の %s を追加できないユーザーです"
#: fields/taxonomy.php:899 #: fields/taxonomy.php:899
#, php-format #, php-format
msgid "%s already exists" msgid "%s already exists"
msgstr "" msgstr "%s は既に存在しています"
#: fields/taxonomy.php:940 #: fields/taxonomy.php:940
#, php-format #, php-format
msgid "%s added" msgid "%s added"
msgstr "" msgstr "%s が追加されました"
#: fields/taxonomy.php:985 #: fields/taxonomy.php:985
msgid "Add" msgid "Add"
msgstr "" msgstr "追加"
#: fields/text.php:36 #: fields/text.php:36
msgid "Text" msgid "Text"
@ -2195,7 +2197,7 @@ msgid ""
"To unlock updates, please enter your license key below. If you don't have a licence key, please see" "To unlock updates, please enter your license key below. If you don't have a licence key, please see"
msgstr "" msgstr ""
"アップデートのロックを解除するには、以下にライセンスキーを入力してください。ライセンスキーを持っていない" "アップデートのロックを解除するには、以下にライセンスキーを入力してください。ライセンスキーを持っていない"
"場合は、こちらを参照してください" "場合は、こちらを参照してください"
#: pro/admin/views/settings-updates.php:24 #: pro/admin/views/settings-updates.php:24
msgid "details & pricing" msgid "details & pricing"
@ -2248,7 +2250,7 @@ msgid ""
"have a licence key, please see <a href=\"%s\">details & pricing</a>" "have a licence key, please see <a href=\"%s\">details & pricing</a>"
msgstr "" msgstr ""
"アップデートを有効にするには、<a href=\"%s\">アップデート</a>ページにライセンスキーを入力してください。" "アップデートを有効にするには、<a href=\"%s\">アップデート</a>ページにライセンスキーを入力してください。"
"ライセンスキーを持っていない場合は、こちらを<a href=\"%s\">詳細と価格</a>参照してください" "ライセンスキーを持っていない場合は、こちらを<a href=\"%s\">詳細と価格</a>参照してください"
#: pro/fields/flexible-content.php:36 #: pro/fields/flexible-content.php:36
msgid "Flexible Content" msgid "Flexible Content"
@ -2463,23 +2465,23 @@ msgstr "最大行数"
#. Plugin Name of the plugin/theme #. Plugin Name of the plugin/theme
msgid "Advanced Custom Fields Pro" msgid "Advanced Custom Fields Pro"
msgstr "" msgstr "Advanced Custom Fields Pro"
#. Plugin URI of the plugin/theme #. Plugin URI of the plugin/theme
msgid "http://www.advancedcustomfields.com/" msgid "http://www.advancedcustomfields.com/"
msgstr "" msgstr "http://www.advancedcustomfields.com/"
#. Description of the plugin/theme #. Description of the plugin/theme
msgid "Customise WordPress with powerful, professional and intuitive fields." msgid "Customise WordPress with powerful, professional and intuitive fields."
msgstr "" msgstr "強力でプロフェッショナル、そして直感的なフィールドで WordPress をカスタマイズ。"
#. Author of the plugin/theme #. Author of the plugin/theme
msgid "elliot condon" msgid "elliot condon"
msgstr "" msgstr "エリオット・コンドン"
#. Author URI of the plugin/theme #. Author URI of the plugin/theme
msgid "http://www.elliotcondon.com/" msgid "http://www.elliotcondon.com/"
msgstr "" msgstr "http://www.elliotcondon.com/"
#~ msgid "Hide / Show All" #~ msgid "Hide / Show All"
#~ msgstr "全て 非表示 / 表示" #~ msgstr "全て 非表示 / 表示"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Advanced Custom Fields\n" "Project-Id-Version: Advanced Custom Fields\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2020-08-18 08:57+1000\n" "POT-Creation-Date: 2020-10-29 10:30+0930\n"
"PO-Revision-Date: 2015-06-11 13:00+1000\n" "PO-Revision-Date: 2015-06-11 13:00+1000\n"
"Last-Translator: Elliot Condon <e@elliotcondon.com>\n" "Last-Translator: Elliot Condon <e@elliotcondon.com>\n"
"Language-Team: Elliot Condon <e@elliotcondon.com>\n" "Language-Team: Elliot Condon <e@elliotcondon.com>\n"
@ -16,11 +16,12 @@ msgstr ""
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: ..\n" "X-Poedit-Basepath: ../\n"
"X-Poedit-WPHeader: acf.php\n" "X-Poedit-WPHeader: acf.php\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n" "X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SearchPathExcluded-1: tests\n"
#: acf.php:68 #: acf.php:68
msgid "Advanced Custom Fields" msgid "Advanced Custom Fields"
@ -69,7 +70,7 @@ msgstr ""
#: acf.php:380 includes/admin/admin-field-group.php:232 #: acf.php:380 includes/admin/admin-field-group.php:232
#: includes/admin/admin-field-groups.php:262 #: includes/admin/admin-field-groups.php:262
#: pro/fields/class-acf-field-clone.php:811 #: pro/fields/class-acf-field-clone.php:808
msgid "Fields" msgid "Fields"
msgstr "" msgstr ""
@ -236,7 +237,7 @@ msgstr ""
#: includes/admin/views/field-group-field-conditional-logic.php:151 #: includes/admin/views/field-group-field-conditional-logic.php:151
#: includes/admin/views/field-group-locations.php:29 #: includes/admin/views/field-group-locations.php:29
#: includes/admin/views/html-location-group.php:3 #: includes/admin/views/html-location-group.php:3
#: includes/api/api-helpers.php:3675 #: includes/api/api-helpers.php:3646
msgid "or" msgid "or"
msgstr "" msgstr ""
@ -760,7 +761,7 @@ msgid "Label"
msgstr "" msgstr ""
#: includes/admin/views/field-group-fields.php:6 #: includes/admin/views/field-group-fields.php:6
#: includes/fields/class-acf-field-taxonomy.php:936 #: includes/fields/class-acf-field-taxonomy.php:926
#: pro/fields/class-acf-field-flexible-content.php:597 #: pro/fields/class-acf-field-flexible-content.php:597
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -1088,42 +1089,42 @@ msgstr ""
msgid "Full Size" msgid "Full Size"
msgstr "" msgstr ""
#: includes/api/api-helpers.php:1632 includes/api/api-term.php:147 #: includes/api/api-helpers.php:1632 includes/api/api-term.php:145
#: pro/fields/class-acf-field-clone.php:996 #: pro/fields/class-acf-field-clone.php:993
msgid "(no title)" msgid "(no title)"
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3596 #: includes/api/api-helpers.php:3567
#, php-format #, php-format
msgid "Image width must be at least %dpx." msgid "Image width must be at least %dpx."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3601 #: includes/api/api-helpers.php:3572
#, php-format #, php-format
msgid "Image width must not exceed %dpx." msgid "Image width must not exceed %dpx."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3617 #: includes/api/api-helpers.php:3588
#, php-format #, php-format
msgid "Image height must be at least %dpx." msgid "Image height must be at least %dpx."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3622 #: includes/api/api-helpers.php:3593
#, php-format #, php-format
msgid "Image height must not exceed %dpx." msgid "Image height must not exceed %dpx."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3640 #: includes/api/api-helpers.php:3611
#, php-format #, php-format
msgid "File size must be at least %s." msgid "File size must be at least %s."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3645 #: includes/api/api-helpers.php:3616
#, php-format #, php-format
msgid "File size must not exceed %s." msgid "File size must not exceed %s."
msgstr "" msgstr ""
#: includes/api/api-helpers.php:3679 #: includes/api/api-helpers.php:3650
#, php-format #, php-format
msgid "File type must be %s." msgid "File type must be %s."
msgstr "" msgstr ""
@ -1134,13 +1135,13 @@ msgstr ""
#: includes/assets.php:344 includes/fields/class-acf-field-true_false.php:79 #: includes/assets.php:344 includes/fields/class-acf-field-true_false.php:79
#: includes/fields/class-acf-field-true_false.php:159 #: includes/fields/class-acf-field-true_false.php:159
#: pro/admin/views/html-settings-updates.php:88 #: pro/admin/views/html-settings-updates.php:86
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
#: includes/assets.php:345 includes/fields/class-acf-field-true_false.php:80 #: includes/assets.php:345 includes/fields/class-acf-field-true_false.php:80
#: includes/fields/class-acf-field-true_false.php:174 #: includes/fields/class-acf-field-true_false.php:174
#: pro/admin/views/html-settings-updates.php:98 #: pro/admin/views/html-settings-updates.php:96
msgid "No" msgid "No"
msgstr "" msgstr ""
@ -1216,7 +1217,7 @@ msgstr ""
#: includes/fields/class-acf-field-checkbox.php:389 #: includes/fields/class-acf-field-checkbox.php:389
#: includes/fields/class-acf-field-group.php:474 #: includes/fields/class-acf-field-group.php:474
#: includes/fields/class-acf-field-radio.php:290 #: includes/fields/class-acf-field-radio.php:290
#: pro/fields/class-acf-field-clone.php:843 #: pro/fields/class-acf-field-clone.php:840
#: pro/fields/class-acf-field-flexible-content.php:554 #: pro/fields/class-acf-field-flexible-content.php:554
#: pro/fields/class-acf-field-flexible-content.php:603 #: pro/fields/class-acf-field-flexible-content.php:603
#: pro/fields/class-acf-field-repeater.php:449 #: pro/fields/class-acf-field-repeater.php:449
@ -1291,14 +1292,14 @@ msgstr ""
#: includes/fields/class-acf-field-post_object.php:411 #: includes/fields/class-acf-field-post_object.php:411
#: includes/fields/class-acf-field-radio.php:244 #: includes/fields/class-acf-field-radio.php:244
#: includes/fields/class-acf-field-select.php:382 #: includes/fields/class-acf-field-select.php:382
#: includes/fields/class-acf-field-taxonomy.php:781 #: includes/fields/class-acf-field-taxonomy.php:771
#: includes/fields/class-acf-field-user.php:63 #: includes/fields/class-acf-field-user.php:63
msgid "Allow Null?" msgid "Allow Null?"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-button-group.php:168 #: includes/fields/class-acf-field-button-group.php:168
#: includes/fields/class-acf-field-checkbox.php:380 #: includes/fields/class-acf-field-checkbox.php:380
#: includes/fields/class-acf-field-color_picker.php:131 #: includes/fields/class-acf-field-color_picker.php:127
#: includes/fields/class-acf-field-email.php:118 #: includes/fields/class-acf-field-email.php:118
#: includes/fields/class-acf-field-number.php:127 #: includes/fields/class-acf-field-number.php:127
#: includes/fields/class-acf-field-radio.php:281 #: includes/fields/class-acf-field-radio.php:281
@ -1341,7 +1342,7 @@ msgstr ""
#: includes/fields/class-acf-field-file.php:214 #: includes/fields/class-acf-field-file.php:214
#: includes/fields/class-acf-field-link.php:166 #: includes/fields/class-acf-field-link.php:166
#: includes/fields/class-acf-field-radio.php:304 #: includes/fields/class-acf-field-radio.php:304
#: includes/fields/class-acf-field-taxonomy.php:826 #: includes/fields/class-acf-field-taxonomy.php:816
msgid "Return Value" msgid "Return Value"
msgstr "" msgstr ""
@ -1368,7 +1369,7 @@ msgid "Both (Array)"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-checkbox.php:25 #: includes/fields/class-acf-field-checkbox.php:25
#: includes/fields/class-acf-field-taxonomy.php:768 #: includes/fields/class-acf-field-taxonomy.php:758
msgid "Checkbox" msgid "Checkbox"
msgstr "" msgstr ""
@ -1413,20 +1414,28 @@ msgstr ""
msgid "Color Picker" msgid "Color Picker"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-color_picker.php:68 #: includes/fields/class-acf-field-color_picker.php:64
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-color_picker.php:69 #: includes/fields/class-acf-field-color_picker.php:65
msgid "Clear color"
msgstr ""
#: includes/fields/class-acf-field-color_picker.php:66
msgid "Default" msgid "Default"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-color_picker.php:70 #: includes/fields/class-acf-field-color_picker.php:67
msgid "Select default color"
msgstr ""
#: includes/fields/class-acf-field-color_picker.php:68
msgid "Select Color" msgid "Select Color"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-color_picker.php:71 #: includes/fields/class-acf-field-color_picker.php:69
msgid "Current Color" msgid "Color value"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-date_picker.php:25 #: includes/fields/class-acf-field-date_picker.php:25
@ -1812,12 +1821,12 @@ msgid "Sub Fields"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-group.php:475 #: includes/fields/class-acf-field-group.php:475
#: pro/fields/class-acf-field-clone.php:844 #: pro/fields/class-acf-field-clone.php:841
msgid "Specify the style used to render the selected fields" msgid "Specify the style used to render the selected fields"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-group.php:480 #: includes/fields/class-acf-field-group.php:480
#: pro/fields/class-acf-field-clone.php:849 #: pro/fields/class-acf-field-clone.php:846
#: pro/fields/class-acf-field-flexible-content.php:615 #: pro/fields/class-acf-field-flexible-content.php:615
#: pro/fields/class-acf-field-repeater.php:457 #: pro/fields/class-acf-field-repeater.php:457
#: pro/locations/class-acf-location-block.php:20 #: pro/locations/class-acf-location-block.php:20
@ -1825,14 +1834,14 @@ msgid "Block"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-group.php:481 #: includes/fields/class-acf-field-group.php:481
#: pro/fields/class-acf-field-clone.php:850 #: pro/fields/class-acf-field-clone.php:847
#: pro/fields/class-acf-field-flexible-content.php:614 #: pro/fields/class-acf-field-flexible-content.php:614
#: pro/fields/class-acf-field-repeater.php:456 #: pro/fields/class-acf-field-repeater.php:456
msgid "Table" msgid "Table"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-group.php:482 #: includes/fields/class-acf-field-group.php:482
#: pro/fields/class-acf-field-clone.php:851 #: pro/fields/class-acf-field-clone.php:848
#: pro/fields/class-acf-field-flexible-content.php:616 #: pro/fields/class-acf-field-flexible-content.php:616
#: pro/fields/class-acf-field-repeater.php:458 #: pro/fields/class-acf-field-repeater.php:458
msgid "Row" msgid "Row"
@ -2016,7 +2025,7 @@ msgstr ""
#: includes/fields/class-acf-field-page_link.php:262 #: includes/fields/class-acf-field-page_link.php:262
#: includes/fields/class-acf-field-post_object.php:267 #: includes/fields/class-acf-field-post_object.php:267
#: includes/fields/class-acf-field-taxonomy.php:958 #: includes/fields/class-acf-field-taxonomy.php:948
msgid "Parent" msgid "Parent"
msgstr "" msgstr ""
@ -2133,7 +2142,7 @@ msgstr ""
#: includes/fields/class-acf-field-relationship.php:589 #: includes/fields/class-acf-field-relationship.php:589
#: includes/fields/class-acf-field-taxonomy.php:28 #: includes/fields/class-acf-field-taxonomy.php:28
#: includes/fields/class-acf-field-taxonomy.php:751 #: includes/fields/class-acf-field-taxonomy.php:741
#: includes/locations/class-acf-location-taxonomy.php:20 #: includes/locations/class-acf-location-taxonomy.php:20
msgid "Taxonomy" msgid "Taxonomy"
msgstr "" msgstr ""
@ -2163,7 +2172,7 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: includes/fields/class-acf-field-select.php:25 #: includes/fields/class-acf-field-select.php:25
#: includes/fields/class-acf-field-taxonomy.php:773 #: includes/fields/class-acf-field-taxonomy.php:763
msgctxt "noun" msgctxt "noun"
msgid "Select" msgid "Select"
msgstr "" msgstr ""
@ -2268,88 +2277,88 @@ msgid ""
"group of tabs." "group of tabs."
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:711 #: includes/fields/class-acf-field-taxonomy.php:701
#, php-format #, php-format
msgctxt "No terms" msgctxt "No terms"
msgid "No %s" msgid "No %s"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:752 #: includes/fields/class-acf-field-taxonomy.php:742
msgid "Select the taxonomy to be displayed" msgid "Select the taxonomy to be displayed"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:761 #: includes/fields/class-acf-field-taxonomy.php:751
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:762 #: includes/fields/class-acf-field-taxonomy.php:752
msgid "Select the appearance of this field" msgid "Select the appearance of this field"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:767 #: includes/fields/class-acf-field-taxonomy.php:757
msgid "Multiple Values" msgid "Multiple Values"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:769 #: includes/fields/class-acf-field-taxonomy.php:759
msgid "Multi Select" msgid "Multi Select"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:771 #: includes/fields/class-acf-field-taxonomy.php:761
msgid "Single Value" msgid "Single Value"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:772 #: includes/fields/class-acf-field-taxonomy.php:762
msgid "Radio Buttons" msgid "Radio Buttons"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:796 #: includes/fields/class-acf-field-taxonomy.php:786
msgid "Create Terms" msgid "Create Terms"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:797 #: includes/fields/class-acf-field-taxonomy.php:787
msgid "Allow new terms to be created whilst editing" msgid "Allow new terms to be created whilst editing"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:806 #: includes/fields/class-acf-field-taxonomy.php:796
msgid "Save Terms" msgid "Save Terms"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:807 #: includes/fields/class-acf-field-taxonomy.php:797
msgid "Connect selected terms to the post" msgid "Connect selected terms to the post"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:816 #: includes/fields/class-acf-field-taxonomy.php:806
msgid "Load Terms" msgid "Load Terms"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:817 #: includes/fields/class-acf-field-taxonomy.php:807
msgid "Load value from posts terms" msgid "Load value from posts terms"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:831 #: includes/fields/class-acf-field-taxonomy.php:821
msgid "Term Object" msgid "Term Object"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:832 #: includes/fields/class-acf-field-taxonomy.php:822
msgid "Term ID" msgid "Term ID"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:882 #: includes/fields/class-acf-field-taxonomy.php:872
#, php-format #, php-format
msgid "User unable to add new %s" msgid "User unable to add new %s"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:892 #: includes/fields/class-acf-field-taxonomy.php:882
#, php-format #, php-format
msgid "%s already exists" msgid "%s already exists"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:924 #: includes/fields/class-acf-field-taxonomy.php:914
#, php-format #, php-format
msgid "%s added" msgid "%s added"
msgstr "" msgstr ""
#: includes/fields/class-acf-field-taxonomy.php:970 #: includes/fields/class-acf-field-taxonomy.php:960
#: includes/locations/class-acf-location-user-form.php:66 #: includes/locations/class-acf-location-user-form.php:66
msgid "Add" msgid "Add"
msgstr "" msgstr ""
@ -2763,68 +2772,68 @@ msgid ""
"a>." "a>."
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:28 #: pro/admin/views/html-settings-updates.php:26
msgid "License Key" msgid "License Key"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:60 #: pro/admin/views/html-settings-updates.php:58
msgid "Update Information" msgid "Update Information"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:67 #: pro/admin/views/html-settings-updates.php:65
msgid "Current Version" msgid "Current Version"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:75 #: pro/admin/views/html-settings-updates.php:73
msgid "Latest Version" msgid "Latest Version"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:83 #: pro/admin/views/html-settings-updates.php:81
msgid "Update Available" msgid "Update Available"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:91 #: pro/admin/views/html-settings-updates.php:89
msgid "Update Plugin" msgid "Update Plugin"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:93 #: pro/admin/views/html-settings-updates.php:91
msgid "Please enter your license key above to unlock updates" msgid "Please enter your license key above to unlock updates"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:99 #: pro/admin/views/html-settings-updates.php:97
msgid "Check Again" msgid "Check Again"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:106 #: pro/admin/views/html-settings-updates.php:104
msgid "Changelog" msgid "Changelog"
msgstr "" msgstr ""
#: pro/admin/views/html-settings-updates.php:116 #: pro/admin/views/html-settings-updates.php:114
msgid "Upgrade Notice" msgid "Upgrade Notice"
msgstr "" msgstr ""
#: pro/blocks.php:36 #: pro/blocks.php:37
msgid "Block type name is required." msgid "Block type name is required."
msgstr "" msgstr ""
#: pro/blocks.php:43 #: pro/blocks.php:44
#, php-format #, php-format
msgid "Block type \"%s\" is already registered." msgid "Block type \"%s\" is already registered."
msgstr "" msgstr ""
#: pro/blocks.php:418 #: pro/blocks.php:444
msgid "Switch to Edit" msgid "Switch to Edit"
msgstr "" msgstr ""
#: pro/blocks.php:419 #: pro/blocks.php:445
msgid "Switch to Preview" msgid "Switch to Preview"
msgstr "" msgstr ""
#: pro/blocks.php:420 #: pro/blocks.php:446
msgid "Change content alignment" msgid "Change content alignment"
msgstr "" msgstr ""
#: pro/blocks.php:423 #: pro/blocks.php:449
#, php-format #, php-format
msgid "%s settings" msgid "%s settings"
msgstr "" msgstr ""
@ -2834,53 +2843,53 @@ msgctxt "noun"
msgid "Clone" msgid "Clone"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:812 #: pro/fields/class-acf-field-clone.php:809
msgid "Select one or more fields you wish to clone" msgid "Select one or more fields you wish to clone"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:829 #: pro/fields/class-acf-field-clone.php:826
msgid "Display" msgid "Display"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:830 #: pro/fields/class-acf-field-clone.php:827
msgid "Specify the style used to render the clone field" msgid "Specify the style used to render the clone field"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:835 #: pro/fields/class-acf-field-clone.php:832
msgid "Group (displays selected fields in a group within this field)" msgid "Group (displays selected fields in a group within this field)"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:836 #: pro/fields/class-acf-field-clone.php:833
msgid "Seamless (replaces this field with selected fields)" msgid "Seamless (replaces this field with selected fields)"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:857 #: pro/fields/class-acf-field-clone.php:854
#, php-format #, php-format
msgid "Labels will be displayed as %s" msgid "Labels will be displayed as %s"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:860 #: pro/fields/class-acf-field-clone.php:857
msgid "Prefix Field Labels" msgid "Prefix Field Labels"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:871 #: pro/fields/class-acf-field-clone.php:868
#, php-format #, php-format
msgid "Values will be saved as %s" msgid "Values will be saved as %s"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:874 #: pro/fields/class-acf-field-clone.php:871
msgid "Prefix Field Names" msgid "Prefix Field Names"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:992 #: pro/fields/class-acf-field-clone.php:989
msgid "Unknown field" msgid "Unknown field"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:1031 #: pro/fields/class-acf-field-clone.php:1028
msgid "Unknown field group" msgid "Unknown field group"
msgstr "" msgstr ""
#: pro/fields/class-acf-field-clone.php:1035 #: pro/fields/class-acf-field-clone.php:1032
#, php-format #, php-format
msgid "All fields from %s field group" msgid "All fields from %s field group"
msgstr "" msgstr ""
@ -3117,14 +3126,6 @@ msgid ""
"\">details & pricing</a>." "\">details & pricing</a>."
msgstr "" msgstr ""
#: tests/basic/test-blocks.php:279
msgid "Hero"
msgstr ""
#: tests/basic/test-blocks.php:280
msgid "Display a random hero image."
msgstr ""
#. Plugin URI of the plugin/theme #. Plugin URI of the plugin/theme
#. Author URI of the plugin/theme #. Author URI of the plugin/theme
msgid "https://www.advancedcustomfields.com" msgid "https://www.advancedcustomfields.com"

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ defined( 'ABSPATH' ) || exit;
// Register store. // Register store.
acf_register_store( 'block-types' ); acf_register_store( 'block-types' );
acf_register_store( 'block-cache' );
/** /**
* acf_register_block_type * acf_register_block_type
@ -52,7 +53,7 @@ function acf_register_block_type( $block ) {
if( function_exists('register_block_type') ) { if( function_exists('register_block_type') ) {
register_block_type($block['name'], array( register_block_type($block['name'], array(
'attributes' => acf_get_block_type_default_attributes( $block ), 'attributes' => acf_get_block_type_default_attributes( $block ),
'render_callback' => 'acf_rendered_block', 'render_callback' => 'acf_render_block_callback',
)); ));
} }
@ -283,24 +284,47 @@ function acf_prepare_block( $block ) {
} }
/** /**
* acf_rendered_block * The render callback for all ACF blocks.
* *
* Returns the HTML from acf_render_block(). * @date 28/10/20
* @since 5.9.2
*
* @param array $attributes The block attributes.
* @param string $content The block content.
* @param WP_Block $wp_block The block instance (since WP 5.5).
* @return string The block HTML.
*/
function acf_render_block_callback( $attributes, $content = '', $wp_block = null ) {
$is_preview = false;
$post_id = get_the_ID();
// Set preview flag to true when rendering for the block editor.
if( is_admin() && acf_is_block_editor() ) {
$is_preview = true;
}
// Return rendered block HTML.
return acf_rendered_block( $attributes, $content, $is_preview, $post_id, $wp_block );
}
/**
* Returns the rendered block HTML.
* *
* @date 28/2/19 * @date 28/2/19
* @since 5.7.13 * @since 5.7.13
* @see acf_render_block() for list of parameters.
* *
* @return string * @param array $attributes The block attributes.
* @param string $content The block content.
* @param bool $is_preview Whether or not the block is being rendered for editing preview.
* @param int $post_id The current post being edited or viewed.
* @param WP_Block $wp_block The block instance (since WP 5.5).
* @return string The block HTML.
*/ */
function acf_rendered_block( $block, $content = '', $is_preview = false, $post_id = 0 ) { function acf_rendered_block( $attributes, $content = '', $is_preview = false, $post_id = 0, $wp_block = null ) {
// Gutenberg plugin passes different parameters to core.
$is_preview = is_bool( $is_preview ) ? $is_preview : false;
// Capture block render output. // Capture block render output.
ob_start(); ob_start();
acf_render_block( $block, $content, $is_preview, $post_id ); acf_render_block( $attributes, $content, $is_preview, $post_id, $wp_block );
$html = ob_get_clean(); $html = ob_get_clean();
// Replace <InnerBlocks /> placeholder on front-end. // Replace <InnerBlocks /> placeholder on front-end.
@ -309,27 +333,29 @@ function acf_rendered_block( $block, $content = '', $is_preview = false, $post_i
$content = str_replace( '$', '\$', $content ); $content = str_replace( '$', '\$', $content );
$html = preg_replace( '/<InnerBlocks([\S\s]*?)\/>/', $content, $html ); $html = preg_replace( '/<InnerBlocks([\S\s]*?)\/>/', $content, $html );
} }
// Store in cache for preloading.
acf_get_store( 'block-cache' )->set( $attributes['id'], '<div class="acf-block-preview">' . $html . '</div>' );
return $html; return $html;
} }
/** /**
* acf_render_block
*
* Renders the block HTML. * Renders the block HTML.
* *
* @date 19/2/19 * @date 19/2/19
* @since 5.7.12 * @since 5.7.12
* *
* @param array $block The block props. * @param array $attributes The block attributes.
* @param string $content The block content (emtpy string). * @param string $content The block content.
* @param bool $is_preview True during AJAX preview. * @param bool $is_preview Whether or not the block is being rendered for editing preview.
* @param int $post_id The post being edited. * @param int $post_id The current post being edited or viewed.
* @param WP_Block $wp_block The block instance (since WP 5.5).
* @return void * @return void
*/ */
function acf_render_block( $block, $content = '', $is_preview = false, $post_id = 0 ) { function acf_render_block( $attributes, $content = '', $is_preview = false, $post_id = 0, $wp_block = null ) {
// Prepare block ensuring all settings and attributes exist. // Prepare block ensuring all settings and attributes exist.
$block = acf_prepare_block( $block ); $block = acf_prepare_block( $attributes );
if( !$block ) { if( !$block ) {
return ''; return '';
} }
@ -347,7 +373,7 @@ function acf_render_block( $block, $content = '', $is_preview = false, $post_id
// Call render_callback. // Call render_callback.
if( is_callable( $block['render_callback'] ) ) { if( is_callable( $block['render_callback'] ) ) {
call_user_func( $block['render_callback'], $block, $content, $is_preview, $post_id ); call_user_func( $block['render_callback'], $block, $content, $is_preview, $post_id, $wp_block );
// Or include template. // Or include template.
} elseif( $block['render_template'] ) { } elseif( $block['render_template'] ) {
@ -412,7 +438,7 @@ function acf_get_block_fields( $block ) {
* @return void * @return void
*/ */
function acf_enqueue_block_assets() { function acf_enqueue_block_assets() {
// Localize text. // Localize text.
acf_localize_text(array( acf_localize_text(array(
'Switch to Edit' => __('Switch to Edit', 'acf'), 'Switch to Edit' => __('Switch to Edit', 'acf'),
@ -437,6 +463,7 @@ function acf_enqueue_block_assets() {
'cellspacing' => 'cellSpacing', 'cellspacing' => 'cellSpacing',
'class' => 'className', 'class' => 'className',
'colspan' => 'colSpan', 'colspan' => 'colSpan',
'datetime' => 'dateTime',
'for' => 'htmlFor', 'for' => 'htmlFor',
'hreflang' => 'hrefLang', 'hreflang' => 'hrefLang',
'readonly' => 'readOnly', 'readonly' => 'readOnly',
@ -454,6 +481,15 @@ function acf_enqueue_block_assets() {
// Enqueue block assets. // Enqueue block assets.
array_map( 'acf_enqueue_block_type_assets', $block_types ); array_map( 'acf_enqueue_block_type_assets', $block_types );
// During the edit screen loading, WordPress renders all blocks in its own attempt to preload data.
// Retrieve any cached block HTML and include this in the localized data.
if( defined('ACF_EXPERIMENTAL_PRELOAD_BLOCKS') && ACF_EXPERIMENTAL_PRELOAD_BLOCKS ) {
$preloaded_blocks = acf_get_store( 'block-cache' )->get_data();
acf_localize_data(array(
'preloadedBlocks' => $preloaded_blocks
));
}
} }
/** /**

View File

@ -194,30 +194,27 @@ class acf_field_clone extends acf_field {
$this->cloning[ $field['key'] ] = 1; $this->cloning[ $field['key'] ] = 1;
// loop // Loop over selectors and load fields.
foreach( $field['clone'] as $selector ) { foreach( $field['clone'] as $selector ) {
// field group // Field Group selector.
if( acf_is_field_group_key($selector) ) { if( acf_is_field_group_key($selector) ) {
// vars $field_group = acf_get_field_group( $selector );
$field_group = acf_get_field_group($selector); if( !$field_group ) {
$field_group_fields = acf_get_fields($field_group); continue;
}
$field_group_fields = acf_get_fields( $field_group );
if( !$field_group_fields ) {
continue;
}
// bail early if no fields $fields = array_merge( $fields, $field_group_fields );
if( !$field_group_fields ) continue;
// Field selector.
// append
$fields = array_merge($fields, $field_group_fields);
// field
} elseif( acf_is_field_key($selector) ) { } elseif( acf_is_field_key($selector) ) {
$fields[] = acf_get_field( $selector );
// append
$fields[] = acf_get_field($selector);
} }
} }

View File

@ -1023,21 +1023,17 @@ class acf_field_flexible_content extends acf_field {
} }
/* /**
* get_layout * This function will return a specific layout by name from a field
* *
* This function will return a specific layout by name from a field * @date 15/2/17
* * @since 5.5.8
* @type function *
* @date 15/2/17 * @param string $name
* @since 5.5.8 * @param array $field
* * @return array|false
* @param $name (string) */
* @param $field (array) function get_layout( $name, $field ) {
* @return (array)
*/
function get_layout( $name = '', $field ) {
// bail early if no layouts // bail early if no layouts
if( !isset($field['layouts']) ) return false; if( !isset($field['layouts']) ) return false;
@ -1058,23 +1054,19 @@ class acf_field_flexible_content extends acf_field {
} }
/* /**
* delete_row * This function will delete a value row
* *
* This function will delete a value row * @date 15/2/17
* * @since 5.5.8
* @type function *
* @date 15/2/17 * @param int $i
* @since 5.5.8 * @param array $field
* * @param mixed $post_id
* @param $i (int) * @return bool
* @param $field (array) */
* @param $post_id (mixed) function delete_row( $i, $field, $post_id ) {
* @return (boolean)
*/
function delete_row( $i = 0, $field, $post_id ) {
// vars // vars
$value = acf_get_metadata( $post_id, $field['name'] ); $value = acf_get_metadata( $post_id, $field['name'] );
@ -1108,24 +1100,21 @@ class acf_field_flexible_content extends acf_field {
return true; return true;
} }
/* /**
* update_row * This function will update a value row
* *
* This function will update a value row * @date 15/2/17
* * @since 5.5.8
* @type function *
* @date 15/2/17 * @param array $row
* @since 5.5.8 * @param int $i
* * @param array $field
* @param $i (int) * @param mixed $post_id
* @param $field (array) * @return bool
* @param $post_id (mixed) */
* @return (boolean) function update_row( $row, $i, $field, $post_id ) {
*/
function update_row( $row, $i = 0, $field, $post_id ) {
// bail early if no layout reference // bail early if no layout reference
if( !is_array($row) || !isset($row['acf_fc_layout']) ) return false; if( !is_array($row) || !isset($row['acf_fc_layout']) ) return false;

View File

@ -282,8 +282,6 @@ class acf_field_gallery extends acf_field {
} }
/** /**
* render_attachment
*
* Renders the sidebar HTML shown when selecting an attachmemnt. * Renders the sidebar HTML shown when selecting an attachmemnt.
* *
* @date 13/12/2013 * @date 13/12/2013
@ -293,8 +291,7 @@ class acf_field_gallery extends acf_field {
* @param array $field The field array. * @param array $field The field array.
* @return void * @return void
*/ */
function render_attachment( $id = 0, $field ) { function render_attachment( $id, $field ) {
// Load attachmenet data. // Load attachmenet data.
$attachment = wp_prepare_attachment_for_js( $id ); $attachment = wp_prepare_attachment_for_js( $id );
$compat = get_compat_media_markup( $id ); $compat = get_compat_media_markup( $id );

View File

@ -703,23 +703,19 @@ class acf_field_repeater extends acf_field {
} }
/* /**
* update_row * This function will update a value row.
* *
* This function will update a value row * @date 15/2/17
* * @since 5.5.8
* @type function *
* @date 15/2/17 * @param array $row
* @since 5.5.8 * @param int $i
* * @param array $field
* @param $i (int) * @param mixed $post_id
* @param $field (array) * @return boolean
* @param $post_id (mixed) */
* @return (boolean) function update_row( $row, $i, $field, $post_id ) {
*/
function update_row( $row, $i = 0, $field, $post_id ) {
// bail early if no layout reference // bail early if no layout reference
if( !is_array($row) ) return false; if( !is_array($row) ) return false;
@ -769,23 +765,19 @@ class acf_field_repeater extends acf_field {
} }
/* /**
* delete_row * This function will delete a value row.
* *
* This function will delete a value row * @date 15/2/17
* * @since 5.5.8
* @type function *
* @date 15/2/17 * @param int $i
* @since 5.5.8 * @param array $field
* * @param mixed $post_id
* @param $i (int) * @return boolean
* @param $field (array) */
* @param $post_id (mixed) function delete_row( $i, $field, $post_id ) {
* @return (boolean)
*/
function delete_row( $i = 0, $field, $post_id ) {
// bail early if no sub fields // bail early if no sub fields
if( empty($field['sub_fields']) ) return false; if( empty($field['sub_fields']) ) return false;

View File

@ -2,7 +2,7 @@
Contributors: elliotcondon Contributors: elliotcondon
Tags: acf, fields, custom fields, meta, repeater Tags: acf, fields, custom fields, meta, repeater
Requires at least: 4.7 Requires at least: 4.7
Tested up to: 5.5 Tested up to: 5.6
Requires PHP: 5.6 Requires PHP: 5.6
License: GPLv2 or later License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ -67,6 +67,47 @@ From your WordPress dashboard
== Changelog == == Changelog ==
= 5.9.5 =
*Release Date - 11 February 2021*
* Fix - Fixed regression preventing blocks from loading correctly within the editor in WordPress 5.5.
* Fix - Fixed bug causing incorrect post_status properties when restoring a Field Group from trash in WordPress 5.6.
* Fix - Fixed edge case bug where a taxonomy named "options" could interfere with saving and loading option values.
* Fix - Fixed additional PHP 8.0 warnings.
* i18n - Updated Finnish translation thanks to Mikko Kekki
= 5.9.4 =
*Release Date - 14 January 2021*
* Enhancement - Added PHP validation for the Email field (previously relied solely on browser validation).
* Fix - Added support for PHP 8.0 (fixed logged warnings).
* Fix - Added support for jQuery 3.5 (fixed logged warnings).
* Fix - Fixed bug causing WYSIWYG field to appear unresponsive within the Gutenberg editor.
* Fix - Fixed regression preventing "blog_%d" and "site_%d" as valid `$post_id` values for custom Taxonomy terms.
* Fix - Fixed bug causing Radio field label to select first choice.
* Fix - Fixed bug preventing preloading blocks that contain multiple parent DOM elements.
* i18n - Updated Japanese translation thanks to Ryo Takahashi.
* i18n - Updated Portuguese translation thanks to Pedro Mendonça.
= 5.9.3 =
*Release Date - 3 November 2020*
* Fix - Fixed bug causing Revision meta to incorrectly update the parent Post meta.
* Fix - Fixed bug breaking "Filter by Post Type" and "Filter by Taxonomy" Field settings.
= 5.9.2 =
*Release Date - 29 October 2020*
* Enhancement - Added experiment for preloading block HTML and reducing AJAX requests on page load.
* Fix - Added boolean attribute value detection to JSX parser (fixes issue with templateLock="false").
* Fix - Added "dateTime" attribute to JSX parser ruleset.
* Fix - Fixed unresponsive Select2 instances after duplicating a row or layout.
* Fix - Added missing Color Picker script translations for previous WordPress versions.
* Fix - Fixed bug in Clone Field causing potential PHP error if cloning a Field Group that no longer exists.
* Fix - Fixed PHP warning logged when comparing a revision that contains values for a Field that no longer exist.
* Dev - Added `$wp_block` parameter to block render_callback and render_template (unavailable during AJAX preview requests).
* Dev - Deprecated `acf_get_term_post_id()` function.
= 5.9.1 = = 5.9.1 =
*Release Date - 8 September 2020* *Release Date - 8 September 2020*