Merge branch 'release/5.4.5'
This commit is contained in:
commit
9e0470fe52
4
acf.php
4
acf.php
|
|
@ -3,7 +3,7 @@
|
|||
Plugin Name: Advanced Custom Fields PRO
|
||||
Plugin URI: https://www.advancedcustomfields.com/
|
||||
Description: Customise WordPress with powerful, professional and intuitive fields
|
||||
Version: 5.4.4
|
||||
Version: 5.4.5
|
||||
Author: Elliot Condon
|
||||
Author URI: http://www.elliotcondon.com/
|
||||
Copyright: Elliot Condon
|
||||
|
|
@ -58,7 +58,7 @@ class acf {
|
|||
|
||||
// basic
|
||||
'name' => __('Advanced Custom Fields', 'acf'),
|
||||
'version' => '5.4.4',
|
||||
'version' => '5.4.5',
|
||||
|
||||
// urls
|
||||
'basename' => plugin_basename( __FILE__ ),
|
||||
|
|
|
|||
|
|
@ -713,6 +713,22 @@ class acf_admin_field_groups {
|
|||
$('#the-list tr.no-items td').attr('colspan', 4);
|
||||
|
||||
|
||||
// search
|
||||
$('.subsubsub').append(' | <li><a href="#" class="acf-toggle-search"><?php _e('Search', 'acf'); ?></a></li>');
|
||||
|
||||
|
||||
// events
|
||||
$(document).on('click', '.acf-toggle-search', function( e ){
|
||||
|
||||
// prevent default
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
// toggle
|
||||
$('.search-box').slideToggle();
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -1778,7 +1778,7 @@ function acf_prepare_fields_for_import( $fields = false ) {
|
|||
|
||||
// ensure $field is an array of fields
|
||||
// this allows for multiepl sub fields to be returned
|
||||
if( !isset($field[0]) ) {
|
||||
if( acf_is_associative_array($field) ) {
|
||||
|
||||
$field = array( $field );
|
||||
|
||||
|
|
|
|||
|
|
@ -2980,6 +2980,17 @@ function acf_get_valid_post_id( $post_id = 0 ) {
|
|||
|
||||
}
|
||||
|
||||
} elseif( isset($_GET['p']) && isset($_GET['preview']) ) {
|
||||
|
||||
$revision = acf_get_post_latest_revision( $_GET['p'] );
|
||||
|
||||
// save
|
||||
if( $revision && $revision->post_parent == $post_id) {
|
||||
|
||||
$post_id = (int) $revision->ID;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4760,6 +4771,76 @@ function acf_send_ajax_results( $response ) {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* acf_is_sequential_array
|
||||
*
|
||||
* This function will return true if the array contains only numeric keys
|
||||
*
|
||||
* @source http://stackoverflow.com/questions/173400/how-to-check-if-php-array-is-associative-or-sequential
|
||||
* @type function
|
||||
* @date 9/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $array (array)
|
||||
* @return (boolean)
|
||||
*/
|
||||
|
||||
function acf_is_sequential_array( $array ) {
|
||||
|
||||
// bail ealry if not array
|
||||
if( !is_array($array) ) return false;
|
||||
|
||||
|
||||
// loop
|
||||
foreach( $array as $key => $value ) {
|
||||
|
||||
// bail ealry if is string
|
||||
if( is_string($key) ) return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// return
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* acf_is_associative_array
|
||||
*
|
||||
* This function will return true if the array contains one or more string keys
|
||||
*
|
||||
* @source http://stackoverflow.com/questions/173400/how-to-check-if-php-array-is-associative-or-sequential
|
||||
* @type function
|
||||
* @date 9/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $array (array)
|
||||
* @return (boolean)
|
||||
*/
|
||||
|
||||
function acf_is_associative_array( $array ) {
|
||||
|
||||
// bail ealry if not array
|
||||
if( !is_array($array) ) return false;
|
||||
|
||||
|
||||
// loop
|
||||
foreach( $array as $key => $value ) {
|
||||
|
||||
// bail ealry if is string
|
||||
if( is_string($key) ) return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// return
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
add_filter("acf/settings/slug", '_acf_settings_slug');
|
||||
|
||||
function _acf_settings_slug( $v ) {
|
||||
|
|
|
|||
|
|
@ -994,147 +994,113 @@ function acf_shortcode( $atts )
|
|||
add_shortcode( 'acf', 'acf_shortcode' );
|
||||
|
||||
|
||||
/*
|
||||
* acf_form_head()
|
||||
*
|
||||
* This function is placed at the very top of a template (before any HTML is rendered) and saves the $_POST data sent by acf_form.
|
||||
*
|
||||
* @type function
|
||||
* @since 1.1.4
|
||||
* @date 29/01/13
|
||||
*
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function acf_form_head() {
|
||||
|
||||
// register local fields
|
||||
_acf_form_register_fields();
|
||||
|
||||
|
||||
// verify nonce
|
||||
if( acf_verify_nonce('acf_form') ) {
|
||||
|
||||
// add actions
|
||||
add_action('acf/validate_save_post', '_acf_form_validate_save_post');
|
||||
add_filter('acf/pre_save_post', '_acf_form_pre_save_post', 5, 2);
|
||||
|
||||
|
||||
// validate data
|
||||
if( acf_validate_save_post(true) ) {
|
||||
|
||||
// form
|
||||
$GLOBALS['acf_form'] = acf_extract_var($_POST, '_acf_form');
|
||||
$GLOBALS['acf_form'] = @json_decode(base64_decode($GLOBALS['acf_form']), true);
|
||||
|
||||
|
||||
// validate
|
||||
if( empty($GLOBALS['acf_form']) ) return;
|
||||
|
||||
|
||||
// vars
|
||||
$post_id = acf_maybe_get( $GLOBALS['acf_form'], 'post_id', 0 );
|
||||
|
||||
|
||||
// allow for custom save
|
||||
$post_id = apply_filters('acf/pre_save_post', $post_id, $GLOBALS['acf_form']);
|
||||
|
||||
|
||||
// save
|
||||
acf_save_post( $post_id );
|
||||
|
||||
|
||||
// vars
|
||||
$return = acf_maybe_get( $GLOBALS['acf_form'], 'return', '' );
|
||||
|
||||
|
||||
// redirect
|
||||
if( $return ) {
|
||||
|
||||
// update %placeholders%
|
||||
$return = str_replace('%post_url%', get_permalink($post_id), $return);
|
||||
|
||||
|
||||
// redirect
|
||||
wp_redirect( $return );
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
// if
|
||||
|
||||
}
|
||||
// if
|
||||
|
||||
|
||||
// load acf scripts
|
||||
acf_enqueue_scripts();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _acf_form_register_fields
|
||||
* acf_template_form
|
||||
*
|
||||
* This function will register some local fields used by the acf_form function
|
||||
* This class contains funcitonality for a template form to work
|
||||
*
|
||||
* @type function
|
||||
* @date 15/08/2016
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function _acf_form_register_fields() {
|
||||
if( ! class_exists('acf_template_form') ) :
|
||||
|
||||
acf_add_local_field(array(
|
||||
class acf_template_form {
|
||||
|
||||
// vars
|
||||
var $fields;
|
||||
|
||||
|
||||
/*
|
||||
* __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 __construct() {
|
||||
|
||||
// vars
|
||||
$this->fields = array(
|
||||
|
||||
'_post_title' => array(
|
||||
'prefix' => 'acf',
|
||||
'name' => '_post_title',
|
||||
'key' => '_post_title',
|
||||
'label' => __('Title', 'acf'),
|
||||
'type' => 'text',
|
||||
'required' => true,
|
||||
));
|
||||
),
|
||||
|
||||
acf_add_local_field(array(
|
||||
'_post_content' => array(
|
||||
'prefix' => 'acf',
|
||||
'name' => '_post_content',
|
||||
'key' => '_post_content',
|
||||
'label' => __('Content', 'acf'),
|
||||
'type' => 'wysiwyg',
|
||||
));
|
||||
),
|
||||
|
||||
acf_add_local_field(array(
|
||||
'_validate_email' => array(
|
||||
'prefix' => 'acf',
|
||||
'name' => '_validate_email',
|
||||
'key' => '_validate_email',
|
||||
'label' => __('Validate Email', 'acf'),
|
||||
'type' => 'text',
|
||||
'value' => '',
|
||||
'wrapper' => array(
|
||||
'style' => 'display:none !important;'
|
||||
'wrapper' => array('style' => 'display:none !important;')
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* _validate_save_post
|
||||
*
|
||||
* This function will perfrom extra validation for acf_form
|
||||
*
|
||||
* @type function
|
||||
* @date 16/06/2014
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
// actions
|
||||
add_action('acf/validate_save_post', array($this, 'validate_save_post'), 1);
|
||||
|
||||
|
||||
// filters
|
||||
add_filter('acf/pre_save_post', array($this, 'pre_save_post'), 5, 2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* validate_save_post
|
||||
*
|
||||
* This function will validate fields from the above array
|
||||
*
|
||||
* @type function
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_save_post() {
|
||||
|
||||
// register field if isset in $_POST
|
||||
foreach( $this->fields as $k => $field ) {
|
||||
|
||||
// bail early if no in $_POST
|
||||
if( !isset($_POST['acf'][ $k ]) ) continue;
|
||||
|
||||
|
||||
// register
|
||||
acf_add_local_field($field);
|
||||
|
||||
}
|
||||
|
||||
function _acf_form_validate_save_post() {
|
||||
|
||||
// honeypot
|
||||
if( !empty($_POST['acf']['_validate_email']) ) {
|
||||
|
|
@ -1143,23 +1109,23 @@ function _acf_form_validate_save_post() {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _acf_form_pre_save_post
|
||||
*
|
||||
* This filter will save post data for the acf_form function
|
||||
*
|
||||
* @type filter
|
||||
* @date 17/01/2014
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
/*
|
||||
* pre_save_post
|
||||
*
|
||||
* description
|
||||
*
|
||||
* @type function
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function _acf_form_pre_save_post( $post_id, $form ) {
|
||||
function pre_save_post( $post_id, $form ) {
|
||||
|
||||
// vars
|
||||
$save = array(
|
||||
|
|
@ -1235,34 +1201,94 @@ function _acf_form_pre_save_post( $post_id, $form ) {
|
|||
// return
|
||||
return $post_id;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* acf_form()
|
||||
*
|
||||
* This function is used to create an ACF form.
|
||||
*
|
||||
* @type function
|
||||
* @since 1.1.4
|
||||
* @date 29/01/13
|
||||
*
|
||||
* @param array $options: an array containing many options to customize the form
|
||||
* string + post_id: post id to get field groups from and save data to. Default is false
|
||||
* array + field_groups: an array containing field group ID's. If this option is set,
|
||||
* the post_id will not be used to dynamically find the field groups
|
||||
* boolean + form: display the form tag or not. Defaults to true
|
||||
* array + form_attributes: an array containg attributes which will be added into the form tag
|
||||
* string + return: the return URL
|
||||
* string + html_before_fields: html inside form before fields
|
||||
* string + html_after_fields: html inside form after fields
|
||||
* string + submit_value: value of submit button
|
||||
* string + updated_message: default updated message. Can be false
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
/*
|
||||
* enqueue
|
||||
*
|
||||
* This function will enqueue a form
|
||||
*
|
||||
* @type function
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function acf_form( $args = array() ) {
|
||||
function enqueue_form() {
|
||||
|
||||
// verify nonce
|
||||
if( acf_verify_nonce('acf_form') ) {
|
||||
|
||||
// validate data
|
||||
if( acf_validate_save_post(true) ) {
|
||||
|
||||
// form
|
||||
$GLOBALS['acf_form'] = acf_extract_var($_POST, '_acf_form');
|
||||
$GLOBALS['acf_form'] = @json_decode(base64_decode($GLOBALS['acf_form']), true);
|
||||
|
||||
|
||||
// validate
|
||||
if( empty($GLOBALS['acf_form']) ) return;
|
||||
|
||||
|
||||
// vars
|
||||
$post_id = acf_maybe_get( $GLOBALS['acf_form'], 'post_id', 0 );
|
||||
|
||||
|
||||
// allow for custom save
|
||||
$post_id = apply_filters('acf/pre_save_post', $post_id, $GLOBALS['acf_form']);
|
||||
|
||||
|
||||
// save
|
||||
acf_save_post( $post_id );
|
||||
|
||||
|
||||
// vars
|
||||
$return = acf_maybe_get( $GLOBALS['acf_form'], 'return', '' );
|
||||
|
||||
|
||||
// redirect
|
||||
if( $return ) {
|
||||
|
||||
// update %placeholders%
|
||||
$return = str_replace('%post_url%', get_permalink($post_id), $return);
|
||||
|
||||
|
||||
// redirect
|
||||
wp_redirect( $return );
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
// if
|
||||
|
||||
}
|
||||
// if
|
||||
|
||||
|
||||
// load acf scripts
|
||||
acf_enqueue_scripts();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* render
|
||||
*
|
||||
* description
|
||||
*
|
||||
* @type function
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_form( $args = array() ) {
|
||||
|
||||
// vars
|
||||
$url = acf_get_current_url();
|
||||
|
|
@ -1327,6 +1353,14 @@ function acf_form( $args = array() ) {
|
|||
$args['form_attributes']['class'] .= ' acf-form';
|
||||
|
||||
|
||||
// register local fields
|
||||
foreach( $this->fields as $k => $field ) {
|
||||
|
||||
acf_add_local_field($field);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// vars
|
||||
$field_groups = array();
|
||||
$fields = array();
|
||||
|
|
@ -1439,7 +1473,6 @@ function acf_form( $args = array() ) {
|
|||
|
||||
<?php endif;
|
||||
|
||||
|
||||
// render post data
|
||||
acf_form_data(array(
|
||||
'post_id' => $args['post_id'],
|
||||
|
|
@ -1447,13 +1480,15 @@ function acf_form( $args = array() ) {
|
|||
));
|
||||
|
||||
?>
|
||||
|
||||
<div class="acf-hidden">
|
||||
<?php acf_hidden_input(array( 'name' => '_acf_form', 'value' => base64_encode(json_encode($args)) )); ?>
|
||||
</div>
|
||||
<div class="acf-fields acf-form-fields -<?php echo $args['label_placement']; ?>">
|
||||
|
||||
<div class="acf-fields acf-form-fields -<?php echo $args['label_placement']; ?>">
|
||||
<?php
|
||||
|
||||
|
||||
// html before fields
|
||||
echo $args['html_before_fields'];
|
||||
|
||||
|
|
@ -1465,22 +1500,80 @@ function acf_form( $args = array() ) {
|
|||
// html after fields
|
||||
echo $args['html_after_fields'];
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
</div><!-- acf-form-fields -->
|
||||
|
||||
<?php if( $args['form'] ): ?>
|
||||
|
||||
<!-- Submit -->
|
||||
<div class="acf-form-submit">
|
||||
|
||||
<input type="submit" class="acf-button button button-primary button-large" value="<?php echo $args['submit_value']; ?>" />
|
||||
<span class="acf-spinner"></span>
|
||||
|
||||
</div>
|
||||
<!-- / Submit -->
|
||||
|
||||
</form>
|
||||
<?php endif;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// initialize
|
||||
acf()->template_form = new acf_template_form();
|
||||
|
||||
endif; // class_exists check
|
||||
|
||||
|
||||
/*
|
||||
* acf_form_head()
|
||||
*
|
||||
* This function is placed at the very top of a template (before any HTML is rendered) and saves the $_POST data sent by acf_form.
|
||||
*
|
||||
* @type function
|
||||
* @since 1.1.4
|
||||
* @date 29/01/13
|
||||
*
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function acf_form_head() {
|
||||
|
||||
acf()->template_form->enqueue_form();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* acf_form()
|
||||
*
|
||||
* This function is used to create an ACF form.
|
||||
*
|
||||
* @type function
|
||||
* @since 1.1.4
|
||||
* @date 29/01/13
|
||||
*
|
||||
* @param array $options: an array containing many options to customize the form
|
||||
* string + post_id: post id to get field groups from and save data to. Default is false
|
||||
* array + field_groups: an array containing field group ID's. If this option is set,
|
||||
* the post_id will not be used to dynamically find the field groups
|
||||
* boolean + form: display the form tag or not. Defaults to true
|
||||
* array + form_attributes: an array containg attributes which will be added into the form tag
|
||||
* string + return: the return URL
|
||||
* string + html_before_fields: html inside form before fields
|
||||
* string + html_after_fields: html inside form after fields
|
||||
* string + submit_value: value of submit button
|
||||
* string + updated_message: default updated message. Can be false
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
|
||||
function acf_form( $args = array() ) {
|
||||
|
||||
acf()->template_form->render_form($args);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1506,7 +1599,7 @@ function update_field( $selector, $value, $post_id = false ) {
|
|||
|
||||
|
||||
// get field
|
||||
$field = acf_maybe_get_field( $selector, $post_id );
|
||||
$field = acf_maybe_get_field( $selector, $post_id, false );
|
||||
|
||||
|
||||
// create dummy field
|
||||
|
|
|
|||
|
|
@ -740,9 +740,11 @@ a.acf-icon.-cancel.grey:hover {
|
|||
margin-left: 7px;
|
||||
font-style: italic;
|
||||
}
|
||||
/* WPML fix */
|
||||
/* subsubsub */
|
||||
#acf-field-group-wrap .subsubsub {
|
||||
/* WPML */
|
||||
margin-bottom: 3px;
|
||||
/* search */
|
||||
}
|
||||
#acf-field-group-wrap .subsubsub ul {
|
||||
margin: 0;
|
||||
|
|
@ -750,6 +752,9 @@ a.acf-icon.-cancel.grey:hover {
|
|||
#acf-field-group-wrap .subsubsub + .subsubsub {
|
||||
margin-top: 0;
|
||||
}
|
||||
#acf-field-group-wrap .subsubsub a:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
/* columns (replicate post edit layout) */
|
||||
.acf-columns-2 {
|
||||
margin-right: 300px;
|
||||
|
|
@ -779,6 +784,12 @@ html[dir="rtl"] .acf-columns-2 .acf-column-2 {
|
|||
margin-right: 0;
|
||||
margin-left: -300px;
|
||||
}
|
||||
/* search */
|
||||
#acf-field-group-wrap .search-box:after {
|
||||
display: block;
|
||||
content: "";
|
||||
height: 5px;
|
||||
}
|
||||
.acf-clear {
|
||||
clear: both;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1903,7 +1903,7 @@ var acf;
|
|||
|
||||
decode: function( string ){
|
||||
|
||||
return $('<div/>').html( string ).text();
|
||||
return $('<textarea/>').html( string ).text();
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
if( ! class_exists('acf_revisions') ) :
|
||||
|
||||
class acf_revisions {
|
||||
|
||||
/*
|
||||
|
|
@ -29,35 +33,6 @@ class acf_revisions {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* get_post_latest_revision
|
||||
*
|
||||
* This function will return the latest revision for a given post
|
||||
*
|
||||
* @type function
|
||||
* @date 25/06/2016
|
||||
* @since 5.3.8
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function get_post_latest_revision( $post_id ) {
|
||||
|
||||
// vars
|
||||
$revisions = wp_get_post_revisions( $post_id );
|
||||
|
||||
|
||||
// shift off and return first revision (will return null if no revisions)
|
||||
$revision = array_shift($revisions);
|
||||
|
||||
|
||||
// return
|
||||
return $revision;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* save_post
|
||||
*
|
||||
|
|
@ -77,8 +52,12 @@ class acf_revisions {
|
|||
if( !post_type_supports($post->post_type, 'revisions') ) return $post_id;
|
||||
|
||||
|
||||
// bail early if not published (no need to save revision)
|
||||
if( $post->post_status != 'publish' ) return $post_id;
|
||||
|
||||
|
||||
// get latest revision
|
||||
$revision = $this->get_post_latest_revision( $post_id );
|
||||
$revision = acf_get_post_latest_revision( $post_id );
|
||||
|
||||
|
||||
// save
|
||||
|
|
@ -366,7 +345,7 @@ class acf_revisions {
|
|||
|
||||
// Make sure the latest revision is also updated to match the new $post data
|
||||
// get latest revision
|
||||
$revision = $this->get_post_latest_revision( $post_id );
|
||||
$revision = acf_get_post_latest_revision( $post_id );
|
||||
|
||||
|
||||
// save
|
||||
|
|
@ -382,6 +361,39 @@ class acf_revisions {
|
|||
|
||||
}
|
||||
|
||||
new acf_revisions();
|
||||
// initialize
|
||||
acf()->revisions = new acf_revisions();
|
||||
|
||||
endif; // class_exists check
|
||||
|
||||
|
||||
/*
|
||||
* acf_get_post_latest_revision
|
||||
*
|
||||
* This function will return the latest revision for a given post
|
||||
*
|
||||
* @type function
|
||||
* @date 25/06/2016
|
||||
* @since 5.3.8
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function acf_get_post_latest_revision( $post_id ) {
|
||||
|
||||
// vars
|
||||
$revisions = wp_get_post_revisions( $post_id );
|
||||
|
||||
|
||||
// shift off and return first revision (will return null if no revisions)
|
||||
$revision = array_shift($revisions);
|
||||
|
||||
|
||||
// return
|
||||
return $revision;
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ class acf_validation {
|
|||
add_action('wp_ajax_acf/validate_save_post', array($this, 'ajax_validate_save_post'));
|
||||
add_action('wp_ajax_nopriv_acf/validate_save_post', array($this, 'ajax_validate_save_post'));
|
||||
|
||||
|
||||
// filters
|
||||
add_filter('acf/validate_save_post', array($this, 'acf_validate_save_post'), 5);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -251,22 +255,23 @@ class acf_validation {
|
|||
|
||||
|
||||
/*
|
||||
* validate_save_post
|
||||
* acf_validate_save_post
|
||||
*
|
||||
* This function will validate $_POST data and add errors
|
||||
* This function will loop over $_POST data and validate
|
||||
*
|
||||
* @type function
|
||||
* @date 25/11/2013
|
||||
* @since 5.0.0
|
||||
* @type action 'acf/validate_save_post' 5
|
||||
* @date 7/09/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $show_errors (boolean) if true, errors will be shown via a wp_die screen
|
||||
* @return (boolean)
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function validate_save_post( $show_errors = false ) {
|
||||
function acf_validate_save_post() {
|
||||
|
||||
// bail early if no $_POST
|
||||
if( empty($_POST['acf']) ) return;
|
||||
|
||||
// validate fields
|
||||
if( !empty($_POST['acf']) ) {
|
||||
|
||||
// loop
|
||||
foreach( $_POST['acf'] as $field_key => $value ) {
|
||||
|
|
@ -288,7 +293,22 @@ class acf_validation {
|
|||
}
|
||||
|
||||
|
||||
// action for 3rd party customization
|
||||
/*
|
||||
* validate_save_post
|
||||
*
|
||||
* This function will validate $_POST data and add errors
|
||||
*
|
||||
* @type function
|
||||
* @date 25/11/2013
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $show_errors (boolean) if true, errors will be shown via a wp_die screen
|
||||
* @return (boolean)
|
||||
*/
|
||||
|
||||
function validate_save_post( $show_errors = false ) {
|
||||
|
||||
// action
|
||||
do_action('acf/validate_save_post');
|
||||
|
||||
|
||||
|
|
|
|||
315
lang/acf.pot
315
lang/acf.pot
|
|
@ -3,7 +3,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Advanced Custom Fields\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"POT-Creation-Date: 2016-07-28 10:51+1000\n"
|
||||
"POT-Creation-Date: 2016-09-13 12:28+1000\n"
|
||||
"PO-Revision-Date: 2015-06-11 13:00+1000\n"
|
||||
"Last-Translator: Elliot Condon <e@elliotcondon.com>\n"
|
||||
"Language-Team: Elliot Condon <e@elliotcondon.com>\n"
|
||||
|
|
@ -26,91 +26,91 @@ msgstr ""
|
|||
msgid "Advanced Custom Fields"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:271 admin/admin.php:61
|
||||
#: acf.php:273 admin/admin.php:61
|
||||
msgid "Field Groups"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:272
|
||||
#: acf.php:274
|
||||
msgid "Field Group"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:273 acf.php:305 admin/admin.php:62
|
||||
#: acf.php:275 acf.php:307 admin/admin.php:62
|
||||
#: pro/fields/flexible-content.php:500
|
||||
msgid "Add New"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:274
|
||||
#: acf.php:276
|
||||
msgid "Add New Field Group"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:275
|
||||
#: acf.php:277
|
||||
msgid "Edit Field Group"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:276
|
||||
#: acf.php:278
|
||||
msgid "New Field Group"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:277
|
||||
#: acf.php:279
|
||||
msgid "View Field Group"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:278
|
||||
#: acf.php:280
|
||||
msgid "Search Field Groups"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:279
|
||||
#: acf.php:281
|
||||
msgid "No Field Groups found"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:280
|
||||
#: acf.php:282
|
||||
msgid "No Field Groups found in Trash"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:303 admin/field-group.php:182 admin/field-group.php:280
|
||||
#: admin/field-groups.php:528 pro/fields/clone.php:662
|
||||
#: acf.php:305 admin/field-group.php:182 admin/field-group.php:280
|
||||
#: admin/field-groups.php:528 pro/fields/clone.php:684
|
||||
msgid "Fields"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:304
|
||||
#: acf.php:306
|
||||
msgid "Field"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:306
|
||||
#: acf.php:308
|
||||
msgid "Add New Field"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:307
|
||||
#: acf.php:309
|
||||
msgid "Edit Field"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:308 admin/views/field-group-fields.php:54
|
||||
#: acf.php:310 admin/views/field-group-fields.php:54
|
||||
#: admin/views/settings-info.php:111
|
||||
msgid "New Field"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:309
|
||||
#: acf.php:311
|
||||
msgid "View Field"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:310
|
||||
#: acf.php:312
|
||||
msgid "Search Fields"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:311
|
||||
#: acf.php:313
|
||||
msgid "No Fields found"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:312
|
||||
#: acf.php:314
|
||||
msgid "No Fields found in Trash"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:351 admin/field-group.php:395 admin/field-groups.php:585
|
||||
#: acf.php:353 admin/field-group.php:395 admin/field-groups.php:585
|
||||
#: admin/views/field-group-options.php:13
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#: acf.php:356
|
||||
#: acf.php:358
|
||||
#, php-format
|
||||
msgid "Disabled <span class=\"count\">(%s)</span>"
|
||||
msgid_plural "Disabled <span class=\"count\">(%s)</span>"
|
||||
|
|
@ -181,7 +181,7 @@ msgstr ""
|
|||
#: admin/views/field-group-field-conditional-logic.php:62
|
||||
#: admin/views/field-group-field-conditional-logic.php:162
|
||||
#: admin/views/field-group-locations.php:59
|
||||
#: admin/views/field-group-locations.php:135 api/api-helpers.php:3952
|
||||
#: admin/views/field-group-locations.php:135 api/api-helpers.php:3973
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -221,79 +221,79 @@ msgstr ""
|
|||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:842
|
||||
#: admin/field-group.php:846
|
||||
msgid "Front Page"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:843
|
||||
#: admin/field-group.php:847
|
||||
msgid "Posts Page"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:844
|
||||
#: admin/field-group.php:848
|
||||
msgid "Top Level Page (no parent)"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:845
|
||||
#: admin/field-group.php:849
|
||||
msgid "Parent Page (has children)"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:846
|
||||
#: admin/field-group.php:850
|
||||
msgid "Child Page (has parent)"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:862
|
||||
#: admin/field-group.php:866
|
||||
msgid "Default Template"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:885
|
||||
#: admin/field-group.php:889
|
||||
msgid "Logged in"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:886
|
||||
#: admin/field-group.php:890
|
||||
msgid "Viewing front end"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:887
|
||||
#: admin/field-group.php:891
|
||||
msgid "Viewing back end"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:906
|
||||
#: admin/field-group.php:910
|
||||
msgid "Super Admin"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:917 admin/field-group.php:925
|
||||
#: admin/field-group.php:939 admin/field-group.php:946
|
||||
#: admin/field-group.php:963 admin/field-group.php:980 fields/file.php:241
|
||||
#: admin/field-group.php:921 admin/field-group.php:929
|
||||
#: admin/field-group.php:943 admin/field-group.php:950
|
||||
#: admin/field-group.php:967 admin/field-group.php:984 fields/file.php:241
|
||||
#: fields/image.php:237 pro/fields/gallery.php:676
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:926
|
||||
#: admin/field-group.php:930
|
||||
msgid "Add / Edit"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:927
|
||||
#: admin/field-group.php:931
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:1167
|
||||
#: admin/field-group.php:1171
|
||||
msgid "Move Complete."
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:1168
|
||||
#: admin/field-group.php:1172
|
||||
#, php-format
|
||||
msgid "The %s field can now be found in the %s field group"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:1170
|
||||
#: admin/field-group.php:1174
|
||||
msgid "Close Window"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:1205
|
||||
#: admin/field-group.php:1209
|
||||
msgid "Please select the destination for this field"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-group.php:1212
|
||||
#: admin/field-group.php:1216
|
||||
msgid "Move Field"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -332,8 +332,8 @@ msgstr[1] ""
|
|||
msgid "Sync available"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-groups.php:525 api/api-template.php:1077
|
||||
#: api/api-template.php:1290 pro/fields/gallery.php:370
|
||||
#: admin/field-groups.php:525 api/api-template.php:1041
|
||||
#: pro/fields/gallery.php:370
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -411,16 +411,21 @@ msgstr ""
|
|||
msgid "Duplicate"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-groups.php:751
|
||||
#: admin/field-groups.php:717 fields/google-map.php:133
|
||||
#: fields/relationship.php:742
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-groups.php:767
|
||||
#, php-format
|
||||
msgid "Select %s"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-groups.php:759
|
||||
#: admin/field-groups.php:775
|
||||
msgid "Synchronise field group"
|
||||
msgstr ""
|
||||
|
||||
#: admin/field-groups.php:759 admin/field-groups.php:776
|
||||
#: admin/field-groups.php:775 admin/field-groups.php:792
|
||||
msgid "Sync"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -504,9 +509,9 @@ msgstr ""
|
|||
#: fields/select.php:483 fields/select.php:497 fields/select.php:511
|
||||
#: fields/tab.php:130 fields/taxonomy.php:785 fields/taxonomy.php:799
|
||||
#: fields/taxonomy.php:813 fields/taxonomy.php:827 fields/user.php:399
|
||||
#: fields/user.php:413 fields/wysiwyg.php:418
|
||||
#: pro/admin/views/settings-updates.php:93 pro/fields/clone.php:716
|
||||
#: pro/fields/clone.php:734
|
||||
#: fields/user.php:413 fields/wysiwyg.php:422
|
||||
#: pro/admin/views/settings-updates.php:93 pro/fields/clone.php:738
|
||||
#: pro/fields/clone.php:756
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -518,9 +523,9 @@ msgstr ""
|
|||
#: fields/select.php:484 fields/select.php:498 fields/select.php:512
|
||||
#: fields/tab.php:131 fields/taxonomy.php:700 fields/taxonomy.php:786
|
||||
#: fields/taxonomy.php:800 fields/taxonomy.php:814 fields/taxonomy.php:828
|
||||
#: fields/user.php:400 fields/user.php:414 fields/wysiwyg.php:419
|
||||
#: pro/admin/views/settings-updates.php:103 pro/fields/clone.php:717
|
||||
#: pro/fields/clone.php:735
|
||||
#: fields/user.php:400 fields/user.php:414 fields/wysiwyg.php:423
|
||||
#: pro/admin/views/settings-updates.php:103 pro/fields/clone.php:739
|
||||
#: pro/fields/clone.php:757
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -549,7 +554,7 @@ msgid "Add rule group"
|
|||
msgstr ""
|
||||
|
||||
#: admin/views/field-group-field.php:50 pro/fields/flexible-content.php:346
|
||||
#: pro/fields/repeater.php:302
|
||||
#: pro/fields/repeater.php:311
|
||||
msgid "Drag to reorder"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1277,87 +1282,87 @@ msgstr ""
|
|||
msgid "See what's new"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:944
|
||||
#: api/api-helpers.php:950
|
||||
msgid "Thumbnail"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:945
|
||||
#: api/api-helpers.php:951
|
||||
msgid "Medium"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:946
|
||||
#: api/api-helpers.php:952
|
||||
msgid "Large"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:995
|
||||
#: api/api-helpers.php:1001
|
||||
msgid "Full Size"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:1207 api/api-helpers.php:1770 pro/fields/clone.php:849
|
||||
#: api/api-helpers.php:1213 api/api-helpers.php:1776 pro/fields/clone.php:871
|
||||
msgid "(no title)"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:1807 fields/page_link.php:284
|
||||
#: api/api-helpers.php:1813 fields/page_link.php:284
|
||||
#: fields/post_object.php:283 fields/taxonomy.php:989
|
||||
msgid "Parent"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3873
|
||||
#: api/api-helpers.php:3894
|
||||
#, php-format
|
||||
msgid "Image width must be at least %dpx."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3878
|
||||
#: api/api-helpers.php:3899
|
||||
#, php-format
|
||||
msgid "Image width must not exceed %dpx."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3894
|
||||
#: api/api-helpers.php:3915
|
||||
#, php-format
|
||||
msgid "Image height must be at least %dpx."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3899
|
||||
#: api/api-helpers.php:3920
|
||||
#, php-format
|
||||
msgid "Image height must not exceed %dpx."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3917
|
||||
#: api/api-helpers.php:3938
|
||||
#, php-format
|
||||
msgid "File size must be at least %s."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3922
|
||||
#: api/api-helpers.php:3943
|
||||
#, php-format
|
||||
msgid "File size must must not exceed %s."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-helpers.php:3956
|
||||
#: api/api-helpers.php:3977
|
||||
#, php-format
|
||||
msgid "File type must be %s."
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1092
|
||||
#: api/api-template.php:1050 core/field.php:133
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1058
|
||||
msgid "Validate Email"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1108
|
||||
msgid "Spam Detected"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1235 pro/api/api-options-page.php:50
|
||||
#: api/api-template.php:1311 pro/api/api-options-page.php:50
|
||||
#: pro/fields/gallery.php:588
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1236
|
||||
#: api/api-template.php:1312
|
||||
msgid "Post updated"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1304 core/field.php:133
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
#: api/api-template.php:1369
|
||||
msgid "Validate Email"
|
||||
msgstr ""
|
||||
|
||||
#: core/field.php:132
|
||||
msgid "Basic"
|
||||
msgstr ""
|
||||
|
|
@ -1375,8 +1380,8 @@ msgid "jQuery"
|
|||
msgstr ""
|
||||
|
||||
#: core/field.php:137 fields/checkbox.php:224 fields/radio.php:293
|
||||
#: pro/fields/clone.php:692 pro/fields/flexible-content.php:495
|
||||
#: pro/fields/flexible-content.php:544 pro/fields/repeater.php:459
|
||||
#: pro/fields/clone.php:714 pro/fields/flexible-content.php:495
|
||||
#: pro/fields/flexible-content.php:544 pro/fields/repeater.php:468
|
||||
msgid "Layout"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1392,7 +1397,7 @@ msgstr ""
|
|||
msgid "Validation successful"
|
||||
msgstr ""
|
||||
|
||||
#: core/input.php:261 core/validation.php:306 forms/widget.php:234
|
||||
#: core/input.php:261 core/validation.php:326 forms/widget.php:234
|
||||
msgid "Validation failed"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1429,7 +1434,7 @@ msgstr ""
|
|||
msgid "Uploaded to this post"
|
||||
msgstr ""
|
||||
|
||||
#: core/validation.php:207
|
||||
#: core/validation.php:211
|
||||
#, php-format
|
||||
msgid "%s value is required"
|
||||
msgstr ""
|
||||
|
|
@ -1458,10 +1463,10 @@ msgstr ""
|
|||
msgid "red : Red"
|
||||
msgstr ""
|
||||
|
||||
#: fields/checkbox.php:215 fields/color_picker.php:147 fields/email.php:124
|
||||
#: fields/number.php:150 fields/radio.php:284 fields/select.php:455
|
||||
#: fields/text.php:148 fields/textarea.php:145 fields/true_false.php:115
|
||||
#: fields/url.php:117 fields/wysiwyg.php:379
|
||||
#: fields/checkbox.php:215 fields/color_picker.php:147 fields/email.php:133
|
||||
#: fields/number.php:145 fields/radio.php:284 fields/select.php:455
|
||||
#: fields/text.php:142 fields/textarea.php:139 fields/true_false.php:115
|
||||
#: fields/url.php:114 fields/wysiwyg.php:383
|
||||
msgid "Default Value"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1660,39 +1665,39 @@ msgstr ""
|
|||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:125 fields/number.php:151 fields/radio.php:285
|
||||
#: fields/text.php:149 fields/textarea.php:146 fields/url.php:118
|
||||
#: fields/wysiwyg.php:380
|
||||
#: fields/email.php:134 fields/number.php:146 fields/radio.php:285
|
||||
#: fields/text.php:143 fields/textarea.php:140 fields/url.php:115
|
||||
#: fields/wysiwyg.php:384
|
||||
msgid "Appears when creating a new post"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:133 fields/number.php:159 fields/password.php:137
|
||||
#: fields/text.php:157 fields/textarea.php:154 fields/url.php:126
|
||||
#: fields/email.php:142 fields/number.php:154 fields/password.php:134
|
||||
#: fields/text.php:151 fields/textarea.php:148 fields/url.php:123
|
||||
msgid "Placeholder Text"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:134 fields/number.php:160 fields/password.php:138
|
||||
#: fields/text.php:158 fields/textarea.php:155 fields/url.php:127
|
||||
#: fields/email.php:143 fields/number.php:155 fields/password.php:135
|
||||
#: fields/text.php:152 fields/textarea.php:149 fields/url.php:124
|
||||
msgid "Appears within the input"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:142 fields/number.php:168 fields/password.php:146
|
||||
#: fields/text.php:166
|
||||
#: fields/email.php:151 fields/number.php:163 fields/password.php:143
|
||||
#: fields/text.php:160
|
||||
msgid "Prepend"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:143 fields/number.php:169 fields/password.php:147
|
||||
#: fields/text.php:167
|
||||
#: fields/email.php:152 fields/number.php:164 fields/password.php:144
|
||||
#: fields/text.php:161
|
||||
msgid "Appears before the input"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:151 fields/number.php:177 fields/password.php:155
|
||||
#: fields/text.php:175
|
||||
#: fields/email.php:160 fields/number.php:172 fields/password.php:152
|
||||
#: fields/text.php:169
|
||||
msgid "Append"
|
||||
msgstr ""
|
||||
|
||||
#: fields/email.php:152 fields/number.php:178 fields/password.php:156
|
||||
#: fields/text.php:176
|
||||
#: fields/email.php:161 fields/number.php:173 fields/password.php:153
|
||||
#: fields/text.php:170
|
||||
msgid "Appears after the input"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1778,10 +1783,6 @@ msgstr ""
|
|||
msgid "Sorry, this browser does not support geolocation"
|
||||
msgstr ""
|
||||
|
||||
#: fields/google-map.php:133 fields/relationship.php:742
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: fields/google-map.php:134
|
||||
msgid "Clear location"
|
||||
msgstr ""
|
||||
|
|
@ -1885,23 +1886,23 @@ msgstr ""
|
|||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#: fields/message.php:125 fields/textarea.php:182
|
||||
#: fields/message.php:125 fields/textarea.php:176
|
||||
msgid "New Lines"
|
||||
msgstr ""
|
||||
|
||||
#: fields/message.php:126 fields/textarea.php:183
|
||||
#: fields/message.php:126 fields/textarea.php:177
|
||||
msgid "Controls how new lines are rendered"
|
||||
msgstr ""
|
||||
|
||||
#: fields/message.php:130 fields/textarea.php:187
|
||||
#: fields/message.php:130 fields/textarea.php:181
|
||||
msgid "Automatically add paragraphs"
|
||||
msgstr ""
|
||||
|
||||
#: fields/message.php:131 fields/textarea.php:188
|
||||
#: fields/message.php:131 fields/textarea.php:182
|
||||
msgid "Automatically add <br>"
|
||||
msgstr ""
|
||||
|
||||
#: fields/message.php:132 fields/textarea.php:189
|
||||
#: fields/message.php:132 fields/textarea.php:183
|
||||
msgid "No Formatting"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -1917,28 +1918,28 @@ msgstr ""
|
|||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:186
|
||||
#: fields/number.php:181
|
||||
msgid "Minimum Value"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:195
|
||||
#: fields/number.php:190
|
||||
msgid "Maximum Value"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:204
|
||||
#: fields/number.php:199
|
||||
msgid "Step Size"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:242
|
||||
#: fields/number.php:237
|
||||
msgid "Value must be a number"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:260
|
||||
#: fields/number.php:255
|
||||
#, php-format
|
||||
msgid "Value must be equal to or higher than %d"
|
||||
msgstr ""
|
||||
|
||||
#: fields/number.php:268
|
||||
#: fields/number.php:263
|
||||
#, php-format
|
||||
msgid "Value must be equal to or lower than %d"
|
||||
msgstr ""
|
||||
|
|
@ -2292,11 +2293,11 @@ msgstr ""
|
|||
msgid "Text"
|
||||
msgstr ""
|
||||
|
||||
#: fields/text.php:184 fields/textarea.php:163
|
||||
#: fields/text.php:178 fields/textarea.php:157
|
||||
msgid "Character Limit"
|
||||
msgstr ""
|
||||
|
||||
#: fields/text.php:185 fields/textarea.php:164
|
||||
#: fields/text.php:179 fields/textarea.php:158
|
||||
msgid "Leave blank for no limit"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2304,11 +2305,11 @@ msgstr ""
|
|||
msgid "Text Area"
|
||||
msgstr ""
|
||||
|
||||
#: fields/textarea.php:172
|
||||
#: fields/textarea.php:166
|
||||
msgid "Rows"
|
||||
msgstr ""
|
||||
|
||||
#: fields/textarea.php:173
|
||||
#: fields/textarea.php:167
|
||||
msgid "Sets the textarea height"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2328,7 +2329,7 @@ msgstr ""
|
|||
msgid "Url"
|
||||
msgstr ""
|
||||
|
||||
#: fields/url.php:168
|
||||
#: fields/url.php:165
|
||||
msgid "Value must be a valid URL"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2344,36 +2345,36 @@ msgstr ""
|
|||
msgid "Wysiwyg Editor"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:331
|
||||
#: fields/wysiwyg.php:335
|
||||
msgid "Visual"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:332
|
||||
#: fields/wysiwyg.php:336
|
||||
msgctxt "Name for the Text editor tab (formerly HTML)"
|
||||
msgid "Text"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:388
|
||||
#: fields/wysiwyg.php:392
|
||||
msgid "Tabs"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:393
|
||||
#: fields/wysiwyg.php:397
|
||||
msgid "Visual & Text"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:394
|
||||
#: fields/wysiwyg.php:398
|
||||
msgid "Visual Only"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:395
|
||||
#: fields/wysiwyg.php:399
|
||||
msgid "Text Only"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:402
|
||||
#: fields/wysiwyg.php:406
|
||||
msgid "Toolbar"
|
||||
msgstr ""
|
||||
|
||||
#: fields/wysiwyg.php:412
|
||||
#: fields/wysiwyg.php:416
|
||||
msgid "Show Media Upload Buttons?"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2498,64 +2499,64 @@ msgctxt "noun"
|
|||
msgid "Clone"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:663
|
||||
#: pro/fields/clone.php:685
|
||||
msgid "Select one or more fields you wish to clone"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:678
|
||||
#: pro/fields/clone.php:700
|
||||
msgid "Display"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:679
|
||||
#: pro/fields/clone.php:701
|
||||
msgid "Specify the style used to render the clone field"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:684
|
||||
#: pro/fields/clone.php:706
|
||||
msgid "Group (displays selected fields in a group within this field)"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:685
|
||||
#: pro/fields/clone.php:707
|
||||
msgid "Seamless (replaces this field with selected fields)"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:693
|
||||
#: pro/fields/clone.php:715
|
||||
msgid "Specify the style used to render the selected fields"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:698 pro/fields/flexible-content.php:555
|
||||
#: pro/fields/repeater.php:467
|
||||
#: pro/fields/clone.php:720 pro/fields/flexible-content.php:555
|
||||
#: pro/fields/repeater.php:476
|
||||
msgid "Block"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:699 pro/fields/flexible-content.php:554
|
||||
#: pro/fields/repeater.php:466
|
||||
#: pro/fields/clone.php:721 pro/fields/flexible-content.php:554
|
||||
#: pro/fields/repeater.php:475
|
||||
msgid "Table"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:700 pro/fields/flexible-content.php:556
|
||||
#: pro/fields/repeater.php:468
|
||||
#: pro/fields/clone.php:722 pro/fields/flexible-content.php:556
|
||||
#: pro/fields/repeater.php:477
|
||||
msgid "Row"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:706
|
||||
#: pro/fields/clone.php:728
|
||||
#, php-format
|
||||
msgid "Labels will be displayed as %s"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:709
|
||||
#: pro/fields/clone.php:731
|
||||
msgid "Prefix Field Labels"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:724
|
||||
#: pro/fields/clone.php:746
|
||||
#, php-format
|
||||
msgid "Values will be saved as %s"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:727
|
||||
#: pro/fields/clone.php:749
|
||||
msgid "Prefix Field Names"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/clone.php:883
|
||||
#: pro/fields/clone.php:905
|
||||
#, php-format
|
||||
msgid "All fields from %s field group"
|
||||
msgstr ""
|
||||
|
|
@ -2617,7 +2618,7 @@ msgstr ""
|
|||
msgid "Remove layout"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/flexible-content.php:356 pro/fields/repeater.php:304
|
||||
#: pro/fields/flexible-content.php:356 pro/fields/repeater.php:313
|
||||
msgid "Click to toggle"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2649,7 +2650,7 @@ msgstr ""
|
|||
msgid "Max"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/flexible-content.php:612 pro/fields/repeater.php:475
|
||||
#: pro/fields/flexible-content.php:612 pro/fields/repeater.php:484
|
||||
msgid "Button Label"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -2749,31 +2750,31 @@ msgstr ""
|
|||
msgid "Maximum rows reached ({max} rows)"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:349
|
||||
#: pro/fields/repeater.php:358
|
||||
msgid "Add row"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:350
|
||||
#: pro/fields/repeater.php:359
|
||||
msgid "Remove row"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:398
|
||||
#: pro/fields/repeater.php:407
|
||||
msgid "Sub Fields"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:428
|
||||
#: pro/fields/repeater.php:437
|
||||
msgid "Collapsed"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:429
|
||||
#: pro/fields/repeater.php:438
|
||||
msgid "Select a sub field to show when row is collapsed"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:439
|
||||
#: pro/fields/repeater.php:448
|
||||
msgid "Minimum Rows"
|
||||
msgstr ""
|
||||
|
||||
#: pro/fields/repeater.php:449
|
||||
#: pro/fields/repeater.php:458
|
||||
msgid "Maximum Rows"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,15 @@ http://support.advancedcustomfields.com/
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 5.4.6-RC1 =
|
||||
* Flexible content field: Fixed bug where radio input values were lost when adding/duplicating a layout
|
||||
|
||||
= 5.4.5 =
|
||||
* API: Fixed bug in `acf_form()` where AJAX validation ignored 'post_title'
|
||||
* API: Improved `update_field()` when saving a new value (when reference value does not yet exist)
|
||||
* Core: Added search input & toggle to admin field groups list
|
||||
* Core: Fixed bug where preview values did not load for a draft post
|
||||
|
||||
= 5.4.4 =
|
||||
* WYSIWYG field: Fixed JS error when 'Disable the visual editor when writing' is checked
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue