This commit is contained in:
Elliot Condon 2019-05-31 09:12:53 +02:00 committed by Remco Tolsma
parent a9b6e4b326
commit 49361c955e
39 changed files with 1693 additions and 786 deletions

View File

@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com/
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.7.13
Version: 5.8.0
Author: Elliot Condon
Author URI: http://www.elliotcondon.com/
Copyright: Elliot Condon
@ -18,7 +18,7 @@ if( ! class_exists('ACF') ) :
class ACF {
/** @var string The plugin version number */
var $version = '5.7.13';
var $version = '5.8.0';
/** @var array The plugin settings array */
var $settings = array();
@ -161,6 +161,7 @@ class ACF {
acf_include('includes/json.php');
acf_include('includes/l10n.php');
acf_include('includes/local-fields.php');
acf_include('includes/local-meta.php');
acf_include('includes/loop.php');
acf_include('includes/media.php');
acf_include('includes/revisions.php');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5105,9 +5105,9 @@
}
// vars
var globalFieldActions = [ 'prepare', 'ready', 'load', 'append', 'remove', 'sortstart', 'sortstop', 'show', 'hide', 'unload' ];
var globalFieldActions = [ 'prepare', 'ready', 'load', 'append', 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload' ];
var singleFieldActions = [ 'valid', 'invalid', 'enable', 'disable', 'new' ];
var singleFieldEvents = [ 'remove', 'sortstart', 'sortstop', 'show', 'hide', 'unload', 'valid', 'invalid', 'enable', 'disable' ];
var singleFieldEvents = [ 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload', 'valid', 'invalid', 'enable', 'disable' ];
// add
globalFieldActions.map( addGlobalFieldAction );
@ -6002,14 +6002,8 @@
initialize: function(){
// bail early if too early
if( !api.isReady() ) {
api.ready( this.initializeMap, this );
return;
}
// initializeMap
this.initializeMap();
// Ensure Google API is loaded and then initialize map.
withAPI( this.initializeMap.bind(this) );
},
newLatLng: function( lat, lng ){
@ -6151,7 +6145,7 @@
}, this);
// query
api.geocoder.geocode({ 'latLng' : latLng }, callback);
geocoder.geocode({ 'latLng' : latLng }, callback);
},
setPlace: function( place ){
@ -6237,7 +6231,7 @@
});
// query
api.geocoder.geocode({ 'address' : address }, callback);
geocoder.geocode({ 'address' : address }, callback);
},
searchLocation: function(){
@ -6346,73 +6340,62 @@
acf.registerFieldType( Field );
var api = new acf.Model({
// Vars.
var loading = false;
var geocoder = false;
/**
* withAPI
*
* Loads the Google Maps API library and troggers callback.
*
* @date 28/3/19
* @since 5.7.14
*
* @param function callback The callback to excecute.
* @return void
*/
function withAPI( callback ) {
geocoder: false,
data: {
status: false,
},
getStatus: function(){
return this.get('status');
},
setStatus: function( status ){
return this.set('status', status);
},
isReady: function(){
// loaded
if( this.getStatus() == 'ready' ) {
return true;
}
// loading
if( this.getStatus() == 'loading' ) {
return false;
}
// check exists (optimal)
if( acf.isset(window, 'google', 'maps', 'places') ) {
this.setStatus('ready');
return true;
}
// load api
var url = acf.get('google_map_api');
if( url ) {
this.setStatus('loading');
// enqueue
$.ajax({
url: url,
dataType: 'script',
cache: true,
context: this,
success: function(){
// ready
this.setStatus('ready');
// geocoder
this.geocoder = new google.maps.Geocoder();
// action
acf.doAction('google_map_api_loaded');
}
});
}
// return
return false;
},
ready: function( callback, context ){
acf.addAction('google_map_api_loaded', callback, 10, context);
// Check if geocoder exists.
if( geocoder ) {
return callback();
}
});
// Check if geocoder API exists.
if( acf.isset(window, 'google', 'maps', 'Geocoder') ) {
geocoder = new google.maps.Geocoder();
return callback();
}
// Geocoder will need to be loaded. Hook callback to action.
acf.addAction( 'google_map_api_loaded', callback );
// Bail early if already loading API.
if( loading ) {
return;
}
// load api
var url = acf.get('google_map_api');
if( url ) {
// Set loading status.
loading = true;
// Load API
$.ajax({
url: url,
dataType: 'script',
cache: true,
success: function(){
geocoder = new google.maps.Geocoder();
acf.doAction('google_map_api_loaded');
}
});
}
}
})(jQuery);
@ -7215,7 +7198,7 @@
'change [data-filter]': 'onChangeFilter',
'keyup [data-filter]': 'onChangeFilter',
'click .choices-list .acf-rel-item': 'onClickAdd',
'click [data-name="remove_item"]': 'onClickRemove',
'click [data-name="remove_item"]': 'onClickRemove',
'mouseover': 'onHover'
},
@ -7391,15 +7374,16 @@
onClickRemove: function( e, $el ){
// Prevent default here because generic handler wont be triggered.
e.preventDefault();
// vars
var $span = $el.parent();
var $li = $span.parent();
var id = $span.data('id');
// remove value
setTimeout(function(){
$li.remove();
}, 1);
$li.remove();
// show choice
this.$listItem('choices', id).removeClass('disabled');
@ -7435,6 +7419,9 @@
ajaxData.action = 'acf/fields/relationship/query';
ajaxData.field_key = this.get('key');
// Filter.
ajaxData = acf.applyFilters( 'relationship_ajax_data', ajaxData, this );
// return
return ajaxData;
},
@ -8746,8 +8733,8 @@
events: {
'mousedown .acf-editor-wrap.delay': 'onMousedown',
'sortstartField': 'disableEditor',
'sortstopField': 'enableEditor',
'unmountField': 'disableEditor',
'remountField': 'enableEditor',
'removeField': 'disableEditor'
},
@ -11108,8 +11095,11 @@
acf.screen.getPostFormat = this.getPostFormat;
acf.screen.getPostCoreTerms = this.getPostCoreTerms;
// Disable unload
acf.unload.disable();
// Add actions.
this.addAction( 'append_postbox', acf.screen.refreshAvailableMetaBoxesPerLocation );
//this.addAction( 'append_postbox', acf.screen.refreshAvailableMetaBoxesPerLocation );
},
onChange: function(){
@ -11194,6 +11184,9 @@
*
* Refreshes the WP data state based on metaboxes found in the DOM.
*
* Caution. Not safe to use.
* Causes duplicate dispatch listeners when saving post resulting in duplicate postmeta.
*
* @date 6/3/19
* @since 5.7.13
*
@ -12161,15 +12154,24 @@
$textarea.trigger('change');
});
$( ed.getWin() ).on('unload', function() {
acf.tinymce.remove( id );
// Fix bug where Gutenberg does not hear "mouseup" event and tries to select multiple blocks.
ed.on('mouseup', function(e) {
var event = new MouseEvent('mouseup');
window.dispatchEvent(event);
});
// Temporarily comment out. May not be necessary due to wysiwyg field actions.
//ed.on('unload', function(e) {
// acf.tinymce.remove( id );
//});
};
// disable wp_autoresize_on (no solution yet for fixed toolbar)
init.wp_autoresize_on = false;
// Enable wpautop allowing value to save without <p> tags.
init.wpautop = true;
// hook for 3rd party customization
init = acf.applyFilters('wysiwyg_tinymce_settings', init, id, field);
@ -12396,6 +12398,12 @@
},
onReady: function(){
// Restore wp.editor functions used by tinymce removed in WP5.
if( acf.isset(window,'wp','oldEditor') ) {
wp.editor.autop = wp.oldEditor.autop;
wp.editor.removep = wp.oldEditor.removep;
}
// bail early if no tinymce
if( !acf.isset(window,'tinymce','on') ) return;
@ -13418,7 +13426,10 @@
this.set('ignore', false);
// Reset "originalEvent" object.
this.set('originalEvent', false)
this.set('originalEvent', false);
// Return true
return true;
}
});
@ -13455,6 +13466,30 @@
}
});
/**
* mountHelper
*
* Adds compatiblity for the 'unmount' and 'remount' actions added in 5.8.0
*
* @date 7/3/19
* @since 5.7.14
*
* @param void
* @return void
*/
var mountHelper = new acf.Model({
priority: 1,
actions: {
'sortstart': 'onSortstart',
'sortstop': 'onSortstop'
},
onSortstart: function( $item ){
acf.doAction('unmount', $item);
},
onSortstop: function( $item ){
acf.doAction('remount', $item);
}
});
/**
* sortableHelper

File diff suppressed because one or more lines are too long

View File

@ -329,7 +329,7 @@ add_action('acf/validate_field', 'acf_translate_field');
* @date 30/09/13
* @since 5.0.0
*
* @param array $parent The field group or field array.
* @param (int|string|array) $parent The field group or field settings. Also accepts the field group ID or key.
* @return array
*/
function acf_get_fields( $parent ) {
@ -694,6 +694,7 @@ function acf_render_field_wrap( $field, $element = 'div', $instruction = 'label'
// Todo: Move from $wrapper out into $field.
$width = acf_extract_var( $wrapper, 'width' );
if( $width ) {
$width = acf_numval( $width );
if( $element !== 'tr' && $element !== 'td' ) {
$wrapper['data-width'] = $width;
$wrapper['style'] .= " width:{$width}%;";
@ -1330,7 +1331,7 @@ function acf_get_field_ancestors( $field ) {
$ancestors = array();
// Loop over parents.
while( $field = acf_get_field($field['parent']) ) {
while( $field['parent'] && $field = acf_get_field($field['parent']) ) {
$ancestors[] = $field['ID'] ? $field['ID'] : $field['key'];
}
@ -1369,7 +1370,8 @@ function acf_duplicate_fields( $fields = array(), $parent_id = 0 ) {
// Duplicate fields.
foreach( $fields as $field ) {
$duplicates[] = acf_duplicate_field( $field['ID'], $parent_id );
$field_id = $field['ID'] ? $field['ID'] : $field['key'];
$duplicates[] = acf_duplicate_field( $field_id, $parent_id );
}
// Return.

View File

@ -455,7 +455,7 @@ function acf_get_field_group_visibility( $field_group, $args = array() ) {
// Loop over rules and determine if all rules match.
$match_group = true;
foreach( $group as $rule ) {
if( !acf_match_location_rule( $rule, $screen ) ) {
if( !acf_match_location_rule( $rule, $screen, $field_group ) ) {
$match_group = false;
break;
}

View File

@ -223,3 +223,66 @@ function acf_enable_filters( $filters = array() ) {
// Return prev state.
return $prev_state;
}
/**
* acf_idval
*
* Parses the provided value for an ID.
*
* @date 29/3/19
* @since 5.7.14
*
* @param mixed $value A value to parse.
* @return int
*/
function acf_idval( $value ) {
// Check if value is numeric.
if( is_numeric($value) ) {
return (int) $value;
// Check if value is array.
} elseif( is_array($value) ) {
return (int) isset($value['ID']) ? $value['ID'] : 0;
// Check if value is object.
} elseif( is_object($value) ) {
return (int) isset($value->ID) ? $value->ID : 0;
}
// Return default.
return 0;
}
/**
* acf_maybe_idval
*
* Checks value for potential id value.
*
* @date 6/4/19
* @since 5.7.14
*
* @param mixed $value A value to parse.
* @return mixed
*/
function acf_maybe_idval( $value ) {
if( $id = acf_idval( $value ) ) {
return $id;
}
return $value;
}
/**
* acf_numericval
*
* Casts the provided value as eiter an int or float using a simple hack.
*
* @date 11/4/19
* @since 5.7.14
*
* @param mixed $value A value to parse.
* @return (int|float)
*/
function acf_numval( $value ) {
return ( intval($value) == floatval($value) ) ? intval($value) : floatval($value);
}

View File

@ -73,9 +73,9 @@ function acf_decode_post_id( $post_id = 0 ) {
function acf_get_meta( $post_id = 0 ) {
// Allow filter to short-circuit load_value logic.
$pre = apply_filters( "acf/pre_load_meta", null, $post_id );
if( $pre !== null ) {
return $pre;
$null = apply_filters( "acf/pre_load_meta", null, $post_id );
if( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null;
}
// Decode $post_id for $type and $id.
@ -178,9 +178,9 @@ function acf_get_option_meta( $prefix = '' ) {
function acf_get_metadata( $post_id = 0, $name = '', $hidden = false ) {
// Allow filter to short-circuit logic.
$pre = apply_filters( "acf/pre_load_metadata", null, $post_id, $name, $hidden );
if( $pre !== null ) {
return $pre;
$null = apply_filters( "acf/pre_load_metadata", null, $post_id, $name, $hidden );
if( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null;
}
// Decode $post_id for $type and $id.

View File

@ -68,7 +68,7 @@ function acf_idify( $str = '' ) {
*/
function acf_slugify( $str = '' ) {
return str_replace('_', '-', strtolower($str));
return str_replace(array('_', '/', ' '), '-', strtolower($str));
}
/**
@ -572,7 +572,7 @@ function acf_parse_type( $v ) {
$v = trim( $v );
// Convert int strings to int ("123" = 123).
if( is_numeric($v) && strpos($v, '.') === false ) {
if( is_numeric($v) && strval(intval($v)) === $v ) {
$v = intval( $v );
}
}
@ -1085,39 +1085,29 @@ function acf_get_image_size( $s = '' ) {
}
/*
* acf_version_compare
*
* This function will compare version left v right
*
* @type function
* @date 21/11/16
* @since 5.5.0
*
* @param $compare (string)
* @param $version (string)
* @return (boolean)
*/
function acf_version_compare( $left = 'wp', $compare = '>', $right = '1' ) {
/**
* acf_version_compare
*
* Similar to the version_compare() function but with extra functionality.
*
* @date 21/11/16
* @since 5.5.0
*
* @param string $left The left version number.
* @param string $compare The compare operator.
* @param string $right The right version number.
* @return bool
*/
function acf_version_compare( $left = '', $compare = '>', $right = '' ) {
// global
global $wp_version;
// Detect 'wp' placeholder.
if( $left === 'wp' ) {
global $wp_version;
$left = $wp_version;
}
// wp
if( $left === 'wp' ) $left = $wp_version;
// remove '-beta1' or '-RC1'
$left = acf_get_full_version($left);
$right = acf_get_full_version($right);
// return
// Return result.
return version_compare( $left, $right, $compare );
}
@ -1483,28 +1473,24 @@ function acf_get_numeric( $value = '' ) {
}
/*
* acf_get_posts
*
* This function will return an array of posts making sure the order is correct
*
* @type function
* @date 3/03/2015
* @since 5.1.5
*
* @param $args (array)
* @return (array)
*/
/**
* acf_get_posts
*
* Similar to the get_posts() function but with extra functionality.
*
* @date 3/03/15
* @since 5.1.5
*
* @param array $args The query args.
* @return array
*/
function acf_get_posts( $args = array() ) {
// vars
// Vars.
$posts = array();
// defaults
// leave suppress_filters as true becuase we don't want any plugins to modify the query as we know exactly what
$args = wp_parse_args( $args, array(
// Apply default args.
$args = wp_parse_args($args, array(
'posts_per_page' => -1,
'post_type' => '',
'post_status' => 'any',
@ -1512,69 +1498,35 @@ function acf_get_posts( $args = array() ) {
'update_post_term_cache' => false
));
// post type
if( empty($args['post_type']) ) {
// Avoid default 'post' post_type by providing all public types.
if( !$args['post_type'] ) {
$args['post_type'] = acf_get_post_types();
}
// validate post__in
// Check if specifc post ID's have been provided.
if( $args['post__in'] ) {
// force value to array
$args['post__in'] = acf_get_array( $args['post__in'] );
// convert to int
$args['post__in'] = array_map('intval', $args['post__in']);
// add filter to remove post_type
// use 'query' filter so that 'suppress_filters' can remain true
//add_filter('query', '_acf_query_remove_post_type');
// order by post__in
$args['orderby'] = 'post__in';
// Clean value into an array of IDs.
$args['post__in'] = array_map('intval', acf_array($args['post__in']));
}
// Query posts.
$posts = get_posts( $args );
// load posts in 1 query to save multiple DB calls from following code
$posts = get_posts($args);
// Remove any potential empty results.
$posts = array_filter( $posts );
// remove this filter (only once)
//remove_filter('query', '_acf_query_remove_post_type');
// validate order
// Manually order results.
if( $posts && $args['post__in'] ) {
// vars
$order = array();
// generate sort order
foreach( $posts as $i => $post ) {
$order[ $i ] = array_search($post->ID, $args['post__in']);
$order[ $i ] = array_search( $post->ID, $args['post__in'] );
}
// sort
array_multisort($order, $posts);
}
// return
// Return posts.
return $posts;
}
@ -2136,91 +2088,19 @@ function acf_get_grouped_users( $args = array() ) {
}
/*
* acf_json_encode
*
* This function will return pretty JSON for all PHP versions
*
* @type function
* @date 6/03/2014
* @since 5.0.0
*
* @param $json (array)
* @return (string)
*/
/**
* acf_json_encode
*
* Returns json_encode() ready for file / database use.
*
* @date 29/4/19
* @since 5.0.0
*
* @param array $json The array of data to encode.
* @return string
*/
function acf_json_encode( $json ) {
// PHP at least 5.4
if( version_compare(PHP_VERSION, '5.4.0', '>=') ) {
return json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
}
// PHP less than 5.4
$json = json_encode($json);
// http://snipplr.com/view.php?codeview&id=60559
$result = '';
$pos = 0;
$strLen = strlen($json);
$indentStr = " ";
$newLine = "\n";
$prevChar = '';
$outOfQuotes = true;
for ($i=0; $i<=$strLen; $i++) {
// Grab the next character in the string.
$char = substr($json, $i, 1);
// Are we inside a quoted string?
if ($char == '"' && $prevChar != '\\') {
$outOfQuotes = !$outOfQuotes;
// If this character is the end of an element,
// output a new line and indent the next line.
} else if(($char == '}' || $char == ']') && $outOfQuotes) {
$result .= $newLine;
$pos --;
for ($j=0; $j<$pos; $j++) {
$result .= $indentStr;
}
}
// Add the character to the result string.
$result .= $char;
// If this character is ':' adda space after it
if($char == ':' && $outOfQuotes) {
$result .= ' ';
}
// If the last character was the beginning of an element,
// output a new line and indent the next line.
if (($char == ',' || $char == '{' || $char == '[') && $outOfQuotes) {
$result .= $newLine;
if ($char == '{' || $char == '[') {
$pos ++;
}
for ($j = 0; $j < $pos; $j++) {
$result .= $indentStr;
}
}
$prevChar = $char;
}
// return
return $result;
return json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
}

View File

@ -357,37 +357,19 @@ class acf_field_file extends acf_field {
function update_value( $value, $post_id, $field ) {
// bail early if is empty
if( empty($value) ) return false;
// validate
if( is_array($value) && isset($value['ID']) ) {
$value = $value['ID'];
} elseif( is_object($value) && isset($value->ID) ) {
$value = $value->ID;
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// Parse value for id.
$attachment_id = acf_idval( $value );
// bail early if not attachment ID
if( !$value || !is_numeric($value) ) return false;
// confirm type
$value = (int) $value;
// maybe connect attacment to post
acf_connect_attachment_to_post( $value, $post_id );
// return
return $value;
// Connect attacment to post.
acf_connect_attachment_to_post( $attachment_id, $post_id );
// Return id.
return $attachment_id;
}

View File

@ -294,18 +294,15 @@ class acf_field_google_map extends acf_field {
*/
function update_value( $value, $post_id, $field ) {
if( empty($value) || empty($value['lat']) || empty($value['lng']) ) {
return false;
}
// Check if value is an empty array and convert to empty string.
if( empty($value) || empty($value['lat']) ) {
$value = "";
}
// return
return $value;
}
}

View File

@ -267,20 +267,15 @@ class acf_field_link extends acf_field {
*/
function update_value( $value, $post_id, $field ) {
// URL is required
if( empty($value) || empty($value['url']) ) {
return false;
}
// Check if value is an empty array and convert to empty string.
if( empty($value) || empty($value['url']) ) {
$value = "";
}
// return
return $value;
}
}

View File

@ -631,42 +631,25 @@ class acf_field_page_link extends acf_field {
function update_value( $value, $post_id, $field ) {
// validate
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// format
if( is_array($value) ) {
// array
foreach( $value as $k => $v ){
// object?
if( is_object($v) && isset($v->ID) )
{
$value[ $k ] = $v->ID;
}
}
// save value as strings, so we can clearly search for them in SQL LIKE statements
// Format array of values.
// - ensure each value is an id.
// - Parse each id as string for SQL LIKE queries.
if( acf_is_sequential_array($value) ) {
$value = array_map('acf_maybe_idval', $value);
$value = array_map('strval', $value);
} elseif( is_object($value) && isset($value->ID) ) {
// object
$value = $value->ID;
// Parse single value for id.
} else {
$value = acf_maybe_idval( $value );
}
// return
// Return value.
return $value;
}
}

View File

@ -535,44 +535,25 @@ class acf_field_post_object extends acf_field {
function update_value( $value, $post_id, $field ) {
// validate
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// format
if( is_array($value) ) {
// array
foreach( $value as $k => $v ){
// object?
if( is_object($v) && isset($v->ID) ) {
$value[ $k ] = $v->ID;
}
}
// save value as strings, so we can clearly search for them in SQL LIKE statements
// Format array of values.
// - ensure each value is an id.
// - Parse each id as string for SQL LIKE queries.
if( acf_is_sequential_array($value) ) {
$value = array_map('acf_idval', $value);
$value = array_map('strval', $value);
} elseif( is_object($value) && isset($value->ID) ) {
// object
$value = $value->ID;
// Parse single value for id.
} else {
$value = acf_idval( $value );
}
// return
// Return value.
return $value;
}

View File

@ -111,7 +111,7 @@ class acf_field_relationship extends acf_field {
function get_ajax_query( $options = array() ) {
// defaults
$options = acf_parse_args($options, array(
$options = wp_parse_args($options, array(
'post_id' => 0,
's' => '',
'field_key' => '',
@ -135,7 +135,7 @@ class acf_field_relationship extends acf_field {
// paged
$args['posts_per_page'] = 20;
$args['paged'] = $options['paged'];
$args['paged'] = intval($options['paged']);
// search
@ -754,38 +754,25 @@ class acf_field_relationship extends acf_field {
function update_value( $value, $post_id, $field ) {
// validate
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// Format array of values.
// - ensure each value is an id.
// - Parse each id as string for SQL LIKE queries.
if( acf_is_sequential_array($value) ) {
$value = array_map('acf_idval', $value);
$value = array_map('strval', $value);
// force value to array
$value = acf_get_array( $value );
// array
foreach( $value as $k => $v ){
// object?
if( is_object($v) && isset($v->ID) ) {
$value[ $k ] = $v->ID;
}
// Parse single value for id.
} else {
$value = acf_idval( $value );
}
// save value as strings, so we can clearly search for them in SQL LIKE statements
$value = array_map('strval', $value);
// return
// Return value.
return $value;
}
}

View File

@ -509,23 +509,17 @@ class acf_field_select extends acf_field {
function update_value( $value, $post_id, $field ) {
// validate
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// array
// Format array of values.
// - Parse each value as string for SQL LIKE queries.
if( is_array($value) ) {
// save value as strings, so we can clearly search for them in SQL LIKE statements
$value = array_map('strval', $value);
}
// return
return $value;
}

View File

@ -442,23 +442,25 @@ class acf_field_user extends acf_field {
*/
function update_value( $value, $post_id, $field ) {
// array?
if( is_array($value) && isset($value['ID']) ) {
$value = $value['ID'];
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// object?
if( is_object($value) && isset($value->ID) ) {
// Format array of values.
// - ensure each value is an id.
// - Parse each id as string for SQL LIKE queries.
if( acf_is_sequential_array($value) ) {
$value = array_map('acf_idval', $value);
$value = array_map('strval', $value);
$value = $value->ID;
// Parse single value for id.
} else {
$value = acf_idval( $value );
}
// return
// Return value.
return $value;
}

View File

@ -45,6 +45,9 @@ class ACF_Form_Gutenberg {
// Call edit_form_after_title manually.
add_action( 'block_editor_meta_box_hidden_fields', array($this, 'block_editor_meta_box_hidden_fields') );
// Cusotmize editor metaboxes.
add_filter( 'filter_block_editor_meta_boxes', array($this, 'filter_block_editor_meta_boxes') );
}
/**
@ -79,35 +82,47 @@ class ACF_Form_Gutenberg {
// Manually call 'edit_form_after_title' function.
acf_get_instance('ACF_Form_Post')->edit_form_after_title();
}
/**
* filter_block_editor_meta_boxes
*
* description
*
* @date 5/4/19
* @since 5.7.14
*
* @param type $var Description. Default.
* @return type Description.
*/
function filter_block_editor_meta_boxes( $wp_meta_boxes ) {
// Add inline script.
?>
<script type="text/javascript">
(function($) {
// Globals
global $current_screen;
// Move 'acf_after_title' metaboxes into 'normal' location.
if( isset($wp_meta_boxes[ $current_screen->id ][ 'acf_after_title' ]) ) {
// Wait until prepare.
acf.addAction('prepare', function(){
// Append custom sortables before normal sortables (within the normal metabox)
$('#normal-sortables').before( $('#acf_after_title-sortables') );
}, 1);
// Extract locations.
$locations = $wp_meta_boxes[ $current_screen->id ];
// Wait until load.
acf.addAction('load', function(){
// Refresh metaboxes to show 'acf_after_title' area.
acf.screen.refreshAvailableMetaBoxesPerLocation();
}, 1);
// Ensure normal location exists.
if( !isset($locations['normal']) ) $locations['normal'] = array();
if( !isset($locations['normal']['high']) ) $locations['normal']['high'] = array();
// Disable unload
acf.unload.disable();
// Append metaboxes.
foreach( $locations['acf_after_title'] as $priority => $meta_boxes ) {
$locations['normal']['high'] = array_merge( $meta_boxes, $locations['normal']['high'] );
}
})(jQuery);
</script>
<?php
}
// Update original data.
$wp_meta_boxes[ $current_screen->id ] = $locations;
unset( $wp_meta_boxes[ $current_screen->id ]['acf_after_title'] );
}
// Return
return $wp_meta_boxes;
}
/**
* acf_validate_save_post

254
includes/local-meta.php Normal file
View File

@ -0,0 +1,254 @@
<?php
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if( ! class_exists('ACF_Local_Meta') ) :
class ACF_Local_Meta {
/** @var array Storage for meta data. */
var $meta = array();
/** @var mixed Storage for the current post_id. */
var $post_id = 0;
/**
* __construct
*
* Sets up the class functionality.
*
* @date 8/10/18
* @since 5.8.0
*
* @param void
* @return void
*/
function __construct() {
// add filters
add_filter( 'acf/pre_load_post_id', array($this, 'pre_load_post_id'), 1, 2 );
add_filter( 'acf/pre_load_meta', array($this, 'pre_load_meta'), 1, 2 );
add_filter( 'acf/pre_load_metadata', array($this, 'pre_load_metadata'), 1, 4 );
}
/**
* add
*
* Adds postmeta to storage.
* Accepts data in either raw or request format.
*
* @date 8/10/18
* @since 5.8.0
*
* @param array $meta An array of metdata to store.
* @param mixed $post_id The post_id for this data.
* @param bool $is_main Makes this postmeta visible to get_field() without a $post_id value.
* @return array
*/
function add( $meta = array(), $post_id = 0, $is_main = false ) {
// Capture meta if supplied meta is from a REQUEST.
if( $this->is_request($meta) ) {
$meta = $this->capture( $meta, $post_id );
}
// Add to storage.
$this->meta[ $post_id ] = $meta;
// Set $post_id reference when is the "main" postmeta.
if( $is_main ) {
$this->post_id = $post_id;
}
// Return meta.
return $meta;
}
/**
* is_request
*
* Returns true if the supplied $meta is from a REQUEST (serialized <form> data).
*
* @date 11/3/19
* @since 5.7.14
*
* @param array $meta An array of metdata to check.
* @return bool
*/
function is_request( $meta = array() ) {
return acf_is_field_key( key( $meta ) );
}
/**
* capture
*
* Returns a flattened array of meta for the given postdata.
* This is achieved by simulating a save whilst capturing all meta changes.
*
* @date 26/2/19
* @since 5.7.13
*
* @param array $values An array of raw values.
* @param mixed $post_id The post_id for this data.
* @return array
*/
function capture( $values = array(), $post_id = 0 ) {
// Reset meta.
$this->meta[ $post_id ] = array();
// Listen for any added meta.
add_filter('acf/pre_update_metadata', array($this, 'capture_update_metadata'), 1, 5);
// Simulate update.
if( $values ) {
acf_update_values( $values, $post_id );
}
// Remove listener filter.
remove_filter('acf/pre_update_metadata', array($this, 'capture_update_metadata'), 1, 5);
// Return meta.
return $this->meta[ $post_id ];
}
/**
* capture_update_metadata
*
* Records all meta activity and returns a non null value to bypass DB updates.
*
* @date 26/2/19
* @since 5.7.13
*
* @param null $null .
* @param (int|string) $post_id The post id.
* @param string $name The meta name.
* @param mixed $value The meta value.
* @param bool $hidden If the meta is hidden (starts with an underscore).
* @return false.
*/
function capture_update_metadata( $null, $post_id, $name, $value, $hidden ) {
$name = ($hidden ? '_' : '') . $name;
$this->meta[ $post_id ][ $name ] = $value;
// Return non null value to escape update process.
return true;
}
/**
* remove
*
* Removes postmeta from storage.
*
* @date 8/10/18
* @since 5.8.0
*
* @param mixed $post_id The post_id for this data.
* @return void
*/
function remove( $post_id = 0 ) {
// unset meta
unset( $this->meta[ $post_id ] );
// reset post_id
if( $post_id === $this->post_id ) {
$this->post_id = 0;
}
}
/**
* pre_load_meta
*
* Injects the local meta.
*
* @date 8/10/18
* @since 5.8.0
*
* @param null $null An empty parameter. Return a non null value to short-circuit the function.
* @param mixed $post_id The post_id for this data.
* @return mixed
*/
function pre_load_meta( $null, $post_id ) {
if( isset($this->meta[ $post_id ]) ) {
return $this->meta[ $post_id ];
}
return $null;
}
/**
* pre_load_metadata
*
* Injects the local meta.
*
* @date 8/10/18
* @since 5.8.0
*
* @param null $null An empty parameter. Return a non null value to short-circuit the function.
* @param (int|string) $post_id The post id.
* @param string $name The meta name.
* @param bool $hidden If the meta is hidden (starts with an underscore).
* @return mixed
*/
function pre_load_metadata( $null, $post_id, $name, $hidden ) {
$name = ($hidden ? '_' : '') . $name;
if( isset($this->meta[ $post_id ]) ) {
if( isset($this->meta[ $post_id ][ $name ]) ) {
return $this->meta[ $post_id ][ $name ];
}
return '__return_null';
}
return $null;
}
/**
* pre_load_post_id
*
* Injects the local post_id.
*
* @date 8/10/18
* @since 5.8.0
*
* @param null $null An empty parameter. Return a non null value to short-circuit the function.
* @param mixed $post_id The post_id for this data.
* @return mixed
*/
function pre_load_post_id( $null, $post_id ) {
if( !$post_id && $this->post_id ) {
return $this->post_id;
}
return $null;
}
}
endif; // class_exists check
/**
* acf_setup_meta
*
* Adds postmeta to storage.
*
* @date 8/10/18
* @since 5.8.0
* @see ACF_Local_Meta::add() for list of parameters.
*
* @return array
*/
function acf_setup_meta( $meta = array(), $post_id = 0, $is_main = false ) {
return acf_get_instance('ACF_Local_Meta')->add( $meta, $post_id, $is_main );
}
/**
* acf_reset_meta
*
* Removes postmeta to storage.
*
* @date 8/10/18
* @since 5.8.0
* @see ACF_Local_Meta::remove() for list of parameters.
*
* @return void
*/
function acf_reset_meta( $post_id = 0 ) {
return acf_get_instance('ACF_Local_Meta')->remove( $post_id );
}

View File

@ -302,17 +302,17 @@ function acf_get_location_rule_values( $rule ) {
* @return (boolean)
*/
function acf_match_location_rule( $rule, $screen ) {
function acf_match_location_rule( $rule, $screen, $field_group ) {
// vars
$result = false;
// filter
$result = apply_filters( "acf/location/match_rule/type={$rule['param']}", $result, $rule, $screen );
$result = apply_filters( "acf/location/match_rule", $result, $rule, $screen );
$result = apply_filters( "acf/location/rule_match/{$rule['param']}", $result, $rule, $screen );
$result = apply_filters( "acf/location/rule_match", $result, $rule, $screen );
$result = apply_filters( "acf/location/match_rule/type={$rule['param']}", $result, $rule, $screen, $field_group );
$result = apply_filters( "acf/location/match_rule", $result, $rule, $screen, $field_group );
$result = apply_filters( "acf/location/rule_match/{$rule['param']}", $result, $rule, $screen, $field_group );
$result = apply_filters( "acf/location/rule_match", $result, $rule, $screen, $field_group );
// return

Binary file not shown.

View File

@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Advanced Custom Fields Pro v5.7.11\n"
"Project-Id-Version: Advanced Custom Fields Pro v5.8\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2019-01-31 12:36+0100\n"
"PO-Revision-Date: 2019-02-01 01:54+0100\n"
"POT-Creation-Date: 2019-05-02 00:07+0200\n"
"PO-Revision-Date: 2019-05-02 00:32+0200\n"
"Last-Translator: Ralf Koller <r.koller@gmail.com>\n"
"Language-Team: Ralf Koller <r.koller@gmail.com>\n"
"Language: de_DE\n"
@ -39,7 +39,7 @@ msgstr "Feldgruppe"
# @ acf
#: acf.php:365 acf.php:397 includes/admin/admin.php:59
#: pro/fields/class-acf-field-flexible-content.php:572
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New"
msgstr "Erstellen"
@ -80,7 +80,7 @@ msgstr "Keine Feldgruppen im Papierkorb gefunden"
# @ acf
#: acf.php:395 includes/admin/admin-field-group.php:220
#: includes/admin/admin-field-groups.php:529
#: includes/admin/admin-field-groups.php:530
#: pro/fields/class-acf-field-clone.php:811
msgid "Fields"
msgstr "Felder"
@ -126,7 +126,7 @@ msgid "No Fields found in Trash"
msgstr "Keine Felder im Papierkorb gefunden"
#: acf.php:443 includes/admin/admin-field-group.php:402
#: includes/admin/admin-field-groups.php:586
#: includes/admin/admin-field-groups.php:587
msgid "Inactive"
msgstr "Inaktiv"
@ -138,7 +138,7 @@ msgstr[0] "Inaktiv <span class=\"count\">(%s)</span>"
msgstr[1] "Inaktiv <span class=\"count\">(%s)</span>"
# @ acf
#: includes/acf-field-functions.php:823
#: includes/acf-field-functions.php:828
#: includes/admin/admin-field-group.php:178
msgid "(no label)"
msgstr "(keine Beschriftung)"
@ -216,7 +216,7 @@ msgstr "Es liegen keine Auswahl-Feldtypen vor"
# @ acf
#: includes/admin/admin-field-group.php:176
msgid "Move Custom Field"
msgstr "Benutzerdefiniertes Feld verschieben"
msgstr "Individuelles Feld verschieben"
# @ acf
#: includes/admin/admin-field-group.php:177
@ -234,7 +234,7 @@ msgstr "(dieses Feld)"
#: includes/admin/views/field-group-field-conditional-logic.php:151
#: includes/admin/views/field-group-locations.php:29
#: includes/admin/views/html-location-group.php:3
#: includes/api/api-helpers.php:3990
#: includes/api/api-helpers.php:3862
msgid "or"
msgstr "oder"
@ -312,19 +312,19 @@ msgstr[0] "Field group synchronised."
msgstr[1] "%s Feldgruppen synchronisiert."
# @ acf
#: includes/admin/admin-field-groups.php:413
#: includes/admin/admin-field-groups.php:576
#: includes/admin/admin-field-groups.php:414
#: includes/admin/admin-field-groups.php:577
msgid "Sync available"
msgstr "Synchronisierung verfügbar"
# @ acf
#: includes/admin/admin-field-groups.php:526 includes/forms/form-front.php:38
#: includes/admin/admin-field-groups.php:527 includes/forms/form-front.php:38
#: pro/fields/class-acf-field-gallery.php:372
msgid "Title"
msgstr "Titel"
# @ acf
#: includes/admin/admin-field-groups.php:527
#: includes/admin/admin-field-groups.php:528
#: includes/admin/views/field-group-options.php:96
#: includes/admin/views/html-admin-page-upgrade-network.php:38
#: includes/admin/views/html-admin-page-upgrade-network.php:49
@ -332,7 +332,7 @@ msgstr "Titel"
msgid "Description"
msgstr "Beschreibung"
#: includes/admin/admin-field-groups.php:528
#: includes/admin/admin-field-groups.php:529
msgid "Status"
msgstr "Status"
@ -392,7 +392,7 @@ msgstr "Dieses Element duplizieren"
#: includes/admin/admin-field-groups.php:686
#: includes/admin/admin-field-groups.php:702
#: includes/admin/views/field-group-field.php:46
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate"
msgstr "Duplizieren"
@ -450,7 +450,7 @@ msgstr "Übersicht Websites & Upgrades"
# @ acf
#: includes/admin/admin.php:54 includes/admin/views/field-group-options.php:110
msgid "Custom Fields"
msgstr "Eigene Felder"
msgstr "Individuelle Felder"
# @ acf
#: includes/admin/settings-info.php:50
@ -612,8 +612,8 @@ msgstr "Regelgruppe hinzufügen"
# @ acf
#: includes/admin/views/field-group-field.php:38
#: pro/fields/class-acf-field-flexible-content.php:424
#: pro/fields/class-acf-field-repeater.php:294
#: pro/fields/class-acf-field-flexible-content.php:410
#: pro/fields/class-acf-field-repeater.php:299
msgid "Drag to reorder"
msgstr "Ziehen zum Sortieren"
@ -654,7 +654,7 @@ msgstr "Feld löschen"
# @ acf
#: includes/admin/views/field-group-field.php:48
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete"
msgstr "Löschen"
@ -737,14 +737,14 @@ msgstr "Reihenfolge"
#: includes/fields/class-acf-field-checkbox.php:420
#: includes/fields/class-acf-field-radio.php:311
#: includes/fields/class-acf-field-select.php:433
#: pro/fields/class-acf-field-flexible-content.php:596
#: pro/fields/class-acf-field-flexible-content.php:582
msgid "Label"
msgstr "Beschriftung"
# @ acf
#: includes/admin/views/field-group-fields.php:6
#: includes/fields/class-acf-field-taxonomy.php:939
#: pro/fields/class-acf-field-flexible-content.php:610
#: pro/fields/class-acf-field-flexible-content.php:596
msgid "Name"
msgstr "Name"
@ -1459,69 +1459,69 @@ msgid "We think you'll love the changes in %s."
msgstr "Wir glauben Du wirst die Änderungen in %s lieben."
# @ acf
#: includes/api/api-helpers.php:1011
#: includes/api/api-helpers.php:1003
msgid "Thumbnail"
msgstr "Miniaturbild"
# @ acf
#: includes/api/api-helpers.php:1012
#: includes/api/api-helpers.php:1004
msgid "Medium"
msgstr "Mittel"
# @ acf
#: includes/api/api-helpers.php:1013
#: includes/api/api-helpers.php:1005
msgid "Large"
msgstr "Groß"
# @ acf
#: includes/api/api-helpers.php:1062
#: includes/api/api-helpers.php:1054
msgid "Full Size"
msgstr "Volle Größe"
# @ acf
#: includes/api/api-helpers.php:1831 includes/api/api-term.php:147
#: includes/api/api-helpers.php:1775 includes/api/api-term.php:147
#: pro/fields/class-acf-field-clone.php:996
msgid "(no title)"
msgstr "(ohne Titel)"
# @ acf
#: includes/api/api-helpers.php:3911
#: includes/api/api-helpers.php:3783
#, php-format
msgid "Image width must be at least %dpx."
msgstr "Die Breite des Bildes muss mindestens %dpx sein."
# @ acf
#: includes/api/api-helpers.php:3916
#: includes/api/api-helpers.php:3788
#, php-format
msgid "Image width must not exceed %dpx."
msgstr "Die Breite des Bildes darf %dpx nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3932
#: includes/api/api-helpers.php:3804
#, php-format
msgid "Image height must be at least %dpx."
msgstr "Die Höhe des Bildes muss mindestens %dpx sein."
# @ acf
#: includes/api/api-helpers.php:3937
#: includes/api/api-helpers.php:3809
#, php-format
msgid "Image height must not exceed %dpx."
msgstr "Die Höhe des Bild darf %dpx nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3955
#: includes/api/api-helpers.php:3827
#, php-format
msgid "File size must be at least %s."
msgstr "Die Dateigröße muss mindestens %s sein."
# @ acf
#: includes/api/api-helpers.php:3960
#: includes/api/api-helpers.php:3832
#, php-format
msgid "File size must must not exceed %s."
msgstr "Die Dateigröße darf %s nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3994
#: includes/api/api-helpers.php:3866
#, php-format
msgid "File type must be %s."
msgstr "Der Dateityp muss %s sein."
@ -1717,9 +1717,9 @@ msgstr "jQuery"
#: includes/fields/class-acf-field-group.php:474
#: includes/fields/class-acf-field-radio.php:290
#: pro/fields/class-acf-field-clone.php:843
#: pro/fields/class-acf-field-flexible-content.php:567
#: pro/fields/class-acf-field-flexible-content.php:616
#: pro/fields/class-acf-field-repeater.php:443
#: pro/fields/class-acf-field-flexible-content.php:553
#: pro/fields/class-acf-field-flexible-content.php:602
#: pro/fields/class-acf-field-repeater.php:448
msgid "Layout"
msgstr "Layout"
@ -1901,20 +1901,19 @@ msgstr "Neue Auswahlmöglichkeit hinzufügen"
#: includes/fields/class-acf-field-checkbox.php:353
msgid "Allow Custom"
msgstr "Benutzerdefinierte Werte erlauben"
msgstr "Individuelle Werte erlauben"
#: includes/fields/class-acf-field-checkbox.php:358
msgid "Allow 'custom' values to be added"
msgstr "Erlaubt das Hinzufügen benutzerdefinierter Werte"
msgstr "Erlaubt das Hinzufügen individueller Werte"
#: includes/fields/class-acf-field-checkbox.php:364
msgid "Save Custom"
msgstr "Benutzerdefinierte Werte speichern"
msgstr "Individuelle Werte speichern"
#: includes/fields/class-acf-field-checkbox.php:369
msgid "Save 'custom' values to the field's choices"
msgstr ""
"Benutzerdefinierte Werte unter den Auswahlmöglichkeiten des Feldes speichern"
msgstr "Individuelle Werte unter den Auswahlmöglichkeiten des Feldes speichern"
# @ acf
#: includes/fields/class-acf-field-checkbox.php:381
@ -2007,7 +2006,7 @@ msgstr "Das Format für die Anzeige in der Bearbeitungsansicht"
#: includes/fields/class-acf-field-time_picker.php:117
#: includes/fields/class-acf-field-time_picker.php:132
msgid "Custom:"
msgstr "Benutzerdefiniert:"
msgstr "Individuelles Format:"
#: includes/fields/class-acf-field-date_picker.php:197
msgid "Save Format"
@ -2256,6 +2255,7 @@ msgstr "Beschränkt die Auswahl in der Mediathek"
#: includes/locations/class-acf-location-user-role.php:111
#: includes/locations/class-acf-location-widget.php:83
#: pro/fields/class-acf-field-gallery.php:679
#: pro/locations/class-acf-location-block.php:79
msgid "All"
msgstr "Alle"
@ -2371,7 +2371,7 @@ msgstr "Gruppe"
# @ acf
#: includes/fields/class-acf-field-group.php:459
#: pro/fields/class-acf-field-repeater.php:379
#: pro/fields/class-acf-field-repeater.php:384
msgid "Sub Fields"
msgstr "Unterfelder"
@ -2383,24 +2383,25 @@ msgstr "Gibt die Art an wie die ausgewählten Felder ausgegeben werden sollen"
# @ acf
#: includes/fields/class-acf-field-group.php:480
#: pro/fields/class-acf-field-clone.php:849
#: pro/fields/class-acf-field-flexible-content.php:627
#: pro/fields/class-acf-field-repeater.php:451
#: pro/fields/class-acf-field-flexible-content.php:613
#: pro/fields/class-acf-field-repeater.php:456
#: pro/locations/class-acf-location-block.php:27
msgid "Block"
msgstr "Block"
# @ acf
#: includes/fields/class-acf-field-group.php:481
#: pro/fields/class-acf-field-clone.php:850
#: pro/fields/class-acf-field-flexible-content.php:626
#: pro/fields/class-acf-field-repeater.php:450
#: pro/fields/class-acf-field-flexible-content.php:612
#: pro/fields/class-acf-field-repeater.php:455
msgid "Table"
msgstr "Tabelle"
# @ acf
#: includes/fields/class-acf-field-group.php:482
#: pro/fields/class-acf-field-clone.php:851
#: pro/fields/class-acf-field-flexible-content.php:628
#: pro/fields/class-acf-field-repeater.php:452
#: pro/fields/class-acf-field-flexible-content.php:614
#: pro/fields/class-acf-field-repeater.php:457
msgid "Row"
msgstr "Reihe"
@ -3490,6 +3491,14 @@ msgstr "Erneut suchen"
msgid "Upgrade Notice"
msgstr "Aktualisierungs-Hinweis"
#: pro/blocks.php:371
msgid "Switch to Edit"
msgstr "Zum Bearbeiten wechseln"
#: pro/blocks.php:372
msgid "Switch to Preview"
msgstr "Zur Vorschau wechseln"
#: pro/fields/class-acf-field-clone.php:25
msgctxt "noun"
msgid "Clone"
@ -3552,14 +3561,14 @@ msgstr "Alle Felder der Feldgruppe %s"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:31
#: pro/fields/class-acf-field-repeater.php:193
#: pro/fields/class-acf-field-repeater.php:463
#: pro/fields/class-acf-field-repeater.php:468
msgid "Add Row"
msgstr "Eintrag hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:73
#: pro/fields/class-acf-field-flexible-content.php:938
#: pro/fields/class-acf-field-flexible-content.php:1020
#: pro/fields/class-acf-field-flexible-content.php:924
#: pro/fields/class-acf-field-flexible-content.php:1006
msgid "layout"
msgid_plural "layouts"
msgstr[0] "Layout"
@ -3572,8 +3581,8 @@ msgstr "Einträge"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:77
#: pro/fields/class-acf-field-flexible-content.php:937
#: pro/fields/class-acf-field-flexible-content.php:1019
#: pro/fields/class-acf-field-flexible-content.php:923
#: pro/fields/class-acf-field-flexible-content.php:1005
msgid "This field requires at least {min} {label} {identifier}"
msgstr "Dieses Feld erfordert mindestens {min} {label} {identifier}"
@ -3598,74 +3607,74 @@ msgid "Flexible Content requires at least 1 layout"
msgstr "Flexibler Inhalt benötigt mindestens ein Layout"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:302
#: pro/fields/class-acf-field-flexible-content.php:287
#, php-format
msgid "Click the \"%s\" button below to start creating your layout"
msgstr "Klicke \"%s\" zum Erstellen des Layouts"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:427
#: pro/fields/class-acf-field-flexible-content.php:413
msgid "Add layout"
msgstr "Layout hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:428
#: pro/fields/class-acf-field-flexible-content.php:414
msgid "Remove layout"
msgstr "Layout entfernen"
#: pro/fields/class-acf-field-flexible-content.php:429
#: pro/fields/class-acf-field-repeater.php:296
#: pro/fields/class-acf-field-flexible-content.php:415
#: pro/fields/class-acf-field-repeater.php:301
msgid "Click to toggle"
msgstr "Zum Auswählen anklicken"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder Layout"
msgstr "Layout sortieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder"
msgstr "Sortieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete Layout"
msgstr "Layout löschen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate Layout"
msgstr "Layout duplizieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:572
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New Layout"
msgstr "Neues Layout hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:643
#: pro/fields/class-acf-field-flexible-content.php:629
msgid "Min"
msgstr "Min"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:656
#: pro/fields/class-acf-field-flexible-content.php:642
msgid "Max"
msgstr "Max"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:683
#: pro/fields/class-acf-field-repeater.php:459
#: pro/fields/class-acf-field-flexible-content.php:669
#: pro/fields/class-acf-field-repeater.php:464
msgid "Button Label"
msgstr "Button-Beschriftung"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:692
#: pro/fields/class-acf-field-flexible-content.php:678
msgid "Minimum Layouts"
msgstr "Mindestzahl an Layouts"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:701
#: pro/fields/class-acf-field-flexible-content.php:687
msgid "Maximum Layouts"
msgstr "Höchstzahl an Layouts"
@ -3755,7 +3764,7 @@ msgstr "Voranstellen"
# @ acf
#: pro/fields/class-acf-field-repeater.php:65
#: pro/fields/class-acf-field-repeater.php:656
#: pro/fields/class-acf-field-repeater.php:661
msgid "Minimum rows reached ({min} rows)"
msgstr "Mindestzahl der Einträge hat ({min} Reihen) erreicht"
@ -3765,31 +3774,31 @@ msgid "Maximum rows reached ({max} rows)"
msgstr "Höchstzahl der Einträge hat ({max} Reihen) erreicht"
# @ acf
#: pro/fields/class-acf-field-repeater.php:333
#: pro/fields/class-acf-field-repeater.php:338
msgid "Add row"
msgstr "Eintrag hinzufügen"
# @ acf
#: pro/fields/class-acf-field-repeater.php:334
#: pro/fields/class-acf-field-repeater.php:339
msgid "Remove row"
msgstr "Eintrag entfernen"
#: pro/fields/class-acf-field-repeater.php:412
#: pro/fields/class-acf-field-repeater.php:417
msgid "Collapsed"
msgstr "Zugeklappt"
#: pro/fields/class-acf-field-repeater.php:413
#: pro/fields/class-acf-field-repeater.php:418
msgid "Select a sub field to show when row is collapsed"
msgstr ""
"Wähle ein Unterfelder welches im zugeklappten Zustand angezeigt werden soll"
# @ acf
#: pro/fields/class-acf-field-repeater.php:423
#: pro/fields/class-acf-field-repeater.php:428
msgid "Minimum Rows"
msgstr "Mindestzahl der Einträge"
# @ acf
#: pro/fields/class-acf-field-repeater.php:433
#: pro/fields/class-acf-field-repeater.php:438
msgid "Maximum Rows"
msgstr "Höchstzahl der Einträge"
@ -3820,6 +3829,14 @@ msgstr ""
"informiere Dich bitte hier hinsichtlich der <a href=\"%s\" target=\"_blank"
"\">Preise und Einzelheiten</a>."
#: tests/basic/test-blocks.php:13
msgid "Testimonial"
msgstr "Testimonial"
#: tests/basic/test-blocks.php:14
msgid "A custom testimonial block."
msgstr "Ein individueller Testimonial-Block."
#. Plugin URI of the plugin/theme
msgid "https://www.advancedcustomfields.com/"
msgstr "https://www.advancedcustomfields.com/"

Binary file not shown.

View File

@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Advanced Custom Fields Pro v5.7.11 Formal\n"
"Project-Id-Version: Advanced Custom Fields Pro v5.8 Formal\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2019-01-31 12:36+0100\n"
"PO-Revision-Date: 2019-02-01 01:54+0100\n"
"POT-Creation-Date: 2019-05-02 00:08+0200\n"
"PO-Revision-Date: 2019-05-02 00:32+0200\n"
"Last-Translator: Ralf Koller <r.koller@gmail.com>\n"
"Language-Team: Ralf Koller <r.koller@gmail.com>\n"
"Language: de_DE\n"
@ -39,7 +39,7 @@ msgstr "Feldgruppe"
# @ acf
#: acf.php:365 acf.php:397 includes/admin/admin.php:59
#: pro/fields/class-acf-field-flexible-content.php:572
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New"
msgstr "Erstellen"
@ -80,7 +80,7 @@ msgstr "Keine Feldgruppen im Papierkorb gefunden"
# @ acf
#: acf.php:395 includes/admin/admin-field-group.php:220
#: includes/admin/admin-field-groups.php:529
#: includes/admin/admin-field-groups.php:530
#: pro/fields/class-acf-field-clone.php:811
msgid "Fields"
msgstr "Felder"
@ -126,7 +126,7 @@ msgid "No Fields found in Trash"
msgstr "Keine Felder im Papierkorb gefunden"
#: acf.php:443 includes/admin/admin-field-group.php:402
#: includes/admin/admin-field-groups.php:586
#: includes/admin/admin-field-groups.php:587
msgid "Inactive"
msgstr "Inaktiv"
@ -138,7 +138,7 @@ msgstr[0] "Inaktiv <span class=\"count\">(%s)</span>"
msgstr[1] "Inaktiv <span class=\"count\">(%s)</span>"
# @ acf
#: includes/acf-field-functions.php:823
#: includes/acf-field-functions.php:828
#: includes/admin/admin-field-group.php:178
msgid "(no label)"
msgstr "(keine Beschriftung)"
@ -216,7 +216,7 @@ msgstr "Es liegen keine Auswahl-Feldtypen vor"
# @ acf
#: includes/admin/admin-field-group.php:176
msgid "Move Custom Field"
msgstr "Benutzerdefiniertes Feld verschieben"
msgstr "Individuelles Feld verschieben"
# @ acf
#: includes/admin/admin-field-group.php:177
@ -234,7 +234,7 @@ msgstr "(dieses Feld)"
#: includes/admin/views/field-group-field-conditional-logic.php:151
#: includes/admin/views/field-group-locations.php:29
#: includes/admin/views/html-location-group.php:3
#: includes/api/api-helpers.php:3990
#: includes/api/api-helpers.php:3862
msgid "or"
msgstr "oder"
@ -312,19 +312,19 @@ msgstr[0] "Feldgruppe synchronisiert."
msgstr[1] "%s Feldgruppen synchronisiert."
# @ acf
#: includes/admin/admin-field-groups.php:413
#: includes/admin/admin-field-groups.php:576
#: includes/admin/admin-field-groups.php:414
#: includes/admin/admin-field-groups.php:577
msgid "Sync available"
msgstr "Synchronisierung verfügbar"
# @ acf
#: includes/admin/admin-field-groups.php:526 includes/forms/form-front.php:38
#: includes/admin/admin-field-groups.php:527 includes/forms/form-front.php:38
#: pro/fields/class-acf-field-gallery.php:372
msgid "Title"
msgstr "Titel"
# @ acf
#: includes/admin/admin-field-groups.php:527
#: includes/admin/admin-field-groups.php:528
#: includes/admin/views/field-group-options.php:96
#: includes/admin/views/html-admin-page-upgrade-network.php:38
#: includes/admin/views/html-admin-page-upgrade-network.php:49
@ -332,7 +332,7 @@ msgstr "Titel"
msgid "Description"
msgstr "Beschreibung"
#: includes/admin/admin-field-groups.php:528
#: includes/admin/admin-field-groups.php:529
msgid "Status"
msgstr "Status"
@ -392,7 +392,7 @@ msgstr "Dieses Element duplizieren"
#: includes/admin/admin-field-groups.php:686
#: includes/admin/admin-field-groups.php:702
#: includes/admin/views/field-group-field.php:46
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate"
msgstr "Duplizieren"
@ -450,7 +450,7 @@ msgstr "Übersicht Websites & Upgrades"
# @ acf
#: includes/admin/admin.php:54 includes/admin/views/field-group-options.php:110
msgid "Custom Fields"
msgstr "Eigene Felder"
msgstr "Individuelle Felder"
# @ acf
#: includes/admin/settings-info.php:50
@ -612,8 +612,8 @@ msgstr "Regelgruppe hinzufügen"
# @ acf
#: includes/admin/views/field-group-field.php:38
#: pro/fields/class-acf-field-flexible-content.php:424
#: pro/fields/class-acf-field-repeater.php:294
#: pro/fields/class-acf-field-flexible-content.php:410
#: pro/fields/class-acf-field-repeater.php:299
msgid "Drag to reorder"
msgstr "Ziehen zum Sortieren"
@ -654,7 +654,7 @@ msgstr "Feld löschen"
# @ acf
#: includes/admin/views/field-group-field.php:48
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete"
msgstr "Löschen"
@ -737,14 +737,14 @@ msgstr "Reihenfolge"
#: includes/fields/class-acf-field-checkbox.php:420
#: includes/fields/class-acf-field-radio.php:311
#: includes/fields/class-acf-field-select.php:433
#: pro/fields/class-acf-field-flexible-content.php:596
#: pro/fields/class-acf-field-flexible-content.php:582
msgid "Label"
msgstr "Beschriftung"
# @ acf
#: includes/admin/views/field-group-fields.php:6
#: includes/fields/class-acf-field-taxonomy.php:939
#: pro/fields/class-acf-field-flexible-content.php:610
#: pro/fields/class-acf-field-flexible-content.php:596
msgid "Name"
msgstr "Name"
@ -1459,69 +1459,69 @@ msgid "We think you'll love the changes in %s."
msgstr "Wir glauben Sie werden die Änderungen in %s lieben."
# @ acf
#: includes/api/api-helpers.php:1011
#: includes/api/api-helpers.php:1003
msgid "Thumbnail"
msgstr "Miniaturbild"
# @ acf
#: includes/api/api-helpers.php:1012
#: includes/api/api-helpers.php:1004
msgid "Medium"
msgstr "Mittel"
# @ acf
#: includes/api/api-helpers.php:1013
#: includes/api/api-helpers.php:1005
msgid "Large"
msgstr "Groß"
# @ acf
#: includes/api/api-helpers.php:1062
#: includes/api/api-helpers.php:1054
msgid "Full Size"
msgstr "Volle Größe"
# @ acf
#: includes/api/api-helpers.php:1831 includes/api/api-term.php:147
#: includes/api/api-helpers.php:1775 includes/api/api-term.php:147
#: pro/fields/class-acf-field-clone.php:996
msgid "(no title)"
msgstr "(ohne Titel)"
# @ acf
#: includes/api/api-helpers.php:3911
#: includes/api/api-helpers.php:3783
#, php-format
msgid "Image width must be at least %dpx."
msgstr "Die Breite des Bildes muss mindestens %dpx sein."
# @ acf
#: includes/api/api-helpers.php:3916
#: includes/api/api-helpers.php:3788
#, php-format
msgid "Image width must not exceed %dpx."
msgstr "Die Breite des Bildes darf %dpx nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3932
#: includes/api/api-helpers.php:3804
#, php-format
msgid "Image height must be at least %dpx."
msgstr "Die Höhe des Bildes muss mindestens %dpx sein."
# @ acf
#: includes/api/api-helpers.php:3937
#: includes/api/api-helpers.php:3809
#, php-format
msgid "Image height must not exceed %dpx."
msgstr "Die Höhe des Bild darf %dpx nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3955
#: includes/api/api-helpers.php:3827
#, php-format
msgid "File size must be at least %s."
msgstr "Die Dateigröße muss mindestens %s sein."
# @ acf
#: includes/api/api-helpers.php:3960
#: includes/api/api-helpers.php:3832
#, php-format
msgid "File size must must not exceed %s."
msgstr "Die Dateigröße darf %s nicht überschreiten."
# @ acf
#: includes/api/api-helpers.php:3994
#: includes/api/api-helpers.php:3866
#, php-format
msgid "File type must be %s."
msgstr "Der Dateityp muss %s sein."
@ -1717,9 +1717,9 @@ msgstr "jQuery"
#: includes/fields/class-acf-field-group.php:474
#: includes/fields/class-acf-field-radio.php:290
#: pro/fields/class-acf-field-clone.php:843
#: pro/fields/class-acf-field-flexible-content.php:567
#: pro/fields/class-acf-field-flexible-content.php:616
#: pro/fields/class-acf-field-repeater.php:443
#: pro/fields/class-acf-field-flexible-content.php:553
#: pro/fields/class-acf-field-flexible-content.php:602
#: pro/fields/class-acf-field-repeater.php:448
msgid "Layout"
msgstr "Layout"
@ -1901,20 +1901,19 @@ msgstr "Neue Auswahlmöglichkeit hinzufügen"
#: includes/fields/class-acf-field-checkbox.php:353
msgid "Allow Custom"
msgstr "Benutzerdefinierte Werte erlauben"
msgstr "Individuelle Werte erlauben"
#: includes/fields/class-acf-field-checkbox.php:358
msgid "Allow 'custom' values to be added"
msgstr "Erlaubt das Hinzufügen benutzerdefinierter Werte"
msgstr "Erlaubt das Hinzufügen individueller Werte"
#: includes/fields/class-acf-field-checkbox.php:364
msgid "Save Custom"
msgstr "Benutzerdefinierte Werte speichern"
msgstr "Individuelle Werte speichern"
#: includes/fields/class-acf-field-checkbox.php:369
msgid "Save 'custom' values to the field's choices"
msgstr ""
"Benutzerdefinierte Werte unter den Auswahlmöglichkeiten des Feldes speichern"
msgstr "Individuelle Werte unter den Auswahlmöglichkeiten des Feldes speichern"
# @ acf
#: includes/fields/class-acf-field-checkbox.php:381
@ -2256,6 +2255,7 @@ msgstr "Beschränkt die Auswahl in der Mediathek"
#: includes/locations/class-acf-location-user-role.php:111
#: includes/locations/class-acf-location-widget.php:83
#: pro/fields/class-acf-field-gallery.php:679
#: pro/locations/class-acf-location-block.php:79
msgid "All"
msgstr "Alle"
@ -2371,7 +2371,7 @@ msgstr "Gruppe"
# @ acf
#: includes/fields/class-acf-field-group.php:459
#: pro/fields/class-acf-field-repeater.php:379
#: pro/fields/class-acf-field-repeater.php:384
msgid "Sub Fields"
msgstr "Unterfelder"
@ -2383,24 +2383,25 @@ msgstr "Gibt die Art an wie die ausgewählten Felder ausgegeben werden sollen"
# @ acf
#: includes/fields/class-acf-field-group.php:480
#: pro/fields/class-acf-field-clone.php:849
#: pro/fields/class-acf-field-flexible-content.php:627
#: pro/fields/class-acf-field-repeater.php:451
#: pro/fields/class-acf-field-flexible-content.php:613
#: pro/fields/class-acf-field-repeater.php:456
#: pro/locations/class-acf-location-block.php:27
msgid "Block"
msgstr "Block"
# @ acf
#: includes/fields/class-acf-field-group.php:481
#: pro/fields/class-acf-field-clone.php:850
#: pro/fields/class-acf-field-flexible-content.php:626
#: pro/fields/class-acf-field-repeater.php:450
#: pro/fields/class-acf-field-flexible-content.php:612
#: pro/fields/class-acf-field-repeater.php:455
msgid "Table"
msgstr "Tabelle"
# @ acf
#: includes/fields/class-acf-field-group.php:482
#: pro/fields/class-acf-field-clone.php:851
#: pro/fields/class-acf-field-flexible-content.php:628
#: pro/fields/class-acf-field-repeater.php:452
#: pro/fields/class-acf-field-flexible-content.php:614
#: pro/fields/class-acf-field-repeater.php:457
msgid "Row"
msgstr "Reihe"
@ -3492,6 +3493,14 @@ msgstr "Erneut suchen"
msgid "Upgrade Notice"
msgstr "Aktualisierungs-Hinweis"
#: pro/blocks.php:371
msgid "Switch to Edit"
msgstr "Zum Bearbeiten wechseln"
#: pro/blocks.php:372
msgid "Switch to Preview"
msgstr "Zur Vorschau wechseln"
#: pro/fields/class-acf-field-clone.php:25
msgctxt "noun"
msgid "Clone"
@ -3554,14 +3563,14 @@ msgstr "Alle Felder der Feldgruppe %s"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:31
#: pro/fields/class-acf-field-repeater.php:193
#: pro/fields/class-acf-field-repeater.php:463
#: pro/fields/class-acf-field-repeater.php:468
msgid "Add Row"
msgstr "Eintrag hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:73
#: pro/fields/class-acf-field-flexible-content.php:938
#: pro/fields/class-acf-field-flexible-content.php:1020
#: pro/fields/class-acf-field-flexible-content.php:924
#: pro/fields/class-acf-field-flexible-content.php:1006
msgid "layout"
msgid_plural "layouts"
msgstr[0] "Layout"
@ -3574,8 +3583,8 @@ msgstr "Einträge"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:77
#: pro/fields/class-acf-field-flexible-content.php:937
#: pro/fields/class-acf-field-flexible-content.php:1019
#: pro/fields/class-acf-field-flexible-content.php:923
#: pro/fields/class-acf-field-flexible-content.php:1005
msgid "This field requires at least {min} {label} {identifier}"
msgstr "Dieses Feld erfordert mindestens {min} {label} {identifier}"
@ -3600,74 +3609,74 @@ msgid "Flexible Content requires at least 1 layout"
msgstr "Flexibler Inhalt benötigt mindestens ein Layout"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:302
#: pro/fields/class-acf-field-flexible-content.php:287
#, php-format
msgid "Click the \"%s\" button below to start creating your layout"
msgstr "Klicke \"%s\" zum Erstellen des Layouts"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:427
#: pro/fields/class-acf-field-flexible-content.php:413
msgid "Add layout"
msgstr "Layout hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:428
#: pro/fields/class-acf-field-flexible-content.php:414
msgid "Remove layout"
msgstr "Layout entfernen"
#: pro/fields/class-acf-field-flexible-content.php:429
#: pro/fields/class-acf-field-repeater.php:296
#: pro/fields/class-acf-field-flexible-content.php:415
#: pro/fields/class-acf-field-repeater.php:301
msgid "Click to toggle"
msgstr "Zum Auswählen anklicken"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder Layout"
msgstr "Layout sortieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder"
msgstr "Sortieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete Layout"
msgstr "Layout löschen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate Layout"
msgstr "Layout duplizieren"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:572
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New Layout"
msgstr "Neues Layout hinzufügen"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:643
#: pro/fields/class-acf-field-flexible-content.php:629
msgid "Min"
msgstr "Min"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:656
#: pro/fields/class-acf-field-flexible-content.php:642
msgid "Max"
msgstr "Max"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:683
#: pro/fields/class-acf-field-repeater.php:459
#: pro/fields/class-acf-field-flexible-content.php:669
#: pro/fields/class-acf-field-repeater.php:464
msgid "Button Label"
msgstr "Button-Beschriftung"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:692
#: pro/fields/class-acf-field-flexible-content.php:678
msgid "Minimum Layouts"
msgstr "Mindestzahl an Layouts"
# @ acf
#: pro/fields/class-acf-field-flexible-content.php:701
#: pro/fields/class-acf-field-flexible-content.php:687
msgid "Maximum Layouts"
msgstr "Höchstzahl an Layouts"
@ -3757,7 +3766,7 @@ msgstr "Voranstellen"
# @ acf
#: pro/fields/class-acf-field-repeater.php:65
#: pro/fields/class-acf-field-repeater.php:656
#: pro/fields/class-acf-field-repeater.php:661
msgid "Minimum rows reached ({min} rows)"
msgstr "Mindestzahl der Einträge hat ({min} Reihen) erreicht"
@ -3767,31 +3776,31 @@ msgid "Maximum rows reached ({max} rows)"
msgstr "Höchstzahl der Einträge hat ({max} Reihen) erreicht"
# @ acf
#: pro/fields/class-acf-field-repeater.php:333
#: pro/fields/class-acf-field-repeater.php:338
msgid "Add row"
msgstr "Eintrag hinzufügen"
# @ acf
#: pro/fields/class-acf-field-repeater.php:334
#: pro/fields/class-acf-field-repeater.php:339
msgid "Remove row"
msgstr "Eintrag löschen"
#: pro/fields/class-acf-field-repeater.php:412
#: pro/fields/class-acf-field-repeater.php:417
msgid "Collapsed"
msgstr "Zugeklappt"
#: pro/fields/class-acf-field-repeater.php:413
#: pro/fields/class-acf-field-repeater.php:418
msgid "Select a sub field to show when row is collapsed"
msgstr ""
"Wähle ein Unterfelder welches im zugeklappten Zustand angezeigt werden soll"
# @ acf
#: pro/fields/class-acf-field-repeater.php:423
#: pro/fields/class-acf-field-repeater.php:428
msgid "Minimum Rows"
msgstr "Mindestzahl der Einträge"
# @ acf
#: pro/fields/class-acf-field-repeater.php:433
#: pro/fields/class-acf-field-repeater.php:438
msgid "Maximum Rows"
msgstr "Höchstzahl der Einträge"
@ -3822,6 +3831,14 @@ msgstr ""
"besitzen informieren Sie sich bitte hier hinsichtlich der <a href=\"%s\" "
"target=\"_blank\">Preise und Einzelheiten</a>."
#: tests/basic/test-blocks.php:13
msgid "Testimonial"
msgstr "Testimonial"
#: tests/basic/test-blocks.php:14
msgid "A custom testimonial block."
msgstr "Ein individueller Testimonial-Block."
#. Plugin URI of the plugin/theme
msgid "https://www.advancedcustomfields.com/"
msgstr "https://www.advancedcustomfields.com/"

Binary file not shown.

View File

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Advanced Custom Fields Pro v5.6.6\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2017-11-22 15:53+0200\n"
"PO-Revision-Date: 2018-02-06 10:06+1000\n"
"PO-Revision-Date: 2019-03-25 09:21+1000\n"
"Last-Translator: Elliot Condon <e@elliotcondon.com>\n"
"Language-Team: Derk Oosterveld <derk@derkoosterveld.nl>\n"
"Language: nl_NL\n"
@ -117,7 +117,7 @@ msgstr "Niet actief"
msgid "Inactive <span class=\"count\">(%s)</span>"
msgid_plural "Inactive <span class=\"count\">(%s)</span>"
msgstr[0] "Inactief <span class=\"count\">(%s)</span>"
msgstr[1] "Actief <span class=\"count\">(%s)</span>"
msgstr[1] "Inactief <span class=\"count\">(%s)</span>"
#: includes/admin/admin-field-group.php:68
#: includes/admin/admin-field-group.php:69

Binary file not shown.

View File

@ -4,8 +4,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Advanced Custom Fields PRO\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"POT-Creation-Date: 2019-01-17 14:07+0000\n"
"PO-Revision-Date: 2019-01-17 14:08+0000\n"
"POT-Creation-Date: 2019-05-02 09:38+0100\n"
"PO-Revision-Date: 2019-05-02 09:52+0100\n"
"Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
"Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
"Language: pt_PT\n"
@ -26,97 +26,107 @@ msgstr ""
msgid "Advanced Custom Fields"
msgstr "Advanced Custom Fields"
#: acf.php:359 includes/admin/admin.php:58
#: acf.php:363 includes/admin/admin.php:58
msgid "Field Groups"
msgstr "Grupos de campos"
#: acf.php:360
#: acf.php:364
msgid "Field Group"
msgstr "Grupo de campos"
#: acf.php:361 acf.php:393 includes/admin/admin.php:59
#: pro/fields/class-acf-field-flexible-content.php:572
#: acf.php:365 acf.php:397 includes/admin/admin.php:59
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New"
msgstr "Adicionar novo"
#: acf.php:362
#: acf.php:366
msgid "Add New Field Group"
msgstr "Adicionar novo grupo de campos"
#: acf.php:363
#: acf.php:367
msgid "Edit Field Group"
msgstr "Editar grupo de campos"
#: acf.php:364
#: acf.php:368
msgid "New Field Group"
msgstr "Novo grupo de campos"
#: acf.php:365
#: acf.php:369
msgid "View Field Group"
msgstr "Ver grupo de campos"
#: acf.php:366
#: acf.php:370
msgid "Search Field Groups"
msgstr "Pesquisar grupos de campos"
#: acf.php:367
#: acf.php:371
msgid "No Field Groups found"
msgstr "Nenhum grupo de campos encontrado"
#: acf.php:368
#: acf.php:372
msgid "No Field Groups found in Trash"
msgstr "Nenhum grupo de campos encontrado no lixo"
#: acf.php:391 includes/admin/admin-field-group.php:220
#: includes/admin/admin-field-groups.php:529
#: acf.php:395 includes/admin/admin-field-group.php:220
#: includes/admin/admin-field-groups.php:530
#: pro/fields/class-acf-field-clone.php:811
msgid "Fields"
msgstr "Campos"
#: acf.php:392
#: acf.php:396
msgid "Field"
msgstr "Campo"
#: acf.php:394
#: acf.php:398
msgid "Add New Field"
msgstr "Adicionar novo campo"
#: acf.php:395
#: acf.php:399
msgid "Edit Field"
msgstr "Editar campo"
#: acf.php:396 includes/admin/views/field-group-fields.php:41
#: acf.php:400 includes/admin/views/field-group-fields.php:41
msgid "New Field"
msgstr "Novo campo"
#: acf.php:397
#: acf.php:401
msgid "View Field"
msgstr "Ver campo"
#: acf.php:398
#: acf.php:402
msgid "Search Fields"
msgstr "Pesquisar campos"
#: acf.php:399
#: acf.php:403
msgid "No Fields found"
msgstr "Nenhum campo encontrado"
#: acf.php:400
#: acf.php:404
msgid "No Fields found in Trash"
msgstr "Nenhum campo encontrado no lixo"
#: acf.php:439 includes/admin/admin-field-group.php:402
#: includes/admin/admin-field-groups.php:586
#: acf.php:443 includes/admin/admin-field-group.php:402
#: includes/admin/admin-field-groups.php:587
msgid "Inactive"
msgstr "Inactivo"
#: acf.php:444
#: acf.php:448
#, php-format
msgid "Inactive <span class=\"count\">(%s)</span>"
msgid_plural "Inactive <span class=\"count\">(%s)</span>"
msgstr[0] "Inactivo <span class=\"count\">(%s)</span>"
msgstr[1] "Inactivos <span class=\"count\">(%s)</span>"
#: includes/acf-field-functions.php:828
#: includes/admin/admin-field-group.php:178
msgid "(no label)"
msgstr "(sem legenda)"
#: includes/acf-field-group-functions.php:816
#: includes/admin/admin-field-group.php:180
msgid "copy"
msgstr "cópia"
#: includes/admin/admin-field-group.php:86
#: includes/admin/admin-field-group.php:87
#: includes/admin/admin-field-group.php:89
@ -175,25 +185,16 @@ msgstr "Mover campo personalizado"
msgid "Checked"
msgstr "Seleccionado"
#: includes/admin/admin-field-group.php:178 includes/api/api-field.php:320
msgid "(no label)"
msgstr "(sem legenda)"
#: includes/admin/admin-field-group.php:179
msgid "(this field)"
msgstr "(este campo)"
#: includes/admin/admin-field-group.php:180
#: includes/api/api-field-group.php:751
msgid "copy"
msgstr "cópia"
#: includes/admin/admin-field-group.php:181
#: includes/admin/views/field-group-field-conditional-logic.php:51
#: includes/admin/views/field-group-field-conditional-logic.php:151
#: includes/admin/views/field-group-locations.php:29
#: includes/admin/views/html-location-group.php:3
#: includes/api/api-helpers.php:3998
#: includes/api/api-helpers.php:3862
msgid "or"
msgstr "ou"
@ -261,17 +262,17 @@ msgid_plural "%s field groups synchronised."
msgstr[0] "Grupo de campos sincronizado."
msgstr[1] "%s grupos de campos sincronizados."
#: includes/admin/admin-field-groups.php:413
#: includes/admin/admin-field-groups.php:576
#: includes/admin/admin-field-groups.php:414
#: includes/admin/admin-field-groups.php:577
msgid "Sync available"
msgstr "Sincronização disponível"
#: includes/admin/admin-field-groups.php:526 includes/forms/form-front.php:38
#: includes/admin/admin-field-groups.php:527 includes/forms/form-front.php:38
#: pro/fields/class-acf-field-gallery.php:372
msgid "Title"
msgstr "Título"
#: includes/admin/admin-field-groups.php:527
#: includes/admin/admin-field-groups.php:528
#: includes/admin/views/field-group-options.php:96
#: includes/admin/views/html-admin-page-upgrade-network.php:38
#: includes/admin/views/html-admin-page-upgrade-network.php:49
@ -279,7 +280,7 @@ msgstr "Título"
msgid "Description"
msgstr "Descrição"
#: includes/admin/admin-field-groups.php:528
#: includes/admin/admin-field-groups.php:529
msgid "Status"
msgstr "Estado"
@ -332,7 +333,7 @@ msgstr "Duplicar este item"
#: includes/admin/admin-field-groups.php:686
#: includes/admin/admin-field-groups.php:702
#: includes/admin/views/field-group-field.php:46
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate"
msgstr "Duplicar"
@ -443,37 +444,37 @@ msgstr "Copiado"
msgid "Import Field Groups"
msgstr "Importar grupos de campos"
#: includes/admin/tools/class-acf-admin-tool-import.php:61
#: includes/admin/tools/class-acf-admin-tool-import.php:47
msgid "Select the Advanced Custom Fields JSON file you would like to import. When you click the import button below, ACF will import the field groups."
msgstr "Seleccione o ficheiro JSON do Advanced Custom Fields que deseja importar. Ao clicar no botão Importar abaixo, o ACF irá importar os grupos de campos."
#: includes/admin/tools/class-acf-admin-tool-import.php:66
#: includes/admin/tools/class-acf-admin-tool-import.php:52
#: includes/fields/class-acf-field-file.php:57
msgid "Select File"
msgstr "Seleccionar ficheiro"
#: includes/admin/tools/class-acf-admin-tool-import.php:76
#: includes/admin/tools/class-acf-admin-tool-import.php:62
msgid "Import File"
msgstr "Importar ficheiro"
#: includes/admin/tools/class-acf-admin-tool-import.php:99
#: includes/admin/tools/class-acf-admin-tool-import.php:85
#: includes/fields/class-acf-field-file.php:170
msgid "No file selected"
msgstr "Nenhum ficheiro seleccionado"
#: includes/admin/tools/class-acf-admin-tool-import.php:109
#: includes/admin/tools/class-acf-admin-tool-import.php:93
msgid "Error uploading file. Please try again"
msgstr "Erro ao carregar ficheiro. Por favor tente de novo."
#: includes/admin/tools/class-acf-admin-tool-import.php:115
#: includes/admin/tools/class-acf-admin-tool-import.php:98
msgid "Incorrect file type"
msgstr "Tipo de ficheiro incorrecto"
#: includes/admin/tools/class-acf-admin-tool-import.php:129
#: includes/admin/tools/class-acf-admin-tool-import.php:107
msgid "Import file empty"
msgstr "Ficheiro de importação vazio"
#: includes/admin/tools/class-acf-admin-tool-import.php:235
#: includes/admin/tools/class-acf-admin-tool-import.php:138
#, php-format
msgid "Imported 1 field group"
msgid_plural "Imported %s field groups"
@ -499,8 +500,8 @@ msgid "Add rule group"
msgstr "Adicionar grupo de regras"
#: includes/admin/views/field-group-field.php:38
#: pro/fields/class-acf-field-flexible-content.php:424
#: pro/fields/class-acf-field-repeater.php:294
#: pro/fields/class-acf-field-flexible-content.php:410
#: pro/fields/class-acf-field-repeater.php:299
msgid "Drag to reorder"
msgstr "Arraste para reordenar"
@ -534,7 +535,7 @@ msgid "Delete field"
msgstr "Eliminar campo"
#: includes/admin/views/field-group-field.php:48
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete"
msgstr "Eliminar"
@ -599,13 +600,13 @@ msgstr "Ordem"
#: includes/fields/class-acf-field-checkbox.php:420
#: includes/fields/class-acf-field-radio.php:311
#: includes/fields/class-acf-field-select.php:433
#: pro/fields/class-acf-field-flexible-content.php:596
#: pro/fields/class-acf-field-flexible-content.php:582
msgid "Label"
msgstr "Legenda"
#: includes/admin/views/field-group-fields.php:6
#: includes/fields/class-acf-field-taxonomy.php:939
#: pro/fields/class-acf-field-flexible-content.php:610
#: pro/fields/class-acf-field-flexible-content.php:596
msgid "Name"
msgstr "Nome"
@ -725,7 +726,7 @@ msgstr "Revisões"
#: includes/admin/views/field-group-options.php:114
msgid "Slug"
msgstr "URL"
msgstr "Slug"
#: includes/admin/views/field-group-options.php:115
msgid "Author"
@ -1097,58 +1098,58 @@ msgstr "Nova funcionalidade de grupo de campos permite mover um campo entre grup
msgid "We think you'll love the changes in %s."
msgstr "Pensamos que vai gostar das alterações na versão %s."
#: includes/api/api-helpers.php:1011
#: includes/api/api-helpers.php:1003
msgid "Thumbnail"
msgstr "Miniatura"
#: includes/api/api-helpers.php:1012
#: includes/api/api-helpers.php:1004
msgid "Medium"
msgstr "Média"
#: includes/api/api-helpers.php:1013
#: includes/api/api-helpers.php:1005
msgid "Large"
msgstr "Grande"
#: includes/api/api-helpers.php:1062
#: includes/api/api-helpers.php:1054
msgid "Full Size"
msgstr "Tamanho original"
#: includes/api/api-helpers.php:1831 includes/api/api-term.php:147
#: includes/api/api-helpers.php:1775 includes/api/api-term.php:147
#: pro/fields/class-acf-field-clone.php:996
msgid "(no title)"
msgstr "(sem título)"
#: includes/api/api-helpers.php:3919
#: includes/api/api-helpers.php:3783
#, php-format
msgid "Image width must be at least %dpx."
msgstr "A largura da imagem deve ser pelo menos de %dpx."
#: includes/api/api-helpers.php:3924
#: includes/api/api-helpers.php:3788
#, php-format
msgid "Image width must not exceed %dpx."
msgstr "A largura da imagem não deve exceder os %dpx."
#: includes/api/api-helpers.php:3940
#: includes/api/api-helpers.php:3804
#, php-format
msgid "Image height must be at least %dpx."
msgstr "A altura da imagem deve ser pelo menos de %dpx."
#: includes/api/api-helpers.php:3945
#: includes/api/api-helpers.php:3809
#, php-format
msgid "Image height must not exceed %dpx."
msgstr "A altura da imagem não deve exceder os %dpx."
#: includes/api/api-helpers.php:3963
#: includes/api/api-helpers.php:3827
#, php-format
msgid "File size must be at least %s."
msgstr "O tamanho do ficheiro deve ser pelo menos de %s."
#: includes/api/api-helpers.php:3968
#: includes/api/api-helpers.php:3832
#, php-format
msgid "File size must must not exceed %s."
msgstr "O tamanho do ficheiro não deve exceder %s."
#: includes/api/api-helpers.php:4002
#: includes/api/api-helpers.php:3866
#, php-format
msgid "File type must be %s."
msgstr "O tipo de ficheiro deve ser %s."
@ -1316,9 +1317,9 @@ msgstr "jQuery"
#: includes/fields/class-acf-field-group.php:474
#: includes/fields/class-acf-field-radio.php:290
#: pro/fields/class-acf-field-clone.php:843
#: pro/fields/class-acf-field-flexible-content.php:567
#: pro/fields/class-acf-field-flexible-content.php:616
#: pro/fields/class-acf-field-repeater.php:443
#: pro/fields/class-acf-field-flexible-content.php:553
#: pro/fields/class-acf-field-flexible-content.php:602
#: pro/fields/class-acf-field-repeater.php:448
msgid "Layout"
msgstr "Layout"
@ -1804,6 +1805,7 @@ msgstr "Limita a escolha da biblioteca de media."
#: includes/locations/class-acf-location-user-role.php:111
#: includes/locations/class-acf-location-widget.php:83
#: pro/fields/class-acf-field-gallery.php:679
#: pro/locations/class-acf-location-block.php:79
msgid "All"
msgstr "Todos"
@ -1898,7 +1900,7 @@ msgid "Group"
msgstr "Grupo"
#: includes/fields/class-acf-field-group.php:459
#: pro/fields/class-acf-field-repeater.php:379
#: pro/fields/class-acf-field-repeater.php:384
msgid "Sub Fields"
msgstr "Subcampos"
@ -1909,22 +1911,23 @@ msgstr "Especifica o estilo usado para mostrar os campos seleccionados."
#: includes/fields/class-acf-field-group.php:480
#: pro/fields/class-acf-field-clone.php:849
#: pro/fields/class-acf-field-flexible-content.php:627
#: pro/fields/class-acf-field-repeater.php:451
#: pro/fields/class-acf-field-flexible-content.php:613
#: pro/fields/class-acf-field-repeater.php:456
#: pro/locations/class-acf-location-block.php:27
msgid "Block"
msgstr "Bloco"
#: includes/fields/class-acf-field-group.php:481
#: pro/fields/class-acf-field-clone.php:850
#: pro/fields/class-acf-field-flexible-content.php:626
#: pro/fields/class-acf-field-repeater.php:450
#: pro/fields/class-acf-field-flexible-content.php:612
#: pro/fields/class-acf-field-repeater.php:455
msgid "Table"
msgstr "Tabela"
#: includes/fields/class-acf-field-group.php:482
#: pro/fields/class-acf-field-clone.php:851
#: pro/fields/class-acf-field-flexible-content.php:628
#: pro/fields/class-acf-field-repeater.php:452
#: pro/fields/class-acf-field-flexible-content.php:614
#: pro/fields/class-acf-field-repeater.php:457
msgid "Row"
msgstr "Linha"
@ -2359,11 +2362,11 @@ msgstr "Seleccione a taxonomia que será mostrada."
#: includes/fields/class-acf-field-taxonomy.php:764
msgid "Appearance"
msgstr "Aparência"
msgstr "Apresentação"
#: includes/fields/class-acf-field-taxonomy.php:765
msgid "Select the appearance of this field"
msgstr "Seleccione a aparência deste campo."
msgstr "Seleccione a apresentação deste campo."
#: includes/fields/class-acf-field-taxonomy.php:770
msgid "Multiple Values"
@ -2446,6 +2449,12 @@ msgstr "Limite de caracteres"
msgid "Leave blank for no limit"
msgstr "Deixe em branco para não limitar"
#: includes/fields/class-acf-field-text.php:181
#: includes/fields/class-acf-field-textarea.php:213
#, php-format
msgid "Value must not exceed %d characters"
msgstr "O valor não deve exceder %d caracteres"
#: includes/fields/class-acf-field-textarea.php:25
msgid "Text Area"
msgstr "Área de texto"
@ -2665,8 +2674,8 @@ msgstr "Página superior"
msgid "Page Template"
msgstr "Modelo de página"
#: includes/locations/class-acf-location-page-template.php:98
#: includes/locations/class-acf-location-post-template.php:151
#: includes/locations/class-acf-location-page-template.php:87
#: includes/locations/class-acf-location-post-template.php:134
msgid "Default Template"
msgstr "Modelo por omissão"
@ -2755,7 +2764,7 @@ msgstr "Nenhum grupo de campos personalizado encontrado na página de opções.
#: pro/admin/admin-updates.php:49
msgid "<b>Error</b>. Could not connect to update server"
msgstr "<b>Erro</b>. Não foi possível ligar ao servidor de actualização."
msgstr "<b>Erro</b>. Não foi possível ligar ao servidor de actualização"
#: pro/admin/admin-updates.php:118 pro/admin/views/html-settings-updates.php:13
msgid "Updates"
@ -2818,6 +2827,14 @@ msgstr "Verificar de novo"
msgid "Upgrade Notice"
msgstr "Informações sobre a actualização"
#: pro/blocks.php:371
msgid "Switch to Edit"
msgstr "Mudar para o editor"
#: pro/blocks.php:372
msgid "Switch to Preview"
msgstr "Mudar para pré-visualização"
#: pro/fields/class-acf-field-clone.php:25
msgctxt "noun"
msgid "Clone"
@ -2876,13 +2893,13 @@ msgstr "Todos os campos do grupo de campos %s"
#: pro/fields/class-acf-field-flexible-content.php:31
#: pro/fields/class-acf-field-repeater.php:193
#: pro/fields/class-acf-field-repeater.php:463
#: pro/fields/class-acf-field-repeater.php:468
msgid "Add Row"
msgstr "Adicionar linha"
#: pro/fields/class-acf-field-flexible-content.php:73
#: pro/fields/class-acf-field-flexible-content.php:938
#: pro/fields/class-acf-field-flexible-content.php:1020
#: pro/fields/class-acf-field-flexible-content.php:924
#: pro/fields/class-acf-field-flexible-content.php:1006
msgid "layout"
msgid_plural "layouts"
msgstr[0] "layout"
@ -2893,8 +2910,8 @@ msgid "layouts"
msgstr "layouts"
#: pro/fields/class-acf-field-flexible-content.php:77
#: pro/fields/class-acf-field-flexible-content.php:937
#: pro/fields/class-acf-field-flexible-content.php:1019
#: pro/fields/class-acf-field-flexible-content.php:923
#: pro/fields/class-acf-field-flexible-content.php:1005
msgid "This field requires at least {min} {label} {identifier}"
msgstr "Este campo requer pelo menos {min} {identifier} {label}"
@ -2914,62 +2931,62 @@ msgstr "{required} {identifier} {label} em falta (mín {min})"
msgid "Flexible Content requires at least 1 layout"
msgstr "O conteúdo flexível requer pelo menos 1 layout"
#: pro/fields/class-acf-field-flexible-content.php:302
#: pro/fields/class-acf-field-flexible-content.php:287
#, php-format
msgid "Click the \"%s\" button below to start creating your layout"
msgstr "Clique no botão \"%s\" abaixo para começar a criar o seu layout"
#: pro/fields/class-acf-field-flexible-content.php:427
#: pro/fields/class-acf-field-flexible-content.php:413
msgid "Add layout"
msgstr "Adicionar layout"
#: pro/fields/class-acf-field-flexible-content.php:428
#: pro/fields/class-acf-field-flexible-content.php:414
msgid "Remove layout"
msgstr "Remover layout"
#: pro/fields/class-acf-field-flexible-content.php:429
#: pro/fields/class-acf-field-repeater.php:296
#: pro/fields/class-acf-field-flexible-content.php:415
#: pro/fields/class-acf-field-repeater.php:301
msgid "Click to toggle"
msgstr "Clique para alternar"
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder Layout"
msgstr "Reordenar layout"
#: pro/fields/class-acf-field-flexible-content.php:569
#: pro/fields/class-acf-field-flexible-content.php:555
msgid "Reorder"
msgstr "Reordenar"
#: pro/fields/class-acf-field-flexible-content.php:570
#: pro/fields/class-acf-field-flexible-content.php:556
msgid "Delete Layout"
msgstr "Eliminar layout"
#: pro/fields/class-acf-field-flexible-content.php:571
#: pro/fields/class-acf-field-flexible-content.php:557
msgid "Duplicate Layout"
msgstr "Duplicar layout"
#: pro/fields/class-acf-field-flexible-content.php:572
#: pro/fields/class-acf-field-flexible-content.php:558
msgid "Add New Layout"
msgstr "Adicionar novo layout"
#: pro/fields/class-acf-field-flexible-content.php:643
#: pro/fields/class-acf-field-flexible-content.php:629
msgid "Min"
msgstr "Mín"
#: pro/fields/class-acf-field-flexible-content.php:656
#: pro/fields/class-acf-field-flexible-content.php:642
msgid "Max"
msgstr "Máx"
#: pro/fields/class-acf-field-flexible-content.php:683
#: pro/fields/class-acf-field-repeater.php:459
#: pro/fields/class-acf-field-flexible-content.php:669
#: pro/fields/class-acf-field-repeater.php:464
msgid "Button Label"
msgstr "Legenda do botão"
#: pro/fields/class-acf-field-flexible-content.php:692
#: pro/fields/class-acf-field-flexible-content.php:678
msgid "Minimum Layouts"
msgstr "Mínimo de layouts"
#: pro/fields/class-acf-field-flexible-content.php:701
#: pro/fields/class-acf-field-flexible-content.php:687
msgid "Maximum Layouts"
msgstr "Máximo de layouts"
@ -3046,7 +3063,7 @@ msgid "Prepend to the beginning"
msgstr "No início"
#: pro/fields/class-acf-field-repeater.php:65
#: pro/fields/class-acf-field-repeater.php:656
#: pro/fields/class-acf-field-repeater.php:661
msgid "Minimum rows reached ({min} rows)"
msgstr "Mínimo de linhas alcançado ({min} linhas)"
@ -3054,27 +3071,27 @@ msgstr "Mínimo de linhas alcançado ({min} linhas)"
msgid "Maximum rows reached ({max} rows)"
msgstr "Máximo de linhas alcançado ({max} linhas)"
#: pro/fields/class-acf-field-repeater.php:333
#: pro/fields/class-acf-field-repeater.php:338
msgid "Add row"
msgstr "Adicionar linha"
#: pro/fields/class-acf-field-repeater.php:334
#: pro/fields/class-acf-field-repeater.php:339
msgid "Remove row"
msgstr "Remover linha"
#: pro/fields/class-acf-field-repeater.php:412
#: pro/fields/class-acf-field-repeater.php:417
msgid "Collapsed"
msgstr "Minimizado"
#: pro/fields/class-acf-field-repeater.php:413
#: pro/fields/class-acf-field-repeater.php:418
msgid "Select a sub field to show when row is collapsed"
msgstr "Seleccione o subcampo a mostrar ao minimizar a linha."
#: pro/fields/class-acf-field-repeater.php:423
#: pro/fields/class-acf-field-repeater.php:428
msgid "Minimum Rows"
msgstr "Mínimo de linhas"
#: pro/fields/class-acf-field-repeater.php:433
#: pro/fields/class-acf-field-repeater.php:438
msgid "Maximum Rows"
msgstr "Máximo de linhas"
@ -3095,6 +3112,14 @@ msgstr "Opções actualizadas"
msgid "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\">details & pricing</a>."
msgstr "Para permitir actualizações, por favor insira a sua chave de licença na página de <a href=\"%s\">Actualizações</a>. Se não tiver uma chave de licença, por favor veja os <a href=\"%s\">detalhes e preços</a>."
#: tests/basic/test-blocks.php:13
msgid "Testimonial"
msgstr "Testemunho"
#: tests/basic/test-blocks.php:14
msgid "A custom testimonial block."
msgstr "Um bloco personalizado de testemunho."
#. Plugin URI of the plugin/theme
msgid "https://www.advancedcustomfields.com/"
msgstr "https://www.advancedcustomfields.com/"
@ -3106,3 +3131,6 @@ msgstr "Elliot Condon"
#. Author URI of the plugin/theme
msgid "http://www.elliotcondon.com/"
msgstr "http://www.elliotcondon.com/"
#~ msgid "<b>Error</b>. Could not connect to update server %s."
#~ msgstr "<b>Erro</b>. Não foi possível ligar ao servidor de actualização %s."

View File

@ -29,6 +29,7 @@ class acf_pro {
// includes
acf_include('pro/blocks.php');
acf_include('pro/options-page.php');
acf_include('pro/updates.php');
@ -88,6 +89,7 @@ class acf_pro {
function include_location_rules() {
acf_include('pro/locations/class-acf-location-block.php');
acf_include('pro/locations/class-acf-location-options-page.php');
}

File diff suppressed because one or more lines are too long

1
pro/assets/js/acf-pro-blocks.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

591
pro/blocks.php Normal file
View File

@ -0,0 +1,591 @@
<?php
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Register store.
acf_register_store( 'block-types' );
/**
* acf_register_block_type
*
* Registeres a block type.
*
* @date 18/2/19
* @since 5.7.12
*
* @param array $block The block settings.
* @return (array|false)
*/
function acf_register_block_type( $block ) {
// Validate block type settings.
$block = acf_validate_block_type( $block );
// Bail early if already exists.
if( acf_has_block_type($block['name']) ) {
return false;
}
// Add to storage.
acf_get_store( 'block-types' )->set( $block['name'], $block );
// Register block type in WP.
if( function_exists('register_block_type') ) {
register_block_type($block['name'], array(
'attributes' => acf_get_block_type_default_attributes(),
'render_callback' => 'acf_rendered_block',
));
}
// Register action.
add_action( 'enqueue_block_editor_assets', 'acf_enqueue_block_assets' );
// Return block.
return $block;
}
/**
* acf_register_block
*
* See acf_register_block_type().
*
* @date 18/2/19
* @since 5.7.12
*
* @param array $block The block settings.
* @return (array|false)
*/
function acf_register_block( $block ) {
return acf_register_block_type( $block );
}
/**
* acf_has_block_type
*
* Returns true if a block type exists for the given name.
*
* @date 18/2/19
* @since 5.7.12
*
* @param string $name The block type name.
* @return bool
*/
function acf_has_block_type( $name ) {
return acf_get_store( 'block-types' )->has( $name );
}
/**
* acf_get_block_types
*
* Returns an array of all registered block types.
*
* @date 18/2/19
* @since 5.7.12
*
* @param void
* @return array
*/
function acf_get_block_types() {
return acf_get_store( 'block-types' )->get();
}
/**
* acf_get_block_types
*
* Returns a block type for the given name.
*
* @date 18/2/19
* @since 5.7.12
*
* @param string $name The block type name.
* @return (array|null)
*/
function acf_get_block_type( $name ) {
return acf_get_store( 'block-types' )->get( $name );
}
/**
* acf_remove_block_type
*
* Removes a block type for the given name.
*
* @date 18/2/19
* @since 5.7.12
*
* @param string $name The block type name.
* @return void
*/
function acf_remove_block_type( $name ) {
acf_get_store( 'block-types' )->remove( $name );
}
/**
* acf_get_block_type_default_attributes
*
* Returns an array of default attribute settings for a block type.
*
* @date 19/11/18
* @since 5.8.0
*
* @param void
* @return array
*/
function acf_get_block_type_default_attributes() {
return array(
'id' => array(
'type' => 'string',
'default' => '',
),
'name' => array(
'type' => 'string',
'default' => '',
),
'data' => array(
'type' => 'object',
'default' => array(),
),
'align' => array(
'type' => 'string',
'default' => '',
),
'mode' => array(
'type' => 'string',
'default' => '',
)
);
}
/**
* acf_validate_block_type
*
* Validates a block type ensuring all settings exist.
*
* @date 10/4/18
* @since 5.8.0
*
* @param array $block The block settings.
* @return array
*/
function acf_validate_block_type( $block ) {
// Add default settings.
$block = wp_parse_args($block, array(
'name' => '',
'title' => '',
'description' => '',
'category' => 'common',
'icon' => '',
'mode' => 'preview',
'align' => '',
'keywords' => array(),
'supports' => array(),
'post_types' => array(),
'render_template' => false,
'render_callback' => false,
'enqueue_style' => false,
'enqueue_script' => false,
'enqueue_assets' => false,
));
// Restrict keywords to 3 max to avoid JS error.
$block['keywords'] = array_slice($block['keywords'], 0, 3);
// Generate name with prefix.
$block['name'] = 'acf/' . acf_slugify($block['name']);
// Add default 'supports' settings.
$block['supports'] = wp_parse_args($block['supports'], array(
'align' => true,
'html' => false,
'mode' => true,
));
// Return block.
return $block;
}
/**
* acf_prepare_block
*
* Prepares a block for use in render_callback by merging in all settings and attributes.
*
* @date 19/11/18
* @since 5.8.0
*
* @param array $block The block props.
* @return array
*/
function acf_prepare_block( $block ) {
// Bail early if no name.
if( !isset($block['name']) ) {
return false;
}
// Get block type and return false if doesn't exist.
$block_type = acf_get_block_type( $block['name'] );
if( !$block_type ) {
return false;
}
// Generate default attributes.
$attributes = array();
foreach( acf_get_block_type_default_attributes() as $k => $v ) {
$attributes[ $k ] = $v['default'];
}
// Merge together arrays in order of least to most specific.
$block = array_merge($block_type, $attributes, $block);
// Return block.
return $block;
}
/**
* acf_rendered_block
*
* Returns the HTML from acf_render_block().
*
* @date 28/2/19
* @since 5.7.13
* @see acf_render_block() for list of parameters.
*
* @return string
*/
function acf_rendered_block( $block, $content = '', $is_preview = false, $post_id = 0 ) {
// Start capture.
ob_start();
// Render.
acf_render_block( $block, $content, $is_preview, $post_id );
// Return capture.
return ob_get_clean();
}
/**
* acf_render_block
*
* Renders the block HTML.
*
* @date 19/2/19
* @since 5.7.12
*
* @param array $block The block props.
* @param string $content The block content (emtpy string).
* @param bool $is_preview True during AJAX preview.
* @param int $post_id The post being edited.
* @return void
*/
function acf_render_block( $block, $content = '', $is_preview = false, $post_id = 0 ) {
// Prepare block ensuring all settings and attributes exist.
$block = acf_prepare_block( $block );
if( !$block ) {
return '';
}
// Find post_id if not defined.
if( !$post_id ) {
$post_id = get_the_ID();
}
// Enqueue block type assets.
acf_enqueue_block_type_assets( $block );
// Setup postdata allowing get_field() to work.
acf_setup_meta( $block['data'], $block['id'], true );
// Call render_callback.
if( is_callable( $block['render_callback'] ) ) {
call_user_func( $block['render_callback'], $block, $content, $is_preview, $post_id );
// Or include template.
} elseif( $block['render_template'] ) {
// Locate template.
if( file_exists($block['render_template']) ) {
$path = $block['render_template'];
} else {
$path = locate_template( $block['render_template'] );
}
// Include template.
if( file_exists($path) ) {
include( $path );
}
}
// Reset postdata.
acf_reset_meta( $block['id'] );
}
/**
* acf_get_block_fields
*
* Returns an array of all fields for the given block.
*
* @date 24/10/18
* @since 5.8.0
*
* @param array $block The block props.
* @return array
*/
function acf_get_block_fields( $block ) {
// Vars.
$fields = array();
// Get field groups for this block.
$field_groups = acf_get_field_groups( array(
'block' => $block['name']
));
// Loop over results and append fields.
if( $field_groups ) {
foreach( $field_groups as $field_group ) {
$fields = array_merge( $fields, acf_get_fields( $field_group ) );
}}
// Return fields.
return $fields;
}
/**
* acf_enqueue_block_assets
*
* Enqueues and localizes block scripts and styles.
*
* @date 28/2/19
* @since 5.7.13
*
* @param void
* @return void
*/
function acf_enqueue_block_assets() {
// Localize text.
acf_localize_text(array(
'Switch to Edit' => __('Switch to Edit', 'acf'),
'Switch to Preview' => __('Switch to Preview', 'acf'),
));
// Get block types.
$block_types = acf_get_block_types();
// Localize data.
acf_localize_data(array(
'blockTypes' => array_values( $block_types )
));
// Enqueue script.
wp_enqueue_script('acf-blocks', acf_get_url("pro/assets/js/acf-pro-blocks.min.js"), array('acf-input', 'wp-blocks'), ACF_VERSION, true );
// Enqueue block assets.
array_map( 'acf_enqueue_block_type_assets', $block_types );
}
/**
* acf_enqueue_block_type_assets
*
* Enqueues scripts and styles for a specific block type.
*
* @date 28/2/19
* @since 5.7.13
*
* @param array $block_type The block type settings.
* @return void
*/
function acf_enqueue_block_type_assets( $block_type ) {
// Generate handle from name.
$handle = 'block-' . acf_slugify($block_type['name']);
// Enqueue style.
if( $block_type['enqueue_style'] ) {
wp_enqueue_style( $handle, $block_type['enqueue_style'], array(), false, 'all' );
}
// Enqueue script.
if( $block_type['enqueue_script'] ) {
wp_enqueue_script( $handle, $block_type['enqueue_script'], array(), false, true );
}
// Enqueue assets callback.
if( $block_type['enqueue_assets'] && is_callable($block_type['enqueue_assets']) ) {
call_user_func( $block_type['enqueue_assets'] );
}
}
/**
* acf_ajax_fetch_block
*
* Handles the ajax request for block data.
*
* @date 28/2/19
* @since 5.7.13
*
* @param void
* @return void
*/
function acf_ajax_fetch_block() {
// Validate ajax request.
if( !acf_verify_ajax() ) {
wp_send_json_error();
}
// Get request args.
extract(acf_request_args(array(
'block' => false,
'post_id' => 0,
'query' => array(),
)));
// Bail ealry if no block.
if( !$block ) {
wp_send_json_error();
}
// Unslash and decode $_POST data.
$block = wp_unslash($block);
$block = json_decode($block, true);
// Prepare block ensuring all settings and attributes exist.
if( !$block = acf_prepare_block( $block ) ) {
wp_send_json_error();
}
// Load field defaults when first previewing a block.
if( !empty($query['preview']) && !$block['data'] ) {
$fields = acf_get_block_fields( $block );
foreach( $fields as $field ) {
$block['data'][ "_{$field['name']}" ] = $field['key'];
}
}
// Setup postdata allowing form to load meta.
acf_setup_meta( $block['data'], $block['id'], true );
// Vars.
$response = array();
// Query form.
if( !empty($query['form']) ) {
// Load fields for form.
$fields = acf_get_block_fields( $block );
// Prefix field inputs to avoid multiple blocks using the same name/id attributes.
acf_prefix_fields( $fields, "acf-{$block['id']}" );
// Start Capture.
ob_start();
// Render.
echo '<div class="acf-block-fields acf-fields">';
acf_render_fields( $fields, $block['id'], 'div', 'field' );
echo '</div>';
// Store Capture.
$response['form'] = ob_get_contents();
ob_end_clean();
}
// Query preview.
if( !empty($query['preview']) ) {
// Render_callback vars.
$content = '';
$is_preview = true;
// Render.
$html = '';
$html .= '<div class="acf-block-preview">';
$html .= acf_rendered_block( $block, $content, $is_preview, $post_id );
$html .= '</div>';
// Store HTML.
$response['preview'] = $html;
}
// Send repsonse.
wp_send_json_success( $response );
}
// Register ajax action.
acf_register_ajax( 'fetch-block', 'acf_ajax_fetch_block' );
/**
* acf_parse_save_blocks
*
* Parse content that may contain HTML block comments and saves ACF block meta.
*
* @date 27/2/19
* @since 5.7.13
*
* @param string $text Content that may contain HTML block comments.
* @return string
*/
function acf_parse_save_blocks( $text = '' ) {
// Search text for dynamic blocks and modify attrs.
return addslashes(
preg_replace_callback(
'/<!--\s+wp:(?P<name>[\S]+)\s+(?P<attrs>{[\S\s]+?})\s+\/-->/',
'acf_parse_save_blocks_callback',
stripslashes( $text )
)
);
}
// Hook into saving process.
add_filter( 'content_save_pre', 'acf_parse_save_blocks', 5, 1 );
/**
* acf_parse_save_blocks_callback
*
* Callback used in preg_replace to modify ACF Block comment.
*
* @date 1/3/19
* @since 5.7.13
*
* @param array $matches The preg matches.
* @return string
*/
function acf_parse_save_blocks_callback( $matches ) {
// Defaults
$name = isset($matches['name']) ? $matches['name'] : '';
$attrs = isset($matches['attrs']) ? json_decode( $matches['attrs'], true) : '';
// Bail early if missing data or not an ACF Block.
if( !$name || !$attrs || !acf_has_block_type($name) ) {
return $matches[0];
}
// Convert "data" to "meta".
// No need to check if already in meta format. Local Meta will do this for us.
if( isset($attrs['data']) ) {
$attrs['data'] = acf_setup_meta( $attrs['data'], $attrs['id'] );
}
// Prevent wp_targeted_link_rel from corrupting JSON.
remove_filter( 'content_save_pre', 'wp_filter_post_kses' );
remove_filter( 'content_save_pre', 'wp_targeted_link_rel' );
/**
* Filteres the block attributes before saving.
*
* @date 18/3/19
* @since 5.7.14
*
* @param array $attrs The block attributes.
*/
$attrs = apply_filters( 'acf/pre_save_block', $attrs );
// Return new comment
return '<!-- wp:' . $name . ' ' . acf_json_encode($attrs) . ' /-->';
}

View File

@ -363,13 +363,14 @@ class acf_field_flexible_content extends acf_field {
$order = 0;
$el = 'div';
$sub_fields = $layout['sub_fields'];
$prefix = $field['name'] . '[' . $i . ']';
$id = ( $i === 'acfcloneindex' ) ? 'acfcloneindex' : "row-$i";
$prefix = $field['name'] . '[' . $id . ']';
// div
$div = array(
'class' => 'layout',
'data-id' => $i,
'data-id' => $id,
'data-layout' => $layout['name']
);

View File

@ -844,60 +844,24 @@ class acf_field_gallery extends acf_field {
function update_value( $value, $post_id, $field ) {
// bail early if no value
if( empty($value) || !is_array($value) ) return false;
// loop
foreach( $value as $i => $v ) {
$value[ $i ] = $this->update_single_value( $v );
// Bail early if no value.
if( empty($value) ) {
return $value;
}
// return
// Convert to array.
$value = acf_array( $value );
// Format array of values.
// - ensure each value is an id.
// - Parse each id as string for SQL LIKE queries.
$value = array_map('acf_idval', $value);
$value = array_map('strval', $value);
// Return value.
return $value;
}
/*
* update_single_value()
*
* This filter is appied to the $value before it is updated in the db
*
* @type filter
* @since 3.6
* @date 23/01/13
*
* @param $value - the value which will be saved in the database
* @param $post_id - the $post_id of which the value will be saved
* @param $field - the field array holding all the field options
*
* @return $value - the modified value
*/
function update_single_value( $value ) {
// numeric
if( is_numeric($value) ) return $value;
// array?
if( is_array($value) && isset($value['ID']) ) return $value['ID'];
// object?
if( is_object($value) && isset($value->ID) ) return $value->ID;
// return
return $value;
}
}
}

View File

@ -287,8 +287,13 @@ class acf_field_repeater extends acf_field {
<?php endif; ?>
<tbody>
<?php foreach( $value as $i => $row ): ?>
<tr class="acf-row<?php if( $i === 'acfcloneindex' ){ echo ' acf-clone'; } ?>" data-id="<?php echo $i; ?>">
<?php foreach( $value as $i => $row ):
// Generate row id.
$id = ( $i === 'acfcloneindex' ) ? 'acfcloneindex' : "row-$i";
?>
<tr class="acf-row<?php if( $i === 'acfcloneindex' ){ echo ' acf-clone'; } ?>" data-id="<?php echo $id; ?>">
<?php if( $show_order ): ?>
<td class="acf-row-handle order" title="<?php _e('Drag to reorder','acf'); ?>">
@ -318,7 +323,7 @@ class acf_field_repeater extends acf_field {
// update prefix to allow for nested values
$sub_field['prefix'] = $field['name'] . '[' . $i . ']';
$sub_field['prefix'] = $field['name'] . '[' . $id . ']';
// render input

View File

@ -0,0 +1,96 @@
<?php
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if( ! class_exists('ACF_Location_Block') ) :
class ACF_Location_Block extends acf_location {
/*
* __construct
*
* This function will setup the class functionality
*
* @type function
* @date 5/03/2014
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
function initialize() {
// vars
$this->name = 'block';
$this->label = __("Block",'acf');
$this->category = 'forms';
}
/*
* rule_match
*
* This function is used to match this location $rule to the current $screen
*
* @type function
* @date 3/01/13
* @since 3.5.7
*
* @param $match (boolean)
* @param $rule (array)
* @return $options (array)
*/
function rule_match( $result, $rule, $screen ) {
// vars
$block = acf_maybe_get( $screen, 'block' );
// bail early if not block
if( !$block ) return false;
// compare
return $this->compare( $block, $rule );
}
/*
* rule_operators
*
* This function returns the available values for this rule type
*
* @type function
* @date 30/5/17
* @since 5.6.0
*
* @param n/a
* @return (array)
*/
function rule_values( $choices, $rule ) {
// vars
$blocks = acf_get_block_types();
// loop
if( $blocks ) {
$choices['all'] = __('All', 'acf');
foreach( $blocks as $block ) {
$choices[ $block['name'] ] = $block['title'];
}
}
// return
return $choices;
}
}
// initialize
acf_register_location_rule( 'ACF_Location_Block' );
endif; // class_exists check
?>

View File

@ -1,8 +1,9 @@
=== Advanced Custom Fields Pro ===
Contributors: elliotcondon
Tags: acf, advanced, custom, field, fields, form, repeater, content
Requires at least: 4.4.0
Tested up to: 4.9.9
Requires at least: 4.7.0
Tested up to: 5.2
Requires PHP: 5.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ -66,6 +67,19 @@ From your WordPress dashboard
== Changelog ==
= 5.8.0 =
*Release Date - 8 May 2019*
* New - Added ACF Blocks feature for ACF PRO.
* Fix - Fixed bug causing duplicate "save metabox" AJAX requests in the Gutenberg editor.
* Fix - Fixed bug causing incorrect Repeater field value order in AJAX requests.
* Dev - Added JS filter `'relationship_ajax_data'` to customize Relationship field AJAX data.
* Dev - Added `$field_group` parameter to `'acf/location/match_rule'` filter.
* Dev - Bumped minimum supported PHP version to 5.4.0.
* Dev - Bumped minimum supported WP version to 4.7.0.
* i18n - Updated German translation thanks to Ralf Koller.
* i18n - Updated Portuguese language thanks to Pedro Mendonça.
= 5.7.13 =
*Release Date - 6 March 2019*