Version Description
- Color Picker field: Fixed JS bug preventing wpColorPicker from updating value correctly
- Google Map field: Added new setting for initial zoom level
- Relationship field: minor update to fix compatibility issue with Polylang plugin
- Relationship field: Fixed bug causing filters / actions using $field['name'] to not fire correctly
- API: Fixed bug with have_rows/has_sub_field function where looping through multiple posts each containing nested repeater fields would result in an endless loop
- Export: Fixed bug causing exported XML fields to become corrupt due to line breaks
- Core: Fixed bug where duplicating a field would cause conditional logic to appear blank
- Core: Added Conditional Logic support to hide entire column of a repeater field where max_row is 1.
- Core: Added new field group 'hide on screen' option for 'permalink' which hides the permalink URL and buttons below the post title
Download this release
Release Info
Developer | elliotcondon |
Plugin | Advanced Custom Fields |
Version | 4.3.2 |
Comparing to | |
See all releases |
Code changes from version 4.3.1 to 4.3.2
- acf.php +3 -2
- core/actions/export.php +36 -2
- core/api.php +1 -1
- core/controllers/export.php +1 -1
- core/controllers/post.php +4 -0
- core/fields/_functions.php +8 -0
- core/fields/google-map.php +24 -3
- core/fields/post_object.php +2 -2
- core/fields/relationship.php +7 -4
- core/views/meta_box_options.php +1 -0
- js/field-group.js +7 -7
- js/field-group.min.js +1 -1
- js/input.js +18 -11
- js/input.min.js +2 -2
- lang/acf.pot +73 -61
- readme.txt +11 -0
acf.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Advanced Custom Fields
|
4 |
Plugin URI: http://www.advancedcustomfields.com/
|
5 |
Description: Fully customise WordPress edit screens with powerful fields. Boasting a professional interface and a powerfull API, it’s a must have for any web developer working with WordPress. Field types include: Wysiwyg, text, textarea, image, file, select, checkbox, page link, post object, date picker, color picker, repeater, flexible content, gallery and more!
|
6 |
-
Version: 4.3.
|
7 |
Author: Elliot Condon
|
8 |
Author URI: http://www.elliotcondon.com/
|
9 |
License: GPL
|
@@ -43,7 +43,7 @@ class acf
|
|
43 |
'path' => apply_filters('acf/helpers/get_path', __FILE__),
|
44 |
'dir' => apply_filters('acf/helpers/get_dir', __FILE__),
|
45 |
'hook' => basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ),
|
46 |
-
'version' => '4.3.
|
47 |
'upgrade_version' => '3.4.1',
|
48 |
);
|
49 |
|
@@ -256,6 +256,7 @@ class acf
|
|
256 |
$restricted = array(
|
257 |
'label',
|
258 |
'name',
|
|
|
259 |
'value',
|
260 |
'instructions'
|
261 |
);
|
3 |
Plugin Name: Advanced Custom Fields
|
4 |
Plugin URI: http://www.advancedcustomfields.com/
|
5 |
Description: Fully customise WordPress edit screens with powerful fields. Boasting a professional interface and a powerfull API, it’s a must have for any web developer working with WordPress. Field types include: Wysiwyg, text, textarea, image, file, select, checkbox, page link, post object, date picker, color picker, repeater, flexible content, gallery and more!
|
6 |
+
Version: 4.3.2
|
7 |
Author: Elliot Condon
|
8 |
Author URI: http://www.elliotcondon.com/
|
9 |
License: GPL
|
43 |
'path' => apply_filters('acf/helpers/get_path', __FILE__),
|
44 |
'dir' => apply_filters('acf/helpers/get_dir', __FILE__),
|
45 |
'hook' => basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ),
|
46 |
+
'version' => '4.3.2',
|
47 |
'upgrade_version' => '3.4.1',
|
48 |
);
|
49 |
|
256 |
$restricted = array(
|
257 |
'label',
|
258 |
'name',
|
259 |
+
'_name',
|
260 |
'value',
|
261 |
'instructions'
|
262 |
);
|
core/actions/export.php
CHANGED
@@ -44,6 +44,37 @@ if( empty($my_options['acf_posts']) )
|
|
44 |
define( 'WXR_VERSION', '1.1' );
|
45 |
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/**
|
48 |
* Wrap given string in XML CDATA tag.
|
49 |
*
|
@@ -224,8 +255,11 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . "\" ?>\n";
|
|
224 |
<wp:post_password><?php echo $post->post_password; ?></wp:post_password>
|
225 |
<?php $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
|
226 |
foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) :
|
227 |
-
|
228 |
-
$meta->meta_value =
|
|
|
|
|
|
|
229 |
?>
|
230 |
<wp:postmeta>
|
231 |
<wp:meta_key><?php echo $meta->meta_key; ?></wp:meta_key>
|
44 |
define( 'WXR_VERSION', '1.1' );
|
45 |
|
46 |
|
47 |
+
/*
|
48 |
+
* fix_line_breaks
|
49 |
+
*
|
50 |
+
* This function will loop through all array pieces and correct double line breaks from DB to XML
|
51 |
+
*
|
52 |
+
* @type function
|
53 |
+
* @date 2/12/2013
|
54 |
+
* @since 5.0.0
|
55 |
+
*
|
56 |
+
* @param $v (mixed)
|
57 |
+
* @return $v (mixed)
|
58 |
+
*/
|
59 |
+
|
60 |
+
function fix_line_breaks( $v )
|
61 |
+
{
|
62 |
+
if( is_array($v) )
|
63 |
+
{
|
64 |
+
foreach( array_keys($v) as $k )
|
65 |
+
{
|
66 |
+
$v[ $k ] = fix_line_breaks( $v[ $k ] );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
elseif( is_string($v) )
|
70 |
+
{
|
71 |
+
$v = str_replace("\r\n", "\r", $v);
|
72 |
+
}
|
73 |
+
|
74 |
+
return $v;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
/**
|
79 |
* Wrap given string in XML CDATA tag.
|
80 |
*
|
255 |
<wp:post_password><?php echo $post->post_password; ?></wp:post_password>
|
256 |
<?php $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
|
257 |
foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) :
|
258 |
+
|
259 |
+
$meta->meta_value = maybe_unserialize( $meta->meta_value );
|
260 |
+
$meta->meta_value = fix_line_breaks( $meta->meta_value );
|
261 |
+
$meta->meta_value = maybe_serialize( $meta->meta_value );
|
262 |
+
|
263 |
?>
|
264 |
<wp:postmeta>
|
265 |
<wp:meta_key><?php echo $meta->meta_key; ?></wp:meta_key>
|
core/api.php
CHANGED
@@ -402,7 +402,7 @@ function have_rows( $field_name, $post_id = false )
|
|
402 |
}
|
403 |
elseif( $field_name != $row['name'] )
|
404 |
{
|
405 |
-
if( $prev && $prev['name'] == $field_name )
|
406 |
{
|
407 |
// case: Change in $field_name was due to a nested loop ending
|
408 |
// action: move up one level through the loops
|
402 |
}
|
403 |
elseif( $field_name != $row['name'] )
|
404 |
{
|
405 |
+
if( $prev && $prev['name'] == $field_name && $prev['post_id'] == $post_id )
|
406 |
{
|
407 |
// case: Change in $field_name was due to a nested loop ending
|
408 |
// action: move up one level through the loops
|
core/controllers/export.php
CHANGED
@@ -457,7 +457,7 @@ if(function_exists("register_field_group"))
|
|
457 |
foreach( $fields as $i => $field )
|
458 |
{
|
459 |
// unset unneccessary bits
|
460 |
-
unset( $field['id'], $field['class'], $field['order_no'], $field['field_group'] );
|
461 |
|
462 |
|
463 |
// instructions
|
457 |
foreach( $fields as $i => $field )
|
458 |
{
|
459 |
// unset unneccessary bits
|
460 |
+
unset( $field['id'], $field['class'], $field['order_no'], $field['field_group'], $field['_name'] );
|
461 |
|
462 |
|
463 |
// instructions
|
core/controllers/post.php
CHANGED
@@ -327,6 +327,10 @@ class acf_controller_post
|
|
327 |
|
328 |
|
329 |
// add style to html
|
|
|
|
|
|
|
|
|
330 |
if( in_array('the_content',$options['hide_on_screen']) )
|
331 |
{
|
332 |
$html .= '#postdivrich {display: none;} ';
|
327 |
|
328 |
|
329 |
// add style to html
|
330 |
+
if( in_array('permalink',$options['hide_on_screen']) )
|
331 |
+
{
|
332 |
+
$html .= '#edit-slug-box {display: none;} ';
|
333 |
+
}
|
334 |
if( in_array('the_content',$options['hide_on_screen']) )
|
335 |
{
|
336 |
$html .= '#postdivrich {display: none;} ';
|
core/fields/_functions.php
CHANGED
@@ -382,6 +382,7 @@ class acf_field_functions
|
|
382 |
'key' => '',
|
383 |
'label' => '',
|
384 |
'name' => '',
|
|
|
385 |
'type' => 'text',
|
386 |
'order_no' => 1,
|
387 |
'instructions' => '',
|
@@ -425,6 +426,13 @@ class acf_field_functions
|
|
425 |
}
|
426 |
|
427 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
// clean up conditional logic keys
|
429 |
if( !empty($field['conditional_logic']['rules']) )
|
430 |
{
|
382 |
'key' => '',
|
383 |
'label' => '',
|
384 |
'name' => '',
|
385 |
+
'_name' => '',
|
386 |
'type' => 'text',
|
387 |
'order_no' => 1,
|
388 |
'instructions' => '',
|
426 |
}
|
427 |
|
428 |
|
429 |
+
// _name
|
430 |
+
if( !$field['_name'] )
|
431 |
+
{
|
432 |
+
$field['_name'] = $field['name'];
|
433 |
+
}
|
434 |
+
|
435 |
+
|
436 |
// clean up conditional logic keys
|
437 |
if( !empty($field['conditional_logic']['rules']) )
|
438 |
{
|
core/fields/google-map.php
CHANGED
@@ -20,12 +20,14 @@ class acf_field_google_map extends acf_field
|
|
20 |
$this->defaults = array(
|
21 |
'height' => '',
|
22 |
'center_lat' => '',
|
23 |
-
'center_lng' => ''
|
|
|
24 |
);
|
25 |
$this->default_values = array(
|
26 |
'height' => '400',
|
27 |
'center_lat' => '-37.81411',
|
28 |
-
'center_lng' => '144.96328'
|
|
|
29 |
);
|
30 |
$this->l10n = array(
|
31 |
'locating' => __("Locating",'acf'),
|
@@ -94,7 +96,8 @@ class acf_field_google_map extends acf_field
|
|
94 |
$keys = array(
|
95 |
'data-id' => 'id',
|
96 |
'data-lat' => 'center_lat',
|
97 |
-
'data-lng' => 'center_lng'
|
|
|
98 |
);
|
99 |
|
100 |
foreach( $keys as $k => $v )
|
@@ -191,6 +194,24 @@ class acf_field_google_map extends acf_field
|
|
191 |
|
192 |
</td>
|
193 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
195 |
<td class="label">
|
196 |
<label><?php _e("Height",'acf'); ?></label>
|
20 |
$this->defaults = array(
|
21 |
'height' => '',
|
22 |
'center_lat' => '',
|
23 |
+
'center_lng' => '',
|
24 |
+
'zoom' => ''
|
25 |
);
|
26 |
$this->default_values = array(
|
27 |
'height' => '400',
|
28 |
'center_lat' => '-37.81411',
|
29 |
+
'center_lng' => '144.96328',
|
30 |
+
'zoom' => '14'
|
31 |
);
|
32 |
$this->l10n = array(
|
33 |
'locating' => __("Locating",'acf'),
|
96 |
$keys = array(
|
97 |
'data-id' => 'id',
|
98 |
'data-lat' => 'center_lat',
|
99 |
+
'data-lng' => 'center_lng',
|
100 |
+
'data-zoom' => 'zoom'
|
101 |
);
|
102 |
|
103 |
foreach( $keys as $k => $v )
|
194 |
|
195 |
</td>
|
196 |
</tr>
|
197 |
+
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
198 |
+
<td class="label">
|
199 |
+
<label><?php _e("Zoom",'acf'); ?></label>
|
200 |
+
<p class="description"><?php _e('Set the initial zoom level','acf'); ?></p>
|
201 |
+
</td>
|
202 |
+
<td>
|
203 |
+
<?php
|
204 |
+
|
205 |
+
do_action('acf/create_field', array(
|
206 |
+
'type' => 'number',
|
207 |
+
'name' => 'fields['.$key.'][zoom]',
|
208 |
+
'value' => $field['zoom'],
|
209 |
+
'placeholder' => $this->default_values['zoom']
|
210 |
+
));
|
211 |
+
|
212 |
+
?>
|
213 |
+
</td>
|
214 |
+
</tr>
|
215 |
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
216 |
<td class="label">
|
217 |
<label><?php _e("Height",'acf'); ?></label>
|
core/fields/post_object.php
CHANGED
@@ -166,7 +166,7 @@ class acf_field_post_object extends acf_field
|
|
166 |
|
167 |
// filters
|
168 |
$args = apply_filters('acf/fields/post_object/query', $args, $field, $post);
|
169 |
-
$args = apply_filters('acf/fields/post_object/query/name=' . $field['
|
170 |
$args = apply_filters('acf/fields/post_object/query/key=' . $field['key'], $args, $field, $post );
|
171 |
|
172 |
|
@@ -212,7 +212,7 @@ class acf_field_post_object extends acf_field
|
|
212 |
|
213 |
// filters
|
214 |
$title = apply_filters('acf/fields/post_object/result', $title, $p, $field, $post);
|
215 |
-
$title = apply_filters('acf/fields/post_object/result/name=' . $field['
|
216 |
$title = apply_filters('acf/fields/post_object/result/key=' . $field['key'], $title, $p, $field, $post);
|
217 |
|
218 |
|
166 |
|
167 |
// filters
|
168 |
$args = apply_filters('acf/fields/post_object/query', $args, $field, $post);
|
169 |
+
$args = apply_filters('acf/fields/post_object/query/name=' . $field['_name'], $args, $field, $post );
|
170 |
$args = apply_filters('acf/fields/post_object/query/key=' . $field['key'], $args, $field, $post );
|
171 |
|
172 |
|
212 |
|
213 |
// filters
|
214 |
$title = apply_filters('acf/fields/post_object/result', $title, $p, $field, $post);
|
215 |
+
$title = apply_filters('acf/fields/post_object/result/name=' . $field['_name'] , $title, $p, $field, $post);
|
216 |
$title = apply_filters('acf/fields/post_object/result/key=' . $field['key'], $title, $p, $field, $post);
|
217 |
|
218 |
|
core/fields/relationship.php
CHANGED
@@ -170,7 +170,10 @@ class acf_field_relationship extends acf_field
|
|
170 |
{
|
171 |
global $sitepress;
|
172 |
|
173 |
-
|
|
|
|
|
|
|
174 |
}
|
175 |
|
176 |
|
@@ -265,7 +268,7 @@ class acf_field_relationship extends acf_field
|
|
265 |
|
266 |
// filters
|
267 |
$options = apply_filters('acf/fields/relationship/query', $options, $field, $the_post);
|
268 |
-
$options = apply_filters('acf/fields/relationship/query/name=' . $field['
|
269 |
$options = apply_filters('acf/fields/relationship/query/key=' . $field['key'], $options, $field, $the_post );
|
270 |
|
271 |
|
@@ -322,7 +325,7 @@ class acf_field_relationship extends acf_field
|
|
322 |
|
323 |
// filters
|
324 |
$title = apply_filters('acf/fields/relationship/result', $title, $post, $field, $the_post);
|
325 |
-
$title = apply_filters('acf/fields/relationship/result/name=' . $field['
|
326 |
$title = apply_filters('acf/fields/relationship/result/key=' . $field['key'], $title, $post, $field, $the_post);
|
327 |
|
328 |
|
@@ -521,7 +524,7 @@ class acf_field_relationship extends acf_field
|
|
521 |
|
522 |
// filters
|
523 |
$title = apply_filters('acf/fields/relationship/result', $title, $p, $field, $post);
|
524 |
-
$title = apply_filters('acf/fields/relationship/result/name=' . $field['
|
525 |
$title = apply_filters('acf/fields/relationship/result/key=' . $field['key'], $title, $p, $field, $post);
|
526 |
|
527 |
|
170 |
{
|
171 |
global $sitepress;
|
172 |
|
173 |
+
if( !empty($sitepress) )
|
174 |
+
{
|
175 |
+
$sitepress->switch_lang( $options['lang'] );
|
176 |
+
}
|
177 |
}
|
178 |
|
179 |
|
268 |
|
269 |
// filters
|
270 |
$options = apply_filters('acf/fields/relationship/query', $options, $field, $the_post);
|
271 |
+
$options = apply_filters('acf/fields/relationship/query/name=' . $field['_name'], $options, $field, $the_post );
|
272 |
$options = apply_filters('acf/fields/relationship/query/key=' . $field['key'], $options, $field, $the_post );
|
273 |
|
274 |
|
325 |
|
326 |
// filters
|
327 |
$title = apply_filters('acf/fields/relationship/result', $title, $post, $field, $the_post);
|
328 |
+
$title = apply_filters('acf/fields/relationship/result/name=' . $field['_name'] , $title, $post, $field, $the_post);
|
329 |
$title = apply_filters('acf/fields/relationship/result/key=' . $field['key'], $title, $post, $field, $the_post);
|
330 |
|
331 |
|
524 |
|
525 |
// filters
|
526 |
$title = apply_filters('acf/fields/relationship/result', $title, $p, $field, $post);
|
527 |
+
$title = apply_filters('acf/fields/relationship/result/name=' . $field['_name'] , $title, $p, $field, $post);
|
528 |
$title = apply_filters('acf/fields/relationship/result/key=' . $field['key'], $title, $p, $field, $post);
|
529 |
|
530 |
|
core/views/meta_box_options.php
CHANGED
@@ -93,6 +93,7 @@ $options = apply_filters('acf/field_group/get_options', array(), $post->ID);
|
|
93 |
'name' => 'options[hide_on_screen]',
|
94 |
'value' => $options['hide_on_screen'],
|
95 |
'choices' => array(
|
|
|
96 |
'the_content' => __("Content Editor",'acf'),
|
97 |
'excerpt' => __("Excerpt"),
|
98 |
'custom_fields' => __("Custom Fields"),
|
93 |
'name' => 'options[hide_on_screen]',
|
94 |
'value' => $options['hide_on_screen'],
|
95 |
'choices' => array(
|
96 |
+
'permalink' => __("Permalink"),
|
97 |
'the_content' => __("Content Editor",'acf'),
|
98 |
'excerpt' => __("Excerpt"),
|
99 |
'custom_fields' => __("Custom Fields"),
|
js/field-group.js
CHANGED
@@ -431,6 +431,12 @@ var acf = {
|
|
431 |
field.after( new_field );
|
432 |
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
// open up form
|
435 |
if( field.hasClass('form_open') )
|
436 |
{
|
@@ -445,13 +451,7 @@ var acf = {
|
|
445 |
// update new_field label / name
|
446 |
var label = new_field.find('tr.field_label:first input[type="text"]'),
|
447 |
name = new_field.find('tr.field_name:first input[type="text"]');
|
448 |
-
|
449 |
-
|
450 |
-
// set select values
|
451 |
-
new_field.find('select').each(function(){
|
452 |
-
$(this).val( $(this).attr('data-val') ).trigger('change');
|
453 |
-
});
|
454 |
-
|
455 |
|
456 |
name.val('');
|
457 |
label.val( label.val() + ' (' + acf.l10n.copy + ')' );
|
431 |
field.after( new_field );
|
432 |
|
433 |
|
434 |
+
// set select values
|
435 |
+
new_field.find('select').each(function(){
|
436 |
+
$(this).val( $(this).attr('data-val') ).trigger('change');
|
437 |
+
});
|
438 |
+
|
439 |
+
|
440 |
// open up form
|
441 |
if( field.hasClass('form_open') )
|
442 |
{
|
451 |
// update new_field label / name
|
452 |
var label = new_field.find('tr.field_label:first input[type="text"]'),
|
453 |
name = new_field.find('tr.field_name:first input[type="text"]');
|
454 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
|
456 |
name.val('');
|
457 |
label.val( label.val() + ' (' + acf.l10n.copy + ')' );
|
js/field-group.min.js
CHANGED
@@ -5,4 +5,4 @@
|
|
5 |
*
|
6 |
* @type JS
|
7 |
* @date 1/08/13
|
8 |
-
*/var acf={ajaxurl:"",admin_url:"",post_id:0,nonce:"",l10n:{},text:{},helpers:{uniqid:null,sortable:null,create_field:null},conditional_logic:null,location:null};(function(e){function t(){e("#acf_fields .fields").each(function(){e(this).children(".field").each(function(t){e(this).find("td.field_order .circle").first().html(t+1)})})}e.fn.exists=function(){return e(this).length>0};acf.helpers.sortable=function(t,n){n.children().each(function(){e(this).width(e(this).width())});return n};acf.helpers.uniqid=function(e,t){typeof e=="undefined"&&(e="");var n,r=function(e,t){e=parseInt(e,10).toString(16);return t<e.length?e.slice(e.length-t):t>e.length?Array(1+(t-e.length)).join("0")+e:e};this.php_js||(this.php_js={});this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(Math.random()*123456789));this.php_js.uniqidSeed++;n=e;n+=r(parseInt((new Date).getTime()/1e3,10),8);n+=r(this.php_js.uniqidSeed,5);t&&(n+=(Math.random()*10).toFixed(8).toString());return n};e(document).on("submit","#post",function(){var t=e("#titlewrap #title");if(!t.val()){alert(acf.l10n.title);t.focus();return!1}});e(document).on("click","#submit-delete",function(){var e=confirm(acf.l10n.move_to_trash);if(!e)return!1});e(document).on("change","#acf_fields tr.field_type select",function(){var t=e(this),n=t.closest("tbody"),r=n.closest(".field"),i=r.attr("data-type"),s=r.attr("data-id"),o=t.val();r.removeClass("field_type-"+i).addClass("field_type-"+o);r.attr("data-type",o);(o=="tab"||o=="message")&&n.find('tr.field_name input[type="text"]').val("").trigger("keyup");if(n.children("tr.field_option_"+o).exists()){n.children("tr.field_option").hide().find("[name]").attr("disabled","true");n.children("tr.field_option_"+o).show().find("[name]").removeAttr("disabled")}else{var u=e('<tr"><td class="label"></td><td><div class="acf-loading"></div></td></tr>');n.children("tr.field_option").hide().find("[name]").attr("disabled","true");n.children("tr.conditional-logic").exists()?n.children("tr.conditional-logic").before(u):n.children("tr.field_save").before(u);var a={action:"acf/field_group/render_options",post_id:acf.post_id,field_key:t.attr("name"),field_type:o,nonce:acf.nonce};e.ajax({url:ajaxurl,data:a,type:"post",dataType:"html",success:function(e){if(!e){u.remove();return}u.replaceWith(e)}})}});e.fn.update_names=function(){var t=e(this),n=t.attr("data-id"),r="field_"+acf.helpers.uniqid();t.attr("data-id",r);t.attr("class",t.attr("class").replace(n,r));t.find(".field_meta td.field_key").text(r);t.find('[id*="'+n+'"]').each(function(){e(this).attr("id",e(this).attr("id").replace(n,r))});t.find('[name*="'+n+'"]').each(function(){e(this).attr("name",e(this).attr("name").replace(n,r))})};e(document).on("click","#acf_fields a.acf_edit_field",function(){var t=e(this).closest(".field");if(t.hasClass("form_open")){t.removeClass("form_open");e(document).trigger("acf/field_form-close",[t])}else{t.addClass("form_open");e(document).trigger("acf/field_form-open",[t])}t.children(".field_form_mask").animate({height:"toggle"},250)});e(document).on("click","#acf_fields a.acf_delete_field",function(){var n=e(this),r=n.closest(".field"),i=r.closest(".fields"),s=e('<div style="height:'+r.height()+'px"></div>');r.animate({left:"50px",opacity:0},250,function(){r.before(s);r.remove();if(i.children(".field").length<=1){s.remove();i.children(".no_fields_message").show()}else s.animate({height:0},250,function(){s.remove()});t()})});e(document).on("click","#acf_fields a.acf_duplicate_field",function(){var n=e(this),r=n.closest(".field"),i=null;r.find("select").each(function(){e(this).attr("data-val",e(this).val())});i=r.clone();i.update_names();i.find(".field:not(.field_key-field_clone)").each(function(){e(this).update_names()});r.after(i);r.hasClass("form_open")?r.find(".acf_edit_field").first().trigger("click"):i.find(".acf_edit_field").first().trigger("click");var s=i.find('tr.field_label:first input[type="text"]'),o=i.find('tr.field_name:first input[type="text"]');i.find("select").each(function(){e(this).val(e(this).attr("data-val")).trigger("change")});o.val("");s.val(s.val()+" ("+acf.l10n.copy+")");s.trigger("blur").trigger("keyup");t()});e(document).on("click","#acf_fields #add_field",function(){var n=e(this).closest(".table_footer").siblings(".fields"),r=n.children(".field_key-field_clone").clone();r.update_names();r.show();n.children(".field_key-field_clone").before(r);n.children(".no_fields_message").exists()&&n.children(".no_fields_message").hide();r.find("tr.field_type select").trigger("change");r.find('.field_form input[type="text"]').val("");setTimeout(function(){r.find('.field_form input[type="text"]').first().focus()},500);r.find("a.acf_edit_field").first().trigger("click");t();return!1});e(document).on("blur","#acf_fields tr.field_label input.label",function(){var t=e(this),n=t.closest(".field"),r=n.find('tr.field_name:first input[type="text"]'),i=n.attr("data-type");if(i=="tab"||i=="message"){r.val("").trigger("keyup");return}if(r.val()==""){var s=t.val(),o={"ä":"a","æ":"a","å":"a","ö":"o","ø":"o","é":"e","ë":"e","ü":"u","ó":"o","ő":"o","ú":"u","é":"e","á":"a","ű":"u","í":"i"," ":"_","'":""};e.each(o,function(e,t){var n=new RegExp(e,"g");s=s.replace(n,t)});s=s.toLowerCase();r.val(s);r.trigger("keyup")}});e(document).on("keyup","#acf_fields .field_form tr.field_label input.label",function(){var t=e(this).val(),n=e(this).closest(".field").find("td.field_label strong a").first().html(t)});e(document).on("keyup","#acf_fields .field_form tr.field_name input.name",function(){var t=e(this).val(),n=e(this).closest(".field").find("td.field_name").first().html(t)});e(document).on("change","#acf_fields .field_form tr.field_type select",function(){var t=e(this).val(),n=e(this).find('option[value="'+t+'"]').html();e(this).closest(".field").find("td.field_type").first().html(n)});e(document).on("mouseover","#acf_fields td.field_order",function(){var n=e(this).closest(".fields");if(n.hasClass("sortable"))return!1;n.addClass("sortable").sortable({update:function(e,n){t()},handle:"td.field_order"})});e(document).ready(function(){acf.location.init();acf.conditional_logic.init()});acf.location={$el:null,init:function(){var t=this;t.$el=e("#acf_location");t.$el.on("click",".location-add-rule",function(){t.add_rule(e(this).closest("tr"));return!1});t.$el.on("click",".location-remove-rule",function(){t.remove_rule(e(this).closest("tr"));return!1});t.$el.on("click",".location-add-group",function(){t.add_group();return!1});t.$el.on("change",".param select",function(){var t=e(this).closest("tr"),n=t.attr("data-id"),r=t.closest(".location-group"),i=r.attr("data-id"),s={action:"acf/field_group/render_location",nonce:acf.nonce,rule_id:n,group_id:i,value:"",param:e(this).val()},o=e('<div class="acf-loading"></div>');t.find("td.value").html(o);e.ajax({url:acf.ajaxurl,data:s,type:"post",dataType:"html",success:function(e){o.replaceWith(e)}})})},add_rule:function(t){var n=t.clone(),r=n.attr("data-id"),i=acf.helpers.uniqid();n.find("[name]").each(function(){e(this).attr("name",e(this).attr("name").replace(r,i));e(this).attr("id",e(this).attr("id").replace(r,i))});n.attr("data-id",i);t.after(n);return!1},remove_rule:function(e){var t=e.siblings("tr").length;t==0?this.remove_group(e.closest(".location-group")):e.remove()},add_group:function(){var t=this.$el.find(".location-group:last"),n=t.clone(),r=n.attr("data-id"),i=acf.helpers.uniqid();n.find("[name]").each(function(){e(this).attr("name",e(this).attr("name").replace(r,i));e(this).attr("id",e(this).attr("id").replace(r,i))});n.attr("data-id",i);n.find("h4").text(acf.l10n.or);n.find("tr:not(:first)").remove();t.after(n)},remove_group:function(e){e.remove()}};e(document).ready(function(){e("#submitdiv #publish").attr("class","acf-button");e("#submitdiv a.submitdelete").attr("class","delete-field-group").attr("id","submit-delete");var t=e("#hide-on-screen ul.acf-checkbox-list"),n=e('<li><label><input type="checkbox" value="" name="" >'+acf.l10n.hide_show_all+"</label></li>");t.find("input:not(:checked)").length==0&&n.find("input").attr("checked","checked");n.on("change","input",function(){var n=e(this).is(":checked");t.find("input").attr("checked",n)});t.prepend(n)});e(document).on("change",'#adv-settings input[name="show-field_key"]',function(){e(this).val()=="1"?e("#acf_fields table.acf").addClass("show-field_key"):e("#acf_fields table.acf").removeClass("show-field_key")});acf.helpers.create_field=function(t){var n={type:"text",classname:"",name:"",value:""};t=e.extend(!0,n,t);var r="";if(t.type=="text")r+='<input class="text '+t.classname+'" type="text" id="'+t.name+'" name="'+t.name+'" value="'+t.value+'" />';else if(t.type=="select"){var i={};e.each(t.choices,function(e,t){t.group===undefined&&(t.group=0);i[t.group]===undefined&&(i[t.group]=[]);i[t.group].push(t)});r+='<select class="select '+t.classname+'" id="'+t.name+'" name="'+t.name+'">';e.each(i,function(n,i){n!=0&&(r+='<optgroup label="'+n+'">');e.each(i,function(e,n){var i="";n.value==t.value&&(i='selected="selected"');r+="<option "+i+' value="'+n.value+'">'+n.label+"</option>"});n!=0&&(r+="</optgroup>")});r+="</select>"}r=e(r);return r};acf.conditional_logic={triggers:null,init:function(){var t=this;e(document).on("acf/field_form-open",function(e,n){t.render(n)});e(document).on("change","#acf_fields tr.field_label input.label",function(){e("#acf_fields .field.form_open").each(function(){t.render(e(this))})});e(document).on("change",'tr.conditional-logic input[type="radio"]',function(n){n.preventDefault();t.change_toggle(e(this))});e(document).on("change","select.conditional-logic-field",function(n){n.preventDefault();t.change_trigger(e(this))});e(document).on("click","tr.conditional-logic .acf-button-add",function(n){n.preventDefault();t.add(e(this).closest("tr"))});e(document).on("click","tr.conditional-logic .acf-button-remove",function(n){n.preventDefault();t.remove(e(this).closest("tr"))})},render:function(t){var n=this,r=[],i=t.attr("data-id"),s=t.parents(".fields"),o=t.find("> .field_form_mask > .field_form > table > tbody > tr.conditional-logic");e.each(s,function(t){var n=t==0?acf.l10n.sibling_fields:acf.l10n.parent_fields;e(this).children(".field").each(function(){var t=e(this),s=t.attr("data-id"),o=t.attr("data-type"),u=t.find("tr.field_label input").val();if(s=="field_clone")return;if(s==i)return;(o=="select"||o=="checkbox"||o=="true_false"||o=="radio")&&r.push({value:s,label:u,group:n})})});r.length==0&&r.push({value:"null",label:acf.l10n.no_fields});o.find(".conditional-logic-field").each(function(){var t=e(this).val(),n=e(this).attr("name"),i=acf.helpers.create_field({type:"select",classname:"conditional-logic-field",name:n,value:t,choices:r});e(this).replaceWith(i);i.trigger("change")})},change_toggle:function(e){var t=e.val(),n=e.closest("tr.conditional-logic");t=="1"?n.find(".contional-logic-rules-wrapper").show():n.find(".contional-logic-rules-wrapper").hide()},change_trigger:function(t){var n=t.val(),r=e(".field_key-"+n),i=r.attr("data-type"),s=t.closest("tr").find(".conditional-logic-value"),o=[];if(i=="true_false")o=[{value:1,label:acf.l10n.checked}];else if(i=="select"||i=="checkbox"||i=="radio"){var u=r.find(".field_option-choices").val().split("\n");if(u)for(var a=0;a<u.length;a++){var f=u[a].split(":"),l=f[0];f[1]&&(l=f[1]);o.push({value:e.trim(f[0]),label:e.trim(l)})}}var t=acf.helpers.create_field({type:"select",classname:"conditional-logic-value",name:s.attr("name"),value:s.val(),choices:o});s.replaceWith(t);t.trigger("change")},add:function(t){var n=t.clone(),r=parseFloat(t.attr("data-i")),i=acf.helpers.uniqid();n.find("[name]").each(function(){var t="[conditional_logic][rules]["+r+"]",n="[conditional_logic][rules]["+i+"]";e(this).attr("name",e(this).attr("name").replace(t,n));e(this).attr("id",e(this).attr("id").replace(t,n))});n.attr("data-i",i);t.after(n);t.closest("table").removeClass("remove-disabled")},remove:function(e){var t=e.closest("table");if(t.hasClass("remove-disabled"))return!1;e.remove();t.find("tr").length<=1&&t.addClass("remove-disabled")}};e(document).on("change",".radio-option-other_choice input",function(){var t=e(this),n=t.closest("td");if(t.is(":checked"))n.find(".radio-option-save_other_choice").show();else{n.find(".radio-option-save_other_choice").hide();n.find(".radio-option-save_other_choice input").removeAttr("checked")}})})(jQuery);
|
5 |
*
|
6 |
* @type JS
|
7 |
* @date 1/08/13
|
8 |
+
*/var acf={ajaxurl:"",admin_url:"",post_id:0,nonce:"",l10n:{},text:{},helpers:{uniqid:null,sortable:null,create_field:null},conditional_logic:null,location:null};(function(e){function t(){e("#acf_fields .fields").each(function(){e(this).children(".field").each(function(t){e(this).find("td.field_order .circle").first().html(t+1)})})}e.fn.exists=function(){return e(this).length>0};acf.helpers.sortable=function(t,n){n.children().each(function(){e(this).width(e(this).width())});return n};acf.helpers.uniqid=function(e,t){typeof e=="undefined"&&(e="");var n,r=function(e,t){e=parseInt(e,10).toString(16);return t<e.length?e.slice(e.length-t):t>e.length?Array(1+(t-e.length)).join("0")+e:e};this.php_js||(this.php_js={});this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(Math.random()*123456789));this.php_js.uniqidSeed++;n=e;n+=r(parseInt((new Date).getTime()/1e3,10),8);n+=r(this.php_js.uniqidSeed,5);t&&(n+=(Math.random()*10).toFixed(8).toString());return n};e(document).on("submit","#post",function(){var t=e("#titlewrap #title");if(!t.val()){alert(acf.l10n.title);t.focus();return!1}});e(document).on("click","#submit-delete",function(){var e=confirm(acf.l10n.move_to_trash);if(!e)return!1});e(document).on("change","#acf_fields tr.field_type select",function(){var t=e(this),n=t.closest("tbody"),r=n.closest(".field"),i=r.attr("data-type"),s=r.attr("data-id"),o=t.val();r.removeClass("field_type-"+i).addClass("field_type-"+o);r.attr("data-type",o);(o=="tab"||o=="message")&&n.find('tr.field_name input[type="text"]').val("").trigger("keyup");if(n.children("tr.field_option_"+o).exists()){n.children("tr.field_option").hide().find("[name]").attr("disabled","true");n.children("tr.field_option_"+o).show().find("[name]").removeAttr("disabled")}else{var u=e('<tr"><td class="label"></td><td><div class="acf-loading"></div></td></tr>');n.children("tr.field_option").hide().find("[name]").attr("disabled","true");n.children("tr.conditional-logic").exists()?n.children("tr.conditional-logic").before(u):n.children("tr.field_save").before(u);var a={action:"acf/field_group/render_options",post_id:acf.post_id,field_key:t.attr("name"),field_type:o,nonce:acf.nonce};e.ajax({url:ajaxurl,data:a,type:"post",dataType:"html",success:function(e){if(!e){u.remove();return}u.replaceWith(e)}})}});e.fn.update_names=function(){var t=e(this),n=t.attr("data-id"),r="field_"+acf.helpers.uniqid();t.attr("data-id",r);t.attr("class",t.attr("class").replace(n,r));t.find(".field_meta td.field_key").text(r);t.find('[id*="'+n+'"]').each(function(){e(this).attr("id",e(this).attr("id").replace(n,r))});t.find('[name*="'+n+'"]').each(function(){e(this).attr("name",e(this).attr("name").replace(n,r))})};e(document).on("click","#acf_fields a.acf_edit_field",function(){var t=e(this).closest(".field");if(t.hasClass("form_open")){t.removeClass("form_open");e(document).trigger("acf/field_form-close",[t])}else{t.addClass("form_open");e(document).trigger("acf/field_form-open",[t])}t.children(".field_form_mask").animate({height:"toggle"},250)});e(document).on("click","#acf_fields a.acf_delete_field",function(){var n=e(this),r=n.closest(".field"),i=r.closest(".fields"),s=e('<div style="height:'+r.height()+'px"></div>');r.animate({left:"50px",opacity:0},250,function(){r.before(s);r.remove();if(i.children(".field").length<=1){s.remove();i.children(".no_fields_message").show()}else s.animate({height:0},250,function(){s.remove()});t()})});e(document).on("click","#acf_fields a.acf_duplicate_field",function(){var n=e(this),r=n.closest(".field"),i=null;r.find("select").each(function(){e(this).attr("data-val",e(this).val())});i=r.clone();i.update_names();i.find(".field:not(.field_key-field_clone)").each(function(){e(this).update_names()});r.after(i);i.find("select").each(function(){e(this).val(e(this).attr("data-val")).trigger("change")});r.hasClass("form_open")?r.find(".acf_edit_field").first().trigger("click"):i.find(".acf_edit_field").first().trigger("click");var s=i.find('tr.field_label:first input[type="text"]'),o=i.find('tr.field_name:first input[type="text"]');o.val("");s.val(s.val()+" ("+acf.l10n.copy+")");s.trigger("blur").trigger("keyup");t()});e(document).on("click","#acf_fields #add_field",function(){var n=e(this).closest(".table_footer").siblings(".fields"),r=n.children(".field_key-field_clone").clone();r.update_names();r.show();n.children(".field_key-field_clone").before(r);n.children(".no_fields_message").exists()&&n.children(".no_fields_message").hide();r.find("tr.field_type select").trigger("change");r.find('.field_form input[type="text"]').val("");setTimeout(function(){r.find('.field_form input[type="text"]').first().focus()},500);r.find("a.acf_edit_field").first().trigger("click");t();return!1});e(document).on("blur","#acf_fields tr.field_label input.label",function(){var t=e(this),n=t.closest(".field"),r=n.find('tr.field_name:first input[type="text"]'),i=n.attr("data-type");if(i=="tab"||i=="message"){r.val("").trigger("keyup");return}if(r.val()==""){var s=t.val(),o={"ä":"a","æ":"a","å":"a","ö":"o","ø":"o","é":"e","ë":"e","ü":"u","ó":"o","ő":"o","ú":"u","é":"e","á":"a","ű":"u","í":"i"," ":"_","'":""};e.each(o,function(e,t){var n=new RegExp(e,"g");s=s.replace(n,t)});s=s.toLowerCase();r.val(s);r.trigger("keyup")}});e(document).on("keyup","#acf_fields .field_form tr.field_label input.label",function(){var t=e(this).val(),n=e(this).closest(".field").find("td.field_label strong a").first().html(t)});e(document).on("keyup","#acf_fields .field_form tr.field_name input.name",function(){var t=e(this).val(),n=e(this).closest(".field").find("td.field_name").first().html(t)});e(document).on("change","#acf_fields .field_form tr.field_type select",function(){var t=e(this).val(),n=e(this).find('option[value="'+t+'"]').html();e(this).closest(".field").find("td.field_type").first().html(n)});e(document).on("mouseover","#acf_fields td.field_order",function(){var n=e(this).closest(".fields");if(n.hasClass("sortable"))return!1;n.addClass("sortable").sortable({update:function(e,n){t()},handle:"td.field_order"})});e(document).ready(function(){acf.location.init();acf.conditional_logic.init()});acf.location={$el:null,init:function(){var t=this;t.$el=e("#acf_location");t.$el.on("click",".location-add-rule",function(){t.add_rule(e(this).closest("tr"));return!1});t.$el.on("click",".location-remove-rule",function(){t.remove_rule(e(this).closest("tr"));return!1});t.$el.on("click",".location-add-group",function(){t.add_group();return!1});t.$el.on("change",".param select",function(){var t=e(this).closest("tr"),n=t.attr("data-id"),r=t.closest(".location-group"),i=r.attr("data-id"),s={action:"acf/field_group/render_location",nonce:acf.nonce,rule_id:n,group_id:i,value:"",param:e(this).val()},o=e('<div class="acf-loading"></div>');t.find("td.value").html(o);e.ajax({url:acf.ajaxurl,data:s,type:"post",dataType:"html",success:function(e){o.replaceWith(e)}})})},add_rule:function(t){var n=t.clone(),r=n.attr("data-id"),i=acf.helpers.uniqid();n.find("[name]").each(function(){e(this).attr("name",e(this).attr("name").replace(r,i));e(this).attr("id",e(this).attr("id").replace(r,i))});n.attr("data-id",i);t.after(n);return!1},remove_rule:function(e){var t=e.siblings("tr").length;t==0?this.remove_group(e.closest(".location-group")):e.remove()},add_group:function(){var t=this.$el.find(".location-group:last"),n=t.clone(),r=n.attr("data-id"),i=acf.helpers.uniqid();n.find("[name]").each(function(){e(this).attr("name",e(this).attr("name").replace(r,i));e(this).attr("id",e(this).attr("id").replace(r,i))});n.attr("data-id",i);n.find("h4").text(acf.l10n.or);n.find("tr:not(:first)").remove();t.after(n)},remove_group:function(e){e.remove()}};e(document).ready(function(){e("#submitdiv #publish").attr("class","acf-button");e("#submitdiv a.submitdelete").attr("class","delete-field-group").attr("id","submit-delete");var t=e("#hide-on-screen ul.acf-checkbox-list"),n=e('<li><label><input type="checkbox" value="" name="" >'+acf.l10n.hide_show_all+"</label></li>");t.find("input:not(:checked)").length==0&&n.find("input").attr("checked","checked");n.on("change","input",function(){var n=e(this).is(":checked");t.find("input").attr("checked",n)});t.prepend(n)});e(document).on("change",'#adv-settings input[name="show-field_key"]',function(){e(this).val()=="1"?e("#acf_fields table.acf").addClass("show-field_key"):e("#acf_fields table.acf").removeClass("show-field_key")});acf.helpers.create_field=function(t){var n={type:"text",classname:"",name:"",value:""};t=e.extend(!0,n,t);var r="";if(t.type=="text")r+='<input class="text '+t.classname+'" type="text" id="'+t.name+'" name="'+t.name+'" value="'+t.value+'" />';else if(t.type=="select"){var i={};e.each(t.choices,function(e,t){t.group===undefined&&(t.group=0);i[t.group]===undefined&&(i[t.group]=[]);i[t.group].push(t)});r+='<select class="select '+t.classname+'" id="'+t.name+'" name="'+t.name+'">';e.each(i,function(n,i){n!=0&&(r+='<optgroup label="'+n+'">');e.each(i,function(e,n){var i="";n.value==t.value&&(i='selected="selected"');r+="<option "+i+' value="'+n.value+'">'+n.label+"</option>"});n!=0&&(r+="</optgroup>")});r+="</select>"}r=e(r);return r};acf.conditional_logic={triggers:null,init:function(){var t=this;e(document).on("acf/field_form-open",function(e,n){t.render(n)});e(document).on("change","#acf_fields tr.field_label input.label",function(){e("#acf_fields .field.form_open").each(function(){t.render(e(this))})});e(document).on("change",'tr.conditional-logic input[type="radio"]',function(n){n.preventDefault();t.change_toggle(e(this))});e(document).on("change","select.conditional-logic-field",function(n){n.preventDefault();t.change_trigger(e(this))});e(document).on("click","tr.conditional-logic .acf-button-add",function(n){n.preventDefault();t.add(e(this).closest("tr"))});e(document).on("click","tr.conditional-logic .acf-button-remove",function(n){n.preventDefault();t.remove(e(this).closest("tr"))})},render:function(t){var n=this,r=[],i=t.attr("data-id"),s=t.parents(".fields"),o=t.find("> .field_form_mask > .field_form > table > tbody > tr.conditional-logic");e.each(s,function(t){var n=t==0?acf.l10n.sibling_fields:acf.l10n.parent_fields;e(this).children(".field").each(function(){var t=e(this),s=t.attr("data-id"),o=t.attr("data-type"),u=t.find("tr.field_label input").val();if(s=="field_clone")return;if(s==i)return;(o=="select"||o=="checkbox"||o=="true_false"||o=="radio")&&r.push({value:s,label:u,group:n})})});r.length==0&&r.push({value:"null",label:acf.l10n.no_fields});o.find(".conditional-logic-field").each(function(){var t=e(this).val(),n=e(this).attr("name"),i=acf.helpers.create_field({type:"select",classname:"conditional-logic-field",name:n,value:t,choices:r});e(this).replaceWith(i);i.trigger("change")})},change_toggle:function(e){var t=e.val(),n=e.closest("tr.conditional-logic");t=="1"?n.find(".contional-logic-rules-wrapper").show():n.find(".contional-logic-rules-wrapper").hide()},change_trigger:function(t){var n=t.val(),r=e(".field_key-"+n),i=r.attr("data-type"),s=t.closest("tr").find(".conditional-logic-value"),o=[];if(i=="true_false")o=[{value:1,label:acf.l10n.checked}];else if(i=="select"||i=="checkbox"||i=="radio"){var u=r.find(".field_option-choices").val().split("\n");if(u)for(var a=0;a<u.length;a++){var f=u[a].split(":"),l=f[0];f[1]&&(l=f[1]);o.push({value:e.trim(f[0]),label:e.trim(l)})}}var t=acf.helpers.create_field({type:"select",classname:"conditional-logic-value",name:s.attr("name"),value:s.val(),choices:o});s.replaceWith(t);t.trigger("change")},add:function(t){var n=t.clone(),r=parseFloat(t.attr("data-i")),i=acf.helpers.uniqid();n.find("[name]").each(function(){var t="[conditional_logic][rules]["+r+"]",n="[conditional_logic][rules]["+i+"]";e(this).attr("name",e(this).attr("name").replace(t,n));e(this).attr("id",e(this).attr("id").replace(t,n))});n.attr("data-i",i);t.after(n);t.closest("table").removeClass("remove-disabled")},remove:function(e){var t=e.closest("table");if(t.hasClass("remove-disabled"))return!1;e.remove();t.find("tr").length<=1&&t.addClass("remove-disabled")}};e(document).on("change",".radio-option-other_choice input",function(){var t=e(this),n=t.closest("td");if(t.is(":checked"))n.find(".radio-option-save_other_choice").show();else{n.find(".radio-option-save_other_choice").hide();n.find(".radio-option-save_other_choice input").removeAttr("checked")}})})(jQuery);
|
js/input.js
CHANGED
@@ -615,7 +615,8 @@ var acf = {
|
|
615 |
|
616 |
// if this sub field is within a flexible content layout, hide the entire column because
|
617 |
// there will never be another row added to this table
|
618 |
-
|
|
|
619 |
{
|
620 |
hide_all = true;
|
621 |
|
@@ -626,6 +627,20 @@ var acf = {
|
|
626 |
|
627 |
}
|
628 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
|
630 |
var calculate = _this.calculate( rule, $toggle, $target );
|
631 |
|
@@ -1196,15 +1211,7 @@ var acf = {
|
|
1196 |
}
|
1197 |
|
1198 |
|
1199 |
-
this.$input.wpColorPicker(
|
1200 |
-
|
1201 |
-
change: function(event, ui){
|
1202 |
-
|
1203 |
-
$input.trigger('change');
|
1204 |
-
|
1205 |
-
}
|
1206 |
-
|
1207 |
-
});
|
1208 |
|
1209 |
|
1210 |
|
@@ -1831,7 +1838,7 @@ var acf = {
|
|
1831 |
|
1832 |
// vars
|
1833 |
var args = {
|
1834 |
-
zoom :
|
1835 |
center : new google.maps.LatLng(this.o.lat, this.o.lng),
|
1836 |
mapTypeId : google.maps.MapTypeId.ROADMAP
|
1837 |
};
|
615 |
|
616 |
// if this sub field is within a flexible content layout, hide the entire column because
|
617 |
// there will never be another row added to this table
|
618 |
+
var parent = $target.parent('tr').parent().parent('table').parent('.layout');
|
619 |
+
if( parent.exists() )
|
620 |
{
|
621 |
hide_all = true;
|
622 |
|
627 |
|
628 |
}
|
629 |
|
630 |
+
// if this sub field is within a repeater field which has a max row of 1, hide the entire column because
|
631 |
+
// there will never be another row added to this table
|
632 |
+
var parent = $target.parent('tr').parent().parent('table').parent('.repeater');
|
633 |
+
if( parent.exists() && parent.attr('data-max_rows') == '1' )
|
634 |
+
{
|
635 |
+
hide_all = true;
|
636 |
+
|
637 |
+
if( $target.is('th') && $toggle.is('th') )
|
638 |
+
{
|
639 |
+
$toggle = $target.closest('table').find('td.field_key-' + rule.field);
|
640 |
+
}
|
641 |
+
|
642 |
+
}
|
643 |
+
|
644 |
|
645 |
var calculate = _this.calculate( rule, $toggle, $target );
|
646 |
|
1211 |
}
|
1212 |
|
1213 |
|
1214 |
+
this.$input.wpColorPicker();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1215 |
|
1216 |
|
1217 |
|
1838 |
|
1839 |
// vars
|
1840 |
var args = {
|
1841 |
+
zoom : parseInt(this.o.zoom),
|
1842 |
center : new google.maps.LatLng(this.o.lat, this.o.lng),
|
1843 |
mapTypeId : google.maps.MapTypeId.ROADMAP
|
1844 |
};
|
js/input.min.js
CHANGED
@@ -10,5 +10,5 @@
|
|
10 |
*
|
11 |
* @param N/A
|
12 |
* @return N/A
|
13 |
-
*/var acf={ajaxurl:"",admin_url:"",wp_version:"",post_id:0,nonce:"",l10n:null,o:null,helpers:{get_atts:null,version_compare:null,uniqid:null,sortable:null,add_message:null,is_clone_field:null,url_to_object:null},validation:null,conditional_logic:null,media:null,fields:{date_picker:null,color_picker:null,Image:null,file:null,wysiwyg:null,gallery:null,relationship:null}};(function(e){acf.helpers.isset=function(){var e=arguments,t=e.length,n=0,r;if(t===0)throw new Error("Empty isset");while(n!==t){if(e[n]===r||e[n]===null)return!1;n++}return!0};acf.helpers.get_atts=function(t){var n={};e.each(t[0].attributes,function(e,t){t.name.substr(0,5)=="data-"&&(n[t.name.replace("data-","")]=t.value)});return n};acf.helpers.version_compare=function(e,t){if(typeof e+typeof t!="stringstring")return!1;var n=e.split("."),r=t.split("."),i=0,s=Math.max(n.length,r.length);for(;i<s;i++){if(n[i]&&!r[i]&&parseInt(n[i])>0||parseInt(n[i])>parseInt(r[i]))return 1;if(r[i]&&!n[i]&&parseInt(r[i])>0||parseInt(n[i])<parseInt(r[i]))return-1}return 0};acf.helpers.uniqid=function(){var e=new Date;return e.getTime()};acf.helpers.url_to_object=function(e){var t={},n=e.split("&");for(i in n){var r=n[i].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t};acf.helpers.sortable=function(t,n){n.children().each(function(){e(this).width(e(this).width())});return n};acf.helpers.is_clone_field=function(e){return e.attr("name")&&e.attr("name").indexOf("[acfcloneindex]")!=-1?!0:!1};acf.helpers.add_message=function(t,n){var t=e('<div class="acf-message-wrapper"><div class="message updated"><p>'+t+"</p></div></div>");n.prepend(t);setTimeout(function(){t.animate({opacity:0},250,function(){t.remove()})},1500)};e.fn.exists=function(){return e(this).length>0};acf.media={div:null,frame:null,render_timout:null,clear_frame:function(){if(!this.frame)return;this.frame.detach();this.frame.dispose();this.frame=null},type:function(){var e="thickbox";typeof wp=="object"&&(e="backbone");return e},init:function(){var t=wp.media.view.AttachmentCompat.prototype;t.orig_render=t.render;t.orig_dispose=t.dispose;t.className="compat-item acf_postbox no_box";t.render=function(){var t=this;if(t.ignore_render)return this;this.orig_render();setTimeout(function(){var n=t.$el.closest(".media-modal");if(n.hasClass("acf-media-modal"))return;if(n.find(".media-frame-router .acf-expand-details").exists())return;var r=e(['<a href="#" class="acf-expand-details">','<span class="icon"></span>','<span class="is-closed">'+acf.l10n.core.expand_details+"</span>",'<span class="is-open">'+acf.l10n.core.collapse_details+"</span>","</a>"].join(""));r.on("click",function(e){e.preventDefault();n.hasClass("acf-expanded")?n.removeClass("acf-expanded"):n.addClass("acf-expanded")});n.find(".media-frame-router").append(r)},0);clearTimeout(acf.media.render_timout);acf.media.render_timout=setTimeout(function(){e(document).trigger("acf/setup_fields",[t.$el])},50);return this};t.dispose=function(){e(document).trigger("acf/remove_fields",[this.$el]);this.orig_dispose()};t.save=function(e){var t={},n={};e&&e.preventDefault();_.each(this.$el.serializeArray(),function(e){if(e.name.slice(-2)==="[]"){e.name=e.name.replace("[]","");typeof n[e.name]=="undefined"&&(n[e.name]=-1);n[e.name]++;e.name+="["+n[e.name]+"]"}t[e.name]=e.value});this.ignore_render=!0;this.model.saveCompat(t)}}};acf.conditional_logic={items:[],init:function(){var t=this;e(document).on("change",".field input, .field textarea, .field select",function(){e("#acf-has-changed").exists()&&e("#acf-has-changed").val(1);t.change()});e(document).on("acf/setup_fields",function(e,n){t.change()});t.change()},change:function(){var t=this;e.each(this.items,function(n,r){var i=e(".field_key-"+r.field);i.each(function(){var n=!0;r.allorany=="any"&&(n=!1);var i=e(this),s=!0;e.each(r.rules,function(o,u){var a=e(".field_key-"+u.field);if(a.hasClass("sub_field")){a=i.siblings(".field_key-"+u.field);s=!1;if(!a.exists()){i.parents("tr").each(function(){a=e(this).find(".field_key-"+u.field);if(a.exists())return!1});s=!0}}if(i.parent("tr").parent().parent("table").parent(".layout").exists()){s=!0;i.is("th")&&a.is("th")&&(a=i.closest(".layout").find("td.field_key-"+u.field))}var f=t.calculate(u,a,i);if(r.allorany=="all"){if(f==0){n=!1;return!1}}else if(f==1){n=!0;return!1}});i.removeClass("acf-conditional_logic-hide acf-conditional_logic-show acf-show-blank");if(n){i.find("input, textarea, select").removeAttr("disabled");i.addClass("acf-conditional_logic-show");e(document).trigger("acf/conditional_logic/show",[i,r])}else{i.find("input, textarea, select").attr("disabled","disabled");i.addClass("acf-conditional_logic-hide");s||i.addClass("acf-show-blank");e(document).trigger("acf/conditional_logic/hide",[i,r])}})})},calculate:function(t,n,r){var i=!1;if(n.hasClass("field_type-true_false")||n.hasClass("field_type-checkbox")||n.hasClass("field_type-radio")){var s=n.find('input[value="'+t.value+'"]:checked').exists();t.operator=="=="?s&&(i=!0):s||(i=!0)}else{var o=n.find("input, textarea, select").last().val();e.isArray(o)||(o=[o]);t.operator=="=="?e.inArray(t.value,o)>-1&&(i=!0):e.inArray(t.value,o)<0&&(i=!0)}return i}};e(document).ready(function(){acf.conditional_logic.init();e(".acf_postbox > .inside > .options").each(function(){e(this).closest(".acf_postbox").addClass(e(this).attr("data-layout"))});e('#metakeyselect option[value^="field_"]').remove()});e(window).load(function(){acf.media.init();setTimeout(function(){try{e.isNumeric(acf.o.post_id)&&(wp.media.view.settings.post.id=acf.o.post_id)}catch(t){}e(document).trigger("acf/setup_fields",[e("#poststuff")])},10)});acf.fields.gallery={add:function(){},edit:function(){},update_count:function(){},hide_selected_items:function(){},text:{title_add:"Select Images"}}})(jQuery);(function(e){acf.screen={action:"acf/location/match_field_groups_ajax",post_id:0,page_template:0,page_parent:0,page_type:0,post_category:0,post_format:0,taxonomy:0,lang:0,nonce:0};e(document).ready(function(){acf.screen.post_id=acf.o.post_id;acf.screen.nonce=acf.o.nonce;if(e("#icl-als-first").length>0){var t=e("#icl-als-first").children("a").attr("href"),n=new RegExp("lang=([^&#]*)"),r=n.exec(t);acf.screen.lang=r[1]}});e(document).on("acf/update_field_groups",function(){if(!acf.screen.post_id||!e.isNumeric(acf.screen.post_id))return!1;e.ajax({url:ajaxurl,data:acf.screen,type:"post",dataType:"json",success:function(t){if(!t)return!1;e(".acf_postbox").addClass("acf-hidden");e(".acf_postbox-toggle").addClass("acf-hidden");if(t.length==0)return!1;e.each(t,function(t,n){var r=e("#acf_"+n),i=e('#adv-settings .acf_postbox-toggle[for="acf_'+n+'-hide"]');r.removeClass("acf-hidden hide-if-js");i.removeClass("acf-hidden");i.find('input[type="checkbox"]').attr("checked","checked");r.find(".acf-replace-with-fields").each(function(){var t=e(this);e.ajax({url:ajaxurl,data:{action:"acf/post/render_fields",acf_id:n,post_id:acf.o.post_id,nonce:acf.o.nonce},type:"post",dataType:"html",success:function(n){t.replaceWith(n);e(document).trigger("acf/setup_fields",r)}})})});e.ajax({url:ajaxurl,data:{action:"acf/post/get_style",acf_id:t[0],nonce:acf.o.nonce},type:"post",dataType:"html",success:function(t){e("#acf_style").html(t)}})}})});e(document).on("change","#page_template",function(){acf.screen.page_template=e(this).val();e(document).trigger("acf/update_field_groups")});e(document).on("change","#parent_id",function(){var t=e(this).val();if(t!=""){acf.screen.page_type="child";acf.screen.page_parent=t}else{acf.screen.page_type="parent";acf.screen.page_parent=0}e(document).trigger("acf/update_field_groups")});e(document).on("change",'#post-formats-select input[type="radio"]',function(){var t=e(this).val();t=="0"&&(t="standard");acf.screen.post_format=t;e(document).trigger("acf/update_field_groups")});e(document).on("change",'.categorychecklist input[type="checkbox"]',function(){if(e(this).closest(".categorychecklist").hasClass("no-ajax"))return;setTimeout(function(){var t=[];e('.categorychecklist input[type="checkbox"]:checked').each(function(){if(e(this).is(":hidden")||e(this).is(":disabled"))return;t.push(e(this).val())});acf.screen.post_category=t;acf.screen.taxonomy=t;e(document).trigger("acf/update_field_groups")},1)})})(jQuery);(function(e){var t=acf.fields.color_picker={$el:null,$input:null,set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="text"]');return this},init:function(){var e=this.$input;if(acf.helpers.is_clone_field(e))return;this.$input.wpColorPicker({change:function(t,n){e.trigger("change")}})}};e(document).on("acf/setup_fields",function(n,r){e(r).find(".acf-color_picker").each(function(){t.set({$el:e(this)}).init()})})})(jQuery);(function(e){acf.fields.date_picker={$el:null,$input:null,$hidden:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="text"]');this.$hidden=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);return this},init:function(){if(acf.helpers.is_clone_field(this.$hidden))return;this.$input.val(this.$hidden.val());var t=e.extend({},acf.l10n.date_picker,{dateFormat:this.o.save_format,altField:this.$hidden,altFormat:this.o.save_format,changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.o.first_day});this.$input.addClass("active").datepicker(t);this.$input.datepicker("option","dateFormat",this.o.display_format);e("body > #ui-datepicker-div").length>0&&e("#ui-datepicker-div").wrap('<div class="ui-acf" />')},blur:function(){this.$input.val()||this.$hidden.val("")}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf-date_picker").each(function(){acf.fields.date_picker.set({$el:e(this)}).init()})});e(document).on("blur",'.acf-date_picker input[type="text"]',function(t){acf.fields.date_picker.set({$el:e(this).parent()}).blur()})})(jQuery);(function(e){var t=acf.media;acf.fields.file={$el:null,$input:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);this.o.multiple=this.$el.closest(".repeater").exists()?!0:!1;this.o.query={};this.o.library=="uploadedTo"&&(this.o.query.uploadedTo=acf.o.post_id);return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return},add:function(e){var n=t.div;n.find(".acf-file-icon").attr("src",e.icon);n.find(".acf-file-title").text(e.title);n.find(".acf-file-name").text(e.name).attr("href",e.url);n.find(".acf-file-size").text(e.size);n.find(".acf-file-value").val(e.id).trigger("change");n.addClass("active");n.closest(".field").removeClass("error")},edit:function(){var n=this.$input.val();t.div=this.$el;t.clear_frame();t.frame=wp.media({title:acf.l10n.file.edit,multiple:!1,button:{text:acf.l10n.file.update}});t.frame.on("open",function(){t.frame.content._mode!="browse"&&t.frame.content.mode("browse");t.frame.$el.closest(".media-modal").addClass("acf-media-modal acf-expanded");var r=t.frame.state().get("selection"),i=wp.media.attachment(n);e.isEmptyObject(i.changed)&&i.fetch();r.add(i)});t.frame.on("close",function(){t.frame.$el.closest(".media-modal").removeClass("acf-media-modal")});acf.media.frame.open()},remove:function(){this.$el.find(".acf-file-icon").attr("src","");this.$el.find(".acf-file-title").text("");this.$el.find(".acf-file-name").text("").attr("href","");this.$el.find(".acf-file-size").text("");this.$el.find(".acf-file-value").val("").trigger("change");this.$el.removeClass("active")},popup:function(){var n=this;t.div=this.$el;t.clear_frame();t.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query(n.o.query),multiple:n.o.multiple,title:acf.l10n.file.select,priority:20,filterable:"all"})]});acf.media.frame.on("content:activate",function(){var t=null,r=null;try{t=acf.media.frame.content.get().toolbar;r=t.get("filters")}catch(i){}if(!r)return!1;if(n.o.library=="uploadedTo"){r.$el.find('option[value="uploaded"]').remove();r.$el.after("<span>"+acf.l10n.file.uploadedTo+"</span>");e.each(r.filters,function(e,t){t.props.uploadedTo=acf.o.post_id})}});acf.media.frame.on("select",function(){selection=t.frame.state().get("selection");if(selection){var e=0;selection.each(function(n){e++;if(e>1){var r=t.div.closest("td"),s=r.closest(".row"),o=s.closest(".repeater"),u=r.attr("data-field_key"),a="td .acf-file-uploader:first";u&&(a='td[data-field_key="'+u+'"] .acf-file-uploader');s.next(".row").exists()||o.find(".add-row-end").trigger("click");t.div=s.next(".row").find(a)}var f={id:n.id,title:n.attributes.title,name:n.attributes.filename,url:n.attributes.url,icon:n.attributes.icon,size:n.attributes.filesize};acf.fields.file.add(f)})}});acf.media.frame.open();return!1}};e(document).on("click",".acf-file-uploader .acf-button-edit",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).edit()});e(document).on("click",".acf-file-uploader .acf-button-delete",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).remove()});e(document).on("click",".acf-file-uploader .add-file",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).popup()})})(jQuery);(function(e){acf.fields.location={$el:null,$input:null,o:{},geocoder:!1,map:!1,maps:{},set:function(t){e.extend(this,t);this.$input=this.$el.find(".value");this.o=acf.helpers.get_atts(this.$el);this.maps[this.o.id]&&(this.map=this.maps[this.o.id]);this.geocoder=new google.maps.Geocoder;return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return;this.render()},render:function(){var e=this,t=this.$el,n={zoom:14,center:new google.maps.LatLng(this.o.lat,this.o.lng),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(this.$el.find(".canvas")[0],n);var r=new google.maps.places.Autocomplete(this.$el.find(".search")[0]);r.map=this.map;r.bindTo("bounds",this.map);this.map.marker=new google.maps.Marker({draggable:!0,raiseOnDrag:!0,map:this.map});this.map.$el=this.$el;var i=this.$el.find(".input-lat").val(),s=this.$el.find(".input-lng").val();i&&s&&this.update(i,s).center();google.maps.event.addListener(r,"place_changed",function(t){var n=this.map.$el,r=n.find(".search").val();n.find(".input-address").val(r);n.find(".title h4").text(r);var i=this.getPlace();if(i.geometry){var s=i.geometry.location.lat(),o=i.geometry.location.lng();e.set({$el:n}).update(s,o).center()}else e.geocoder.geocode({address:r},function(t,r){if(r!=google.maps.GeocoderStatus.OK){console.log("Geocoder failed due to: "+r);return}if(!t[0]){console.log("No results found");return}i=t[0];var s=i.geometry.location.lat(),o=i.geometry.location.lng();e.set({$el:n}).update(s,o).center()})});google.maps.event.addListener(this.map.marker,"dragend",function(){var t=this.map.$el,n=this.map.marker.getPosition(),r=n.lat(),i=n.lng();e.set({$el:t}).update(r,i).sync()});google.maps.event.addListener(this.map,"click",function(t){var n=this.$el,r=t.latLng.lat(),i=t.latLng.lng();e.set({$el:n}).update(r,i).sync()});this.maps[this.o.id]=this.map},update:function(e,t){var n=new google.maps.LatLng(e,t);this.$el.find(".input-lat").val(e);this.$el.find(".input-lng").val(t).trigger("change");this.map.marker.setPosition(n);this.map.marker.setVisible(!0);this.$el.addClass("active");this.$el.closest(".field").removeClass("error");return this},center:function(){var e=this.map.marker.getPosition(),t=this.o.lat,n=this.o.lng;if(e){t=e.lat();n=e.lng()}var r=new google.maps.LatLng(t,n);this.map.setCenter(r)},sync:function(){var e=this.$el,t=this.map.marker.getPosition(),n=new google.maps.LatLng(t.lat(),t.lng());this.geocoder.geocode({latLng:n},function(t,n){if(n!=google.maps.GeocoderStatus.OK){console.log("Geocoder failed due to: "+n);return}if(!t[0]){console.log("No results found");return}var r=t[0];e.find(".title h4").text(r.formatted_address);e.find(".input-address").val(r.formatted_address).trigger("change")});return this},locate:function(){var e=this,t=this.$el;if(!navigator.geolocation){alert(acf.l10n.google_map.browser_support);return this}t.find(".title h4").text(acf.l10n.google_map.locating+"...");t.addClass("active");navigator.geolocation.getCurrentPosition(function(n){var r=n.coords.latitude,i=n.coords.longitude;e.set({$el:t}).update(r,i).sync().center()})},clear:function(){this.$el.removeClass("active");this.$el.find(".search").val("");this.$el.find(".input-address").val("");this.$el.find(".input-lat").val("");this.$el.find(".input-lng").val("");this.map.marker.setVisible(!1)},edit:function(){this.$el.removeClass("active");var e=this.$el.find(".title h4").text();this.$el.find(".search").val(e).focus()},refresh:function(){google.maps.event.trigger(this.map,"resize");this.center()}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf-google-map").exists()&&(typeof google=="undefined"?e.getScript("https://www.google.com/jsapi",function(){google.load("maps","3",{other_params:"sensor=false&libraries=places",callback:function(){e(n).find(".acf-google-map").each(function(){acf.fields.location.set({$el:e(this)}).init()})}})}):e(n).find(".acf-google-map").each(function(){acf.fields.location.set({$el:e(this)}).init()}))});e(document).on("click",".acf-google-map .acf-sprite-remove",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).clear();e(this).blur()});e(document).on("click",".acf-google-map .acf-sprite-locate",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).locate();e(this).blur()});e(document).on("click",".acf-google-map .title h4",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).edit()});e(document).on("keydown",".acf-google-map .search",function(e){if(e.which==13)return!1});e(document).on("blur",".acf-google-map .search",function(t){var n=e(this).closest(".acf-google-map");n.find(".input-lat").val()&&n.addClass("active")});e(document).on("acf/fields/tab/show",function(e,t){t.attr("data-field_type")=="google_map"&&acf.fields.location.set({$el:t.find(".acf-google-map")}).refresh()})})(jQuery);(function(e){var t=acf.media;acf.fields.image={$el:null,$input:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);this.o.multiple=this.$el.closest(".repeater").exists()?!0:!1;this.o.query={type:"image"};this.o.library=="uploadedTo"&&(this.o.query.uploadedTo=acf.o.post_id);return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return},add:function(e){var n=t.div;n.find(".acf-image-image").attr("src",e.url);n.find(".acf-image-value").val(e.id).trigger("change");n.addClass("active");n.closest(".field").removeClass("error")},edit:function(){var n=this.$input.val();t.div=this.$el;t.clear_frame();t.frame=wp.media({title:acf.l10n.image.edit,multiple:!1,button:{text:acf.l10n.image.update}});t.frame.on("open",function(){t.frame.content._mode!="browse"&&t.frame.content.mode("browse");t.frame.$el.closest(".media-modal").addClass("acf-media-modal acf-expanded");var r=t.frame.state().get("selection"),i=wp.media.attachment(n);e.isEmptyObject(i.changed)&&i.fetch();r.add(i)});t.frame.on("close",function(){t.frame.$el.closest(".media-modal").removeClass("acf-media-modal")});acf.media.frame.open()},remove:function(){this.$el.find(".acf-image-image").attr("src","");this.$el.find(".acf-image-value").val("").trigger("change");this.$el.removeClass("active")},popup:function(){var n=this;t.div=this.$el;t.clear_frame();t.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query(n.o.query),multiple:n.o.multiple,title:acf.l10n.image.select,priority:20,filterable:"all"})]});acf.media.frame.on("content:activate",function(){var t=null,r=null;try{t=acf.media.frame.content.get().toolbar;r=t.get("filters")}catch(i){}if(!r)return!1;e.each(r.filters,function(e,t){t.props.type="image"});if(n.o.library=="uploadedTo"){r.$el.find('option[value="uploaded"]').remove();r.$el.after("<span>"+acf.l10n.image.uploadedTo+"</span>");e.each(r.filters,function(e,t){t.props.uploadedTo=acf.o.post_id})}r.$el.find("option").each(function(){var t=e(this).attr("value");if(t=="uploaded"&&n.o.library=="all")return;t.indexOf("image")===-1&&e(this).remove()});r.$el.val("image").trigger("change")});acf.media.frame.on("select",function(){selection=t.frame.state().get("selection");if(selection){var e=0;selection.each(function(r){e++;if(e>1){var s=t.div.closest("td"),o=s.closest(".row"),u=o.closest(".repeater"),a=s.attr("data-field_key"),f="td .acf-image-uploader:first";a&&(f='td[data-field_key="'+a+'"] .acf-image-uploader');o.next(".row").exists()||u.find(".add-row-end").trigger("click");t.div=o.next(".row").find(f)}var l={id:r.id,url:r.attributes.url};r.attributes.sizes&&r.attributes.sizes[n.o.preview_size]&&(l.url=r.attributes.sizes[n.o.preview_size].url);acf.fields.image.add(l)})}});acf.media.frame.open();return!1},text:{title_add:"Select Image",title_edit:"Edit Image"}};e(document).on("click",".acf-image-uploader .acf-button-edit",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).edit()});e(document).on("click",".acf-image-uploader .acf-button-delete",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).remove()});e(document).on("click",".acf-image-uploader .add-image",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).popup()})})(jQuery);(function(e){acf.fields.radio={$el:null,$input:null,$other:null,farbtastic:null,set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="radio"]:checked');this.$other=this.$el.find('input[type="text"]');return this},change:function(){if(this.$input.val()=="other"){this.$other.attr("name",this.$input.attr("name"));this.$other.show()}else{this.$other.attr("name","");this.$other.hide()}}};e(document).on("change",'.acf-radio-list input[type="radio"]',function(t){acf.fields.radio.set({$el:e(this).closest(".acf-radio-list")}).change()})})(jQuery);(function(e){acf.fields.relationship={$el:null,$input:null,$left:null,$right:null,o:{},timeout:null,set:function(t){e.extend(this,t);this.$input=this.$el.children('input[type="hidden"]');this.$left=this.$el.find(".relationship_left"),this.$right=this.$el.find(".relationship_right");this.o=acf.helpers.get_atts(this.$el);return this},init:function(){var t=this;if(acf.helpers.is_clone_field(this.$input))return;this.$right.find(".relationship_list").height(this.$left.height()-2);this.$right.find(".relationship_list").sortable({axis:"y",items:"> li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:function(){t.$input.trigger("change")}});var n=this.$el;this.$left.find(".relationship_list").scrollTop(0).on("scroll",function(r){if(n.hasClass("loading")||n.hasClass("no-results"))return;if(e(this).scrollTop()+e(this).innerHeight()>=e(this).get(0).scrollHeight){var i=parseInt(n.attr("data-paged"));n.attr("data-paged",i+1);t.set({$el:n}).fetch()}});this.fetch()},fetch:function(){var t=this,n=this.$el;n.addClass("loading");e.ajax({url:acf.o.ajaxurl,type:"post",dataType:"json",data:e.extend({action:"acf/fields/relationship/query_posts",post_id:acf.o.post_id,nonce:acf.o.nonce},this.o),success:function(e){t.set({$el:n}).render(e)}})},render:function(t){var n=this;this.$el.removeClass("no-results").removeClass("loading");this.o.paged==1&&this.$el.find(".relationship_left li:not(.load-more)").remove();if(!t||!t.html){this.$el.addClass("no-results");return}this.$el.find(".relationship_left .load-more").before(t.html);t.next_page_exists||this.$el.addClass("no-results");this.$left.find("a").each(function(){var t=e(this).attr("data-post_id");n.$right.find('a[data-post_id="'+t+'"]').exists()&&e(this).parent().addClass("hide")})},add:function(e){var t=e.attr("data-post_id"),n=e.html();if(this.$right.find("a").length>=this.o.max){alert(acf.l10n.relationship.max.replace("{max}",this.o.max));return!1}if(e.parent().hasClass("hide"))return!1;e.parent().addClass("hide");var r={post_id:e.attr("data-post_id"),title:e.html(),name:this.$input.attr("name")},i=_.template(acf.l10n.relationship.tmpl_li,r);this.$right.find(".relationship_list").append(i);this.$input.trigger("change");this.$el.closest(".field").removeClass("error")},remove:function(e){e.parent().remove();this.$left.find('a[data-post_id="'+e.attr("data-post_id")+'"]').parent("li").removeClass("hide");this.$input.trigger("change")}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf_relationship").each(function(){acf.fields.relationship.set({$el:e(this)}).init()})});e(document).on("change",".acf_relationship .select-post_type",function(t){var n=e(this).val(),r=e(this).closest(".acf_relationship");r.attr("data-post_type",n);r.attr("data-paged",1);acf.fields.relationship.set({$el:r}).fetch()});e(document).on("click",".acf_relationship .relationship_left .relationship_list a",function(t){t.preventDefault();acf.fields.relationship.set({$el:e(this).closest(".acf_relationship")}).add(e(this));e(this).blur()});e(document).on("click",".acf_relationship .relationship_right .relationship_list a",function(t){t.preventDefault();acf.fields.relationship.set({$el:e(this).closest(".acf_relationship")}).remove(e(this));e(this).blur()});e(document).on("keyup",".acf_relationship input.relationship_search",function(t){var n=e(this).val(),r=e(this).closest(".acf_relationship");r.attr("data-s",n);r.attr("data-paged",1);clearTimeout(acf.fields.relationship.timeout);acf.fields.relationship.timeout=setTimeout(function(){acf.fields.relationship.set({$el:r}).fetch()},500)});e(document).on("keypress",".acf_relationship input.relationship_search",function(e){e.which==13&&e.preventDefault()})})(jQuery);(function(e){e(document).on("acf/setup_fields",function(t,n){if(!e(n).find(".acf-tab").exists())return;e(n).find(".acf-tab").each(function(){var t=e(this),n=t.parent(),r=n.parent(),i=t.attr("data-id"),s=t.html();if(t.hasClass("acf-tab-added"))return;t.addClass("acf-tab-added");r.children(".acf-tab-group").exists()||r.children(".field_type-tab:first").before('<ul class="hl clearfix acf-tab-group"></ul>');r.children(".acf-tab-group").append('<li class="field_key-'+i+'" data-field_key="'+i+'"><a class="acf-tab-button" href="#" data-id="'+i+'">'+s+"</a></li>")});e(n).find(".acf-tab-group").each(function(){e(this).find("li:first a").trigger("click")});acf.conditional_logic.change()});e(document).on("click",".acf-tab-button",function(t){t.preventDefault();var n=e(this),r=n.closest("ul"),i=r.parent(),s=n.attr("data-id");r.find("li").removeClass("active");n.parent("li").addClass("active");i.children(".field_type-tab").each(function(){var t=e(this),n=!1;t.hasClass("field_key-"+s)&&(n=!0);t.nextUntil(".field_type-tab").each(function(){if(n){e(this).removeClass("acf-tab_group-hide").addClass("acf-tab_group-show");e(document).trigger("acf/fields/tab/show",[e(this)])}else{e(this).removeClass("acf-tab_group-show").addClass("acf-tab_group-hide");e(document).trigger("acf/fields/tab/hide",[e(this)])}})});n.trigger("blur")});e(document).on("acf/conditional_logic/hide",function(t,n,r){if(!n.parent().hasClass("acf-tab-group"))return;var i=n.attr("data-field_key");n.siblings(":visible").exists()?n.siblings(":visible").first().children("a").trigger("click"):e('.field_type-tab[data-field_key="'+i+'"]').nextUntil(".field_type-tab").removeClass("acf-tab_group-show").addClass("acf-tab_group-hide")});e(document).on("acf/conditional_logic/show",function(e,t,n){if(!t.parent().hasClass("acf-tab-group"))return;if(t.hasClass("active")){t.children("a").trigger("click");return}if(t.siblings(".active").hasClass("acf-conditional_logic-hide")){t.children("a").trigger("click");return}})})(jQuery);(function(e){acf.validation={status:!0,disabled:!1,run:function(){var t=this;t.status=!0;e(".field.required, .form-field.required").each(function(){t.validate(e(this))})},validate:function(t){var n=!1;t.data("validation",!0);if(t.is(":hidden")){n=!0;if(t.hasClass("acf-tab_group-hide")){n=!1;var r=t.prevAll(".field_type-tab:first");r.hasClass("acf-conditional_logic-hide")?n=!0:t.prevAll(".acf-tab-group:first").find('.acf-tab-button[data-id="'+r.attr("data-field_key")+'"]').trigger("click")}}t.hasClass("acf-conditional_logic-hide")&&(n=!0);if(n)return;t.find('input[type="text"], input[type="email"], input[type="number"], input[type="hidden"], textarea').val()==""&&t.data("validation",!1);if(t.find(".acf_wysiwyg").exists()&&typeof tinyMCE=="object"){t.data("validation",!0);var i=t.find(".wp-editor-area").attr("id"),s=tinyMCE.get(i);s&&!s.getContent()&&t.data("validation",!1)}if(t.find("select").exists()){t.data("validation",!0);(t.find("select").val()=="null"||!t.find("select").val())&&t.data("validation",!1)}if(t.find('input[type="radio"]').exists()){t.data("validation",!1);t.find('input[type="radio"]:checked').exists()&&t.data("validation",!0)}if(t.find('input[type="checkbox"]').exists()){t.data("validation",!1);t.find('input[type="checkbox"]:checked').exists()&&t.data("validation",!0)}if(t.find(".acf_relationship").exists()){t.data("validation",!1);t.find(".acf_relationship .relationship_right input").exists()&&t.data("validation",!0)}if(t.find(".repeater").exists()){t.data("validation",!1);t.find(".repeater tr.row").exists()&&t.data("validation",!0)}if(t.find(".acf-gallery").exists()){t.data("validation",!1);t.find(".acf-gallery .thumbnail").exists()&&t.data("validation",!0)}e(document).trigger("acf/validate_field",[t]);if(!t.data("validation")){this.status=!1;t.closest(".field").addClass("error");if(t.data("validation_message")){var o=t.find("p.label:first"),u=null;o.children(".acf-error-message").remove();o.append('<span class="acf-error-message"><i class="bit"></i>'+t.data("validation_message")+"</span>")}}}};e(document).on("focus click",".field.required input, .field.required textarea, .field.required select",function(t){e(this).closest(".field").removeClass("error")});e(document).on("click","#save-post",function(){acf.validation.disabled=!0});e(document).on("submit","#post",function(){if(acf.validation.disabled)return!0;acf.validation.run();if(!acf.validation.status){var t=e(this);t.siblings("#message").remove();t.before('<div id="message" class="error"><p>'+acf.l10n.validation.error+"</p></div>");e("#publish").removeClass("button-primary-disabled");e("#ajax-loading").attr("style","");e("#publishing-action .spinner").hide();return!1}e(".acf_postbox.acf-hidden").remove();return!0})})(jQuery);(function(e){var t=acf.fields.wysiwyg={$el:null,$textarea:null,o:{},set:function(t){e.extend(this,t);this.$textarea=this.$el.find("textarea");this.o=acf.helpers.get_atts(this.$el);this.o.id=this.$textarea.attr("id");return this},has_tinymce:function(){var e=!1;typeof tinyMCE=="object"&&(e=!0);return e},init:function(){if(acf.helpers.is_clone_field(this.$textarea))return;var t=e.extend({},tinyMCE.settings);tinyMCE.settings.theme_advanced_buttons1="";tinyMCE.settings.theme_advanced_buttons2="";tinyMCE.settings.theme_advanced_buttons3="";tinyMCE.settings.theme_advanced_buttons4="";acf.helpers.isset(this.toolbars[this.o.toolbar])&&e.each(this.toolbars[this.o.toolbar],function(e,t){tinyMCE.settings[e]=t});tinyMCE.execCommand("mceAddControl",!1,this.o.id);e(document).trigger("acf/wysiwyg/load",this.o.id);this.add_events();tinyMCE.settings=t;wpActiveEditor=null},add_events:function(){var t=this.o.id,n=tinyMCE.get(t);if(!n)return;var r=e("#wp-"+t+"-wrap"),i=e(n.getBody());r.on("click",function(){e(document).trigger("acf/wysiwyg/click",t)});i.on("focus",function(){e(document).trigger("acf/wysiwyg/focus",t)});i.on("blur",function(){e(document).trigger("acf/wysiwyg/blur",t)})},destroy:function(){try{var e=this.o.id,t=tinyMCE.get(e);if(t){var n=t.getContent();tinyMCE.execCommand("mceRemoveControl",!1,e);this.$textarea.val(n)}}catch(r){}wpActiveEditor=null}};e(document).on("acf/setup_fields",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()});setTimeout(function(){e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).init()})},0)});e(document).on("acf/remove_fields",function(n,r){if(!t.has_tinymce())return;r.find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()})});e(document).on("acf/wysiwyg/click",function(t,n){wpActiveEditor=n;container=e("#wp-"+n+"-wrap").closest(".field").removeClass("error")});e(document).on("acf/wysiwyg/focus",function(t,n){wpActiveEditor=n;container=e("#wp-"+n+"-wrap").closest(".field").removeClass("error")});e(document).on("acf/wysiwyg/blur",function(
|
14 |
-
t,n){wpActiveEditor=null;var r=tinyMCE.get(n);if(!r)return;var i=r.getElement();r.save();e(i).trigger("change")});e(document).on("acf/sortable_start",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()})});e(document).on("acf/sortable_stop",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).init()})});e(window).load(function(){if(!t.has_tinymce())return;var n=e("#wp-content-wrap").exists(),r=e("#wp-acf_settings-wrap").exists();mode="tmce";r&&e("#wp-acf_settings-wrap").hasClass("html-active")&&(mode="html");setTimeout(function(){r&&mode=="html"&&e("#acf_settings-tmce").trigger("click")},1);setTimeout(function(){r&&mode=="html"&&e("#acf_settings-html").trigger("click");n&&t.set({$el:e("#wp-content-wrap")}).add_events()},11)});e(document).on("click",".acf_wysiwyg a.mce_fullscreen",function(){var t=e(this).closest(".acf_wysiwyg"),n=t.attr("data-upload");n=="no"&&e("#mce_fullscreen_container td.mceToolbar .mce_add_media").remove()})})(jQuery);
|
10 |
*
|
11 |
* @param N/A
|
12 |
* @return N/A
|
13 |
+
*/var acf={ajaxurl:"",admin_url:"",wp_version:"",post_id:0,nonce:"",l10n:null,o:null,helpers:{get_atts:null,version_compare:null,uniqid:null,sortable:null,add_message:null,is_clone_field:null,url_to_object:null},validation:null,conditional_logic:null,media:null,fields:{date_picker:null,color_picker:null,Image:null,file:null,wysiwyg:null,gallery:null,relationship:null}};(function(e){acf.helpers.isset=function(){var e=arguments,t=e.length,n=0,r;if(t===0)throw new Error("Empty isset");while(n!==t){if(e[n]===r||e[n]===null)return!1;n++}return!0};acf.helpers.get_atts=function(t){var n={};e.each(t[0].attributes,function(e,t){t.name.substr(0,5)=="data-"&&(n[t.name.replace("data-","")]=t.value)});return n};acf.helpers.version_compare=function(e,t){if(typeof e+typeof t!="stringstring")return!1;var n=e.split("."),r=t.split("."),i=0,s=Math.max(n.length,r.length);for(;i<s;i++){if(n[i]&&!r[i]&&parseInt(n[i])>0||parseInt(n[i])>parseInt(r[i]))return 1;if(r[i]&&!n[i]&&parseInt(r[i])>0||parseInt(n[i])<parseInt(r[i]))return-1}return 0};acf.helpers.uniqid=function(){var e=new Date;return e.getTime()};acf.helpers.url_to_object=function(e){var t={},n=e.split("&");for(i in n){var r=n[i].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t};acf.helpers.sortable=function(t,n){n.children().each(function(){e(this).width(e(this).width())});return n};acf.helpers.is_clone_field=function(e){return e.attr("name")&&e.attr("name").indexOf("[acfcloneindex]")!=-1?!0:!1};acf.helpers.add_message=function(t,n){var t=e('<div class="acf-message-wrapper"><div class="message updated"><p>'+t+"</p></div></div>");n.prepend(t);setTimeout(function(){t.animate({opacity:0},250,function(){t.remove()})},1500)};e.fn.exists=function(){return e(this).length>0};acf.media={div:null,frame:null,render_timout:null,clear_frame:function(){if(!this.frame)return;this.frame.detach();this.frame.dispose();this.frame=null},type:function(){var e="thickbox";typeof wp=="object"&&(e="backbone");return e},init:function(){var t=wp.media.view.AttachmentCompat.prototype;t.orig_render=t.render;t.orig_dispose=t.dispose;t.className="compat-item acf_postbox no_box";t.render=function(){var t=this;if(t.ignore_render)return this;this.orig_render();setTimeout(function(){var n=t.$el.closest(".media-modal");if(n.hasClass("acf-media-modal"))return;if(n.find(".media-frame-router .acf-expand-details").exists())return;var r=e(['<a href="#" class="acf-expand-details">','<span class="icon"></span>','<span class="is-closed">'+acf.l10n.core.expand_details+"</span>",'<span class="is-open">'+acf.l10n.core.collapse_details+"</span>","</a>"].join(""));r.on("click",function(e){e.preventDefault();n.hasClass("acf-expanded")?n.removeClass("acf-expanded"):n.addClass("acf-expanded")});n.find(".media-frame-router").append(r)},0);clearTimeout(acf.media.render_timout);acf.media.render_timout=setTimeout(function(){e(document).trigger("acf/setup_fields",[t.$el])},50);return this};t.dispose=function(){e(document).trigger("acf/remove_fields",[this.$el]);this.orig_dispose()};t.save=function(e){var t={},n={};e&&e.preventDefault();_.each(this.$el.serializeArray(),function(e){if(e.name.slice(-2)==="[]"){e.name=e.name.replace("[]","");typeof n[e.name]=="undefined"&&(n[e.name]=-1);n[e.name]++;e.name+="["+n[e.name]+"]"}t[e.name]=e.value});this.ignore_render=!0;this.model.saveCompat(t)}}};acf.conditional_logic={items:[],init:function(){var t=this;e(document).on("change",".field input, .field textarea, .field select",function(){e("#acf-has-changed").exists()&&e("#acf-has-changed").val(1);t.change()});e(document).on("acf/setup_fields",function(e,n){t.change()});t.change()},change:function(){var t=this;e.each(this.items,function(n,r){var i=e(".field_key-"+r.field);i.each(function(){var n=!0;r.allorany=="any"&&(n=!1);var i=e(this),s=!0;e.each(r.rules,function(o,u){var a=e(".field_key-"+u.field);if(a.hasClass("sub_field")){a=i.siblings(".field_key-"+u.field);s=!1;if(!a.exists()){i.parents("tr").each(function(){a=e(this).find(".field_key-"+u.field);if(a.exists())return!1});s=!0}}var f=i.parent("tr").parent().parent("table").parent(".layout");if(f.exists()){s=!0;i.is("th")&&a.is("th")&&(a=i.closest(".layout").find("td.field_key-"+u.field))}var f=i.parent("tr").parent().parent("table").parent(".repeater");if(f.exists()&&f.attr("data-max_rows")=="1"){s=!0;i.is("th")&&a.is("th")&&(a=i.closest("table").find("td.field_key-"+u.field))}var l=t.calculate(u,a,i);if(r.allorany=="all"){if(l==0){n=!1;return!1}}else if(l==1){n=!0;return!1}});i.removeClass("acf-conditional_logic-hide acf-conditional_logic-show acf-show-blank");if(n){i.find("input, textarea, select").removeAttr("disabled");i.addClass("acf-conditional_logic-show");e(document).trigger("acf/conditional_logic/show",[i,r])}else{i.find("input, textarea, select").attr("disabled","disabled");i.addClass("acf-conditional_logic-hide");s||i.addClass("acf-show-blank");e(document).trigger("acf/conditional_logic/hide",[i,r])}})})},calculate:function(t,n,r){var i=!1;if(n.hasClass("field_type-true_false")||n.hasClass("field_type-checkbox")||n.hasClass("field_type-radio")){var s=n.find('input[value="'+t.value+'"]:checked').exists();t.operator=="=="?s&&(i=!0):s||(i=!0)}else{var o=n.find("input, textarea, select").last().val();e.isArray(o)||(o=[o]);t.operator=="=="?e.inArray(t.value,o)>-1&&(i=!0):e.inArray(t.value,o)<0&&(i=!0)}return i}};e(document).ready(function(){acf.conditional_logic.init();e(".acf_postbox > .inside > .options").each(function(){e(this).closest(".acf_postbox").addClass(e(this).attr("data-layout"))});e('#metakeyselect option[value^="field_"]').remove()});e(window).load(function(){acf.media.init();setTimeout(function(){try{e.isNumeric(acf.o.post_id)&&(wp.media.view.settings.post.id=acf.o.post_id)}catch(t){}e(document).trigger("acf/setup_fields",[e("#poststuff")])},10)});acf.fields.gallery={add:function(){},edit:function(){},update_count:function(){},hide_selected_items:function(){},text:{title_add:"Select Images"}}})(jQuery);(function(e){acf.screen={action:"acf/location/match_field_groups_ajax",post_id:0,page_template:0,page_parent:0,page_type:0,post_category:0,post_format:0,taxonomy:0,lang:0,nonce:0};e(document).ready(function(){acf.screen.post_id=acf.o.post_id;acf.screen.nonce=acf.o.nonce;if(e("#icl-als-first").length>0){var t=e("#icl-als-first").children("a").attr("href"),n=new RegExp("lang=([^&#]*)"),r=n.exec(t);acf.screen.lang=r[1]}});e(document).on("acf/update_field_groups",function(){if(!acf.screen.post_id||!e.isNumeric(acf.screen.post_id))return!1;e.ajax({url:ajaxurl,data:acf.screen,type:"post",dataType:"json",success:function(t){if(!t)return!1;e(".acf_postbox").addClass("acf-hidden");e(".acf_postbox-toggle").addClass("acf-hidden");if(t.length==0)return!1;e.each(t,function(t,n){var r=e("#acf_"+n),i=e('#adv-settings .acf_postbox-toggle[for="acf_'+n+'-hide"]');r.removeClass("acf-hidden hide-if-js");i.removeClass("acf-hidden");i.find('input[type="checkbox"]').attr("checked","checked");r.find(".acf-replace-with-fields").each(function(){var t=e(this);e.ajax({url:ajaxurl,data:{action:"acf/post/render_fields",acf_id:n,post_id:acf.o.post_id,nonce:acf.o.nonce},type:"post",dataType:"html",success:function(n){t.replaceWith(n);e(document).trigger("acf/setup_fields",r)}})})});e.ajax({url:ajaxurl,data:{action:"acf/post/get_style",acf_id:t[0],nonce:acf.o.nonce},type:"post",dataType:"html",success:function(t){e("#acf_style").html(t)}})}})});e(document).on("change","#page_template",function(){acf.screen.page_template=e(this).val();e(document).trigger("acf/update_field_groups")});e(document).on("change","#parent_id",function(){var t=e(this).val();if(t!=""){acf.screen.page_type="child";acf.screen.page_parent=t}else{acf.screen.page_type="parent";acf.screen.page_parent=0}e(document).trigger("acf/update_field_groups")});e(document).on("change",'#post-formats-select input[type="radio"]',function(){var t=e(this).val();t=="0"&&(t="standard");acf.screen.post_format=t;e(document).trigger("acf/update_field_groups")});e(document).on("change",'.categorychecklist input[type="checkbox"]',function(){if(e(this).closest(".categorychecklist").hasClass("no-ajax"))return;setTimeout(function(){var t=[];e('.categorychecklist input[type="checkbox"]:checked').each(function(){if(e(this).is(":hidden")||e(this).is(":disabled"))return;t.push(e(this).val())});acf.screen.post_category=t;acf.screen.taxonomy=t;e(document).trigger("acf/update_field_groups")},1)})})(jQuery);(function(e){var t=acf.fields.color_picker={$el:null,$input:null,set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="text"]');return this},init:function(){var e=this.$input;if(acf.helpers.is_clone_field(e))return;this.$input.wpColorPicker()}};e(document).on("acf/setup_fields",function(n,r){e(r).find(".acf-color_picker").each(function(){t.set({$el:e(this)}).init()})})})(jQuery);(function(e){acf.fields.date_picker={$el:null,$input:null,$hidden:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="text"]');this.$hidden=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);return this},init:function(){if(acf.helpers.is_clone_field(this.$hidden))return;this.$input.val(this.$hidden.val());var t=e.extend({},acf.l10n.date_picker,{dateFormat:this.o.save_format,altField:this.$hidden,altFormat:this.o.save_format,changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.o.first_day});this.$input.addClass("active").datepicker(t);this.$input.datepicker("option","dateFormat",this.o.display_format);e("body > #ui-datepicker-div").length>0&&e("#ui-datepicker-div").wrap('<div class="ui-acf" />')},blur:function(){this.$input.val()||this.$hidden.val("")}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf-date_picker").each(function(){acf.fields.date_picker.set({$el:e(this)}).init()})});e(document).on("blur",'.acf-date_picker input[type="text"]',function(t){acf.fields.date_picker.set({$el:e(this).parent()}).blur()})})(jQuery);(function(e){var t=acf.media;acf.fields.file={$el:null,$input:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);this.o.multiple=this.$el.closest(".repeater").exists()?!0:!1;this.o.query={};this.o.library=="uploadedTo"&&(this.o.query.uploadedTo=acf.o.post_id);return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return},add:function(e){var n=t.div;n.find(".acf-file-icon").attr("src",e.icon);n.find(".acf-file-title").text(e.title);n.find(".acf-file-name").text(e.name).attr("href",e.url);n.find(".acf-file-size").text(e.size);n.find(".acf-file-value").val(e.id).trigger("change");n.addClass("active");n.closest(".field").removeClass("error")},edit:function(){var n=this.$input.val();t.div=this.$el;t.clear_frame();t.frame=wp.media({title:acf.l10n.file.edit,multiple:!1,button:{text:acf.l10n.file.update}});t.frame.on("open",function(){t.frame.content._mode!="browse"&&t.frame.content.mode("browse");t.frame.$el.closest(".media-modal").addClass("acf-media-modal acf-expanded");var r=t.frame.state().get("selection"),i=wp.media.attachment(n);e.isEmptyObject(i.changed)&&i.fetch();r.add(i)});t.frame.on("close",function(){t.frame.$el.closest(".media-modal").removeClass("acf-media-modal")});acf.media.frame.open()},remove:function(){this.$el.find(".acf-file-icon").attr("src","");this.$el.find(".acf-file-title").text("");this.$el.find(".acf-file-name").text("").attr("href","");this.$el.find(".acf-file-size").text("");this.$el.find(".acf-file-value").val("").trigger("change");this.$el.removeClass("active")},popup:function(){var n=this;t.div=this.$el;t.clear_frame();t.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query(n.o.query),multiple:n.o.multiple,title:acf.l10n.file.select,priority:20,filterable:"all"})]});acf.media.frame.on("content:activate",function(){var t=null,r=null;try{t=acf.media.frame.content.get().toolbar;r=t.get("filters")}catch(i){}if(!r)return!1;if(n.o.library=="uploadedTo"){r.$el.find('option[value="uploaded"]').remove();r.$el.after("<span>"+acf.l10n.file.uploadedTo+"</span>");e.each(r.filters,function(e,t){t.props.uploadedTo=acf.o.post_id})}});acf.media.frame.on("select",function(){selection=t.frame.state().get("selection");if(selection){var e=0;selection.each(function(n){e++;if(e>1){var r=t.div.closest("td"),s=r.closest(".row"),o=s.closest(".repeater"),u=r.attr("data-field_key"),a="td .acf-file-uploader:first";u&&(a='td[data-field_key="'+u+'"] .acf-file-uploader');s.next(".row").exists()||o.find(".add-row-end").trigger("click");t.div=s.next(".row").find(a)}var f={id:n.id,title:n.attributes.title,name:n.attributes.filename,url:n.attributes.url,icon:n.attributes.icon,size:n.attributes.filesize};acf.fields.file.add(f)})}});acf.media.frame.open();return!1}};e(document).on("click",".acf-file-uploader .acf-button-edit",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).edit()});e(document).on("click",".acf-file-uploader .acf-button-delete",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).remove()});e(document).on("click",".acf-file-uploader .add-file",function(t){t.preventDefault();acf.fields.file.set({$el:e(this).closest(".acf-file-uploader")}).popup()})})(jQuery);(function(e){acf.fields.location={$el:null,$input:null,o:{},geocoder:!1,map:!1,maps:{},set:function(t){e.extend(this,t);this.$input=this.$el.find(".value");this.o=acf.helpers.get_atts(this.$el);this.maps[this.o.id]&&(this.map=this.maps[this.o.id]);this.geocoder=new google.maps.Geocoder;return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return;this.render()},render:function(){var e=this,t=this.$el,n={zoom:parseInt(this.o.zoom),center:new google.maps.LatLng(this.o.lat,this.o.lng),mapTypeId:google.maps.MapTypeId.ROADMAP};this.map=new google.maps.Map(this.$el.find(".canvas")[0],n);var r=new google.maps.places.Autocomplete(this.$el.find(".search")[0]);r.map=this.map;r.bindTo("bounds",this.map);this.map.marker=new google.maps.Marker({draggable:!0,raiseOnDrag:!0,map:this.map});this.map.$el=this.$el;var i=this.$el.find(".input-lat").val(),s=this.$el.find(".input-lng").val();i&&s&&this.update(i,s).center();google.maps.event.addListener(r,"place_changed",function(t){var n=this.map.$el,r=n.find(".search").val();n.find(".input-address").val(r);n.find(".title h4").text(r);var i=this.getPlace();if(i.geometry){var s=i.geometry.location.lat(),o=i.geometry.location.lng();e.set({$el:n}).update(s,o).center()}else e.geocoder.geocode({address:r},function(t,r){if(r!=google.maps.GeocoderStatus.OK){console.log("Geocoder failed due to: "+r);return}if(!t[0]){console.log("No results found");return}i=t[0];var s=i.geometry.location.lat(),o=i.geometry.location.lng();e.set({$el:n}).update(s,o).center()})});google.maps.event.addListener(this.map.marker,"dragend",function(){var t=this.map.$el,n=this.map.marker.getPosition(),r=n.lat(),i=n.lng();e.set({$el:t}).update(r,i).sync()});google.maps.event.addListener(this.map,"click",function(t){var n=this.$el,r=t.latLng.lat(),i=t.latLng.lng();e.set({$el:n}).update(r,i).sync()});this.maps[this.o.id]=this.map},update:function(e,t){var n=new google.maps.LatLng(e,t);this.$el.find(".input-lat").val(e);this.$el.find(".input-lng").val(t).trigger("change");this.map.marker.setPosition(n);this.map.marker.setVisible(!0);this.$el.addClass("active");this.$el.closest(".field").removeClass("error");return this},center:function(){var e=this.map.marker.getPosition(),t=this.o.lat,n=this.o.lng;if(e){t=e.lat();n=e.lng()}var r=new google.maps.LatLng(t,n);this.map.setCenter(r)},sync:function(){var e=this.$el,t=this.map.marker.getPosition(),n=new google.maps.LatLng(t.lat(),t.lng());this.geocoder.geocode({latLng:n},function(t,n){if(n!=google.maps.GeocoderStatus.OK){console.log("Geocoder failed due to: "+n);return}if(!t[0]){console.log("No results found");return}var r=t[0];e.find(".title h4").text(r.formatted_address);e.find(".input-address").val(r.formatted_address).trigger("change")});return this},locate:function(){var e=this,t=this.$el;if(!navigator.geolocation){alert(acf.l10n.google_map.browser_support);return this}t.find(".title h4").text(acf.l10n.google_map.locating+"...");t.addClass("active");navigator.geolocation.getCurrentPosition(function(n){var r=n.coords.latitude,i=n.coords.longitude;e.set({$el:t}).update(r,i).sync().center()})},clear:function(){this.$el.removeClass("active");this.$el.find(".search").val("");this.$el.find(".input-address").val("");this.$el.find(".input-lat").val("");this.$el.find(".input-lng").val("");this.map.marker.setVisible(!1)},edit:function(){this.$el.removeClass("active");var e=this.$el.find(".title h4").text();this.$el.find(".search").val(e).focus()},refresh:function(){google.maps.event.trigger(this.map,"resize");this.center()}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf-google-map").exists()&&(typeof google=="undefined"?e.getScript("https://www.google.com/jsapi",function(){google.load("maps","3",{other_params:"sensor=false&libraries=places",callback:function(){e(n).find(".acf-google-map").each(function(){acf.fields.location.set({$el:e(this)}).init()})}})}):e(n).find(".acf-google-map").each(function(){acf.fields.location.set({$el:e(this)}).init()}))});e(document).on("click",".acf-google-map .acf-sprite-remove",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).clear();e(this).blur()});e(document).on("click",".acf-google-map .acf-sprite-locate",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).locate();e(this).blur()});e(document).on("click",".acf-google-map .title h4",function(t){t.preventDefault();acf.fields.location.set({$el:e(this).closest(".acf-google-map")}).edit()});e(document).on("keydown",".acf-google-map .search",function(e){if(e.which==13)return!1});e(document).on("blur",".acf-google-map .search",function(t){var n=e(this).closest(".acf-google-map");n.find(".input-lat").val()&&n.addClass("active")});e(document).on("acf/fields/tab/show",function(e,t){t.attr("data-field_type")=="google_map"&&acf.fields.location.set({$el:t.find(".acf-google-map")}).refresh()})})(jQuery);(function(e){var t=acf.media;acf.fields.image={$el:null,$input:null,o:{},set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="hidden"]');this.o=acf.helpers.get_atts(this.$el);this.o.multiple=this.$el.closest(".repeater").exists()?!0:!1;this.o.query={type:"image"};this.o.library=="uploadedTo"&&(this.o.query.uploadedTo=acf.o.post_id);return this},init:function(){if(acf.helpers.is_clone_field(this.$input))return},add:function(e){var n=t.div;n.find(".acf-image-image").attr("src",e.url);n.find(".acf-image-value").val(e.id).trigger("change");n.addClass("active");n.closest(".field").removeClass("error")},edit:function(){var n=this.$input.val();t.div=this.$el;t.clear_frame();t.frame=wp.media({title:acf.l10n.image.edit,multiple:!1,button:{text:acf.l10n.image.update}});t.frame.on("open",function(){t.frame.content._mode!="browse"&&t.frame.content.mode("browse");t.frame.$el.closest(".media-modal").addClass("acf-media-modal acf-expanded");var r=t.frame.state().get("selection"),i=wp.media.attachment(n);e.isEmptyObject(i.changed)&&i.fetch();r.add(i)});t.frame.on("close",function(){t.frame.$el.closest(".media-modal").removeClass("acf-media-modal")});acf.media.frame.open()},remove:function(){this.$el.find(".acf-image-image").attr("src","");this.$el.find(".acf-image-value").val("").trigger("change");this.$el.removeClass("active")},popup:function(){var n=this;t.div=this.$el;t.clear_frame();t.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query(n.o.query),multiple:n.o.multiple,title:acf.l10n.image.select,priority:20,filterable:"all"})]});acf.media.frame.on("content:activate",function(){var t=null,r=null;try{t=acf.media.frame.content.get().toolbar;r=t.get("filters")}catch(i){}if(!r)return!1;e.each(r.filters,function(e,t){t.props.type="image"});if(n.o.library=="uploadedTo"){r.$el.find('option[value="uploaded"]').remove();r.$el.after("<span>"+acf.l10n.image.uploadedTo+"</span>");e.each(r.filters,function(e,t){t.props.uploadedTo=acf.o.post_id})}r.$el.find("option").each(function(){var t=e(this).attr("value");if(t=="uploaded"&&n.o.library=="all")return;t.indexOf("image")===-1&&e(this).remove()});r.$el.val("image").trigger("change")});acf.media.frame.on("select",function(){selection=t.frame.state().get("selection");if(selection){var e=0;selection.each(function(r){e++;if(e>1){var s=t.div.closest("td"),o=s.closest(".row"),u=o.closest(".repeater"),a=s.attr("data-field_key"),f="td .acf-image-uploader:first";a&&(f='td[data-field_key="'+a+'"] .acf-image-uploader');o.next(".row").exists()||u.find(".add-row-end").trigger("click");t.div=o.next(".row").find(f)}var l={id:r.id,url:r.attributes.url};r.attributes.sizes&&r.attributes.sizes[n.o.preview_size]&&(l.url=r.attributes.sizes[n.o.preview_size].url);acf.fields.image.add(l)})}});acf.media.frame.open();return!1},text:{title_add:"Select Image",title_edit:"Edit Image"}};e(document).on("click",".acf-image-uploader .acf-button-edit",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).edit()});e(document).on("click",".acf-image-uploader .acf-button-delete",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).remove()});e(document).on("click",".acf-image-uploader .add-image",function(t){t.preventDefault();acf.fields.image.set({$el:e(this).closest(".acf-image-uploader")}).popup()})})(jQuery);(function(e){acf.fields.radio={$el:null,$input:null,$other:null,farbtastic:null,set:function(t){e.extend(this,t);this.$input=this.$el.find('input[type="radio"]:checked');this.$other=this.$el.find('input[type="text"]');return this},change:function(){if(this.$input.val()=="other"){this.$other.attr("name",this.$input.attr("name"));this.$other.show()}else{this.$other.attr("name","");this.$other.hide()}}};e(document).on("change",'.acf-radio-list input[type="radio"]',function(t){acf.fields.radio.set({$el:e(this).closest(".acf-radio-list")}).change()})})(jQuery);(function(e){acf.fields.relationship={$el:null,$input:null,$left:null,$right:null,o:{},timeout:null,set:function(t){e.extend(this,t);this.$input=this.$el.children('input[type="hidden"]');this.$left=this.$el.find(".relationship_left"),this.$right=this.$el.find(".relationship_right");this.o=acf.helpers.get_atts(this.$el);return this},init:function(){var t=this;if(acf.helpers.is_clone_field(this.$input))return;this.$right.find(".relationship_list").height(this.$left.height()-2);this.$right.find(".relationship_list").sortable({axis:"y",items:"> li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:function(){t.$input.trigger("change")}});var n=this.$el;this.$left.find(".relationship_list").scrollTop(0).on("scroll",function(r){if(n.hasClass("loading")||n.hasClass("no-results"))return;if(e(this).scrollTop()+e(this).innerHeight()>=e(this).get(0).scrollHeight){var i=parseInt(n.attr("data-paged"));n.attr("data-paged",i+1);t.set({$el:n}).fetch()}});this.fetch()},fetch:function(){var t=this,n=this.$el;n.addClass("loading");e.ajax({url:acf.o.ajaxurl,type:"post",dataType:"json",data:e.extend({action:"acf/fields/relationship/query_posts",post_id:acf.o.post_id,nonce:acf.o.nonce},this.o),success:function(e){t.set({$el:n}).render(e)}})},render:function(t){var n=this;this.$el.removeClass("no-results").removeClass("loading");this.o.paged==1&&this.$el.find(".relationship_left li:not(.load-more)").remove();if(!t||!t.html){this.$el.addClass("no-results");return}this.$el.find(".relationship_left .load-more").before(t.html);t.next_page_exists||this.$el.addClass("no-results");this.$left.find("a").each(function(){var t=e(this).attr("data-post_id");n.$right.find('a[data-post_id="'+t+'"]').exists()&&e(this).parent().addClass("hide")})},add:function(e){var t=e.attr("data-post_id"),n=e.html();if(this.$right.find("a").length>=this.o.max){alert(acf.l10n.relationship.max.replace("{max}",this.o.max));return!1}if(e.parent().hasClass("hide"))return!1;e.parent().addClass("hide");var r={post_id:e.attr("data-post_id"),title:e.html(),name:this.$input.attr("name")},i=_.template(acf.l10n.relationship.tmpl_li,r);this.$right.find(".relationship_list").append(i);this.$input.trigger("change");this.$el.closest(".field").removeClass("error")},remove:function(e){e.parent().remove();this.$left.find('a[data-post_id="'+e.attr("data-post_id")+'"]').parent("li").removeClass("hide");this.$input.trigger("change")}};e(document).on("acf/setup_fields",function(t,n){e(n).find(".acf_relationship").each(function(){acf.fields.relationship.set({$el:e(this)}).init()})});e(document).on("change",".acf_relationship .select-post_type",function(t){var n=e(this).val(),r=e(this).closest(".acf_relationship");r.attr("data-post_type",n);r.attr("data-paged",1);acf.fields.relationship.set({$el:r}).fetch()});e(document).on("click",".acf_relationship .relationship_left .relationship_list a",function(t){t.preventDefault();acf.fields.relationship.set({$el:e(this).closest(".acf_relationship")}).add(e(this));e(this).blur()});e(document).on("click",".acf_relationship .relationship_right .relationship_list a",function(t){t.preventDefault();acf.fields.relationship.set({$el:e(this).closest(".acf_relationship")}).remove(e(this));e(this).blur()});e(document).on("keyup",".acf_relationship input.relationship_search",function(t){var n=e(this).val(),r=e(this).closest(".acf_relationship");r.attr("data-s",n);r.attr("data-paged",1);clearTimeout(acf.fields.relationship.timeout);acf.fields.relationship.timeout=setTimeout(function(){acf.fields.relationship.set({$el:r}).fetch()},500)});e(document).on("keypress",".acf_relationship input.relationship_search",function(e){e.which==13&&e.preventDefault()})})(jQuery);(function(e){e(document).on("acf/setup_fields",function(t,n){if(!e(n).find(".acf-tab").exists())return;e(n).find(".acf-tab").each(function(){var t=e(this),n=t.parent(),r=n.parent(),i=t.attr("data-id"),s=t.html();if(t.hasClass("acf-tab-added"))return;t.addClass("acf-tab-added");r.children(".acf-tab-group").exists()||r.children(".field_type-tab:first").before('<ul class="hl clearfix acf-tab-group"></ul>');r.children(".acf-tab-group").append('<li class="field_key-'+i+'" data-field_key="'+i+'"><a class="acf-tab-button" href="#" data-id="'+i+'">'+s+"</a></li>")});e(n).find(".acf-tab-group").each(function(){e(this).find("li:first a").trigger("click")});acf.conditional_logic.change()});e(document).on("click",".acf-tab-button",function(t){t.preventDefault();var n=e(this),r=n.closest("ul"),i=r.parent(),s=n.attr("data-id");r.find("li").removeClass("active");n.parent("li").addClass("active");i.children(".field_type-tab").each(function(){var t=e(this),n=!1;t.hasClass("field_key-"+s)&&(n=!0);t.nextUntil(".field_type-tab").each(function(){if(n){e(this).removeClass("acf-tab_group-hide").addClass("acf-tab_group-show");e(document).trigger("acf/fields/tab/show",[e(this)])}else{e(this).removeClass("acf-tab_group-show").addClass("acf-tab_group-hide");e(document).trigger("acf/fields/tab/hide",[e(this)])}})});n.trigger("blur")});e(document).on("acf/conditional_logic/hide",function(t,n,r){if(!n.parent().hasClass("acf-tab-group"))return;var i=n.attr("data-field_key");n.siblings(":visible").exists()?n.siblings(":visible").first().children("a").trigger("click"):e('.field_type-tab[data-field_key="'+i+'"]').nextUntil(".field_type-tab").removeClass("acf-tab_group-show").addClass("acf-tab_group-hide")});e(document).on("acf/conditional_logic/show",function(e,t,n){if(!t.parent().hasClass("acf-tab-group"))return;if(t.hasClass("active")){t.children("a").trigger("click");return}if(t.siblings(".active").hasClass("acf-conditional_logic-hide")){t.children("a").trigger("click");return}})})(jQuery);(function(e){acf.validation={status:!0,disabled:!1,run:function(){var t=this;t.status=!0;e(".field.required, .form-field.required").each(function(){t.validate(e(this))})},validate:function(t){var n=!1;t.data("validation",!0);if(t.is(":hidden")){n=!0;if(t.hasClass("acf-tab_group-hide")){n=!1;var r=t.prevAll(".field_type-tab:first");r.hasClass("acf-conditional_logic-hide")?n=!0:t.prevAll(".acf-tab-group:first").find('.acf-tab-button[data-id="'+r.attr("data-field_key")+'"]').trigger("click")}}t.hasClass("acf-conditional_logic-hide")&&(n=!0);if(n)return;t.find('input[type="text"], input[type="email"], input[type="number"], input[type="hidden"], textarea').val()==""&&t.data("validation",!1);if(t.find(".acf_wysiwyg").exists()&&typeof tinyMCE=="object"){t.data("validation",!0);var i=t.find(".wp-editor-area").attr("id"),s=tinyMCE.get(i);s&&!s.getContent()&&t.data("validation",!1)}if(t.find("select").exists()){t.data("validation",!0);(t.find("select").val()=="null"||!t.find("select").val())&&t.data("validation",!1)}if(t.find('input[type="radio"]').exists()){t.data("validation",!1);t.find('input[type="radio"]:checked').exists()&&t.data("validation",!0)}if(t.find('input[type="checkbox"]').exists()){t.data("validation",!1);t.find('input[type="checkbox"]:checked').exists()&&t.data("validation",!0)}if(t.find(".acf_relationship").exists()){t.data("validation",!1);t.find(".acf_relationship .relationship_right input").exists()&&t.data("validation",!0)}if(t.find(".repeater").exists()){t.data("validation",!1);t.find(".repeater tr.row").exists()&&t.data("validation",!0)}if(t.find(".acf-gallery").exists()){t.data("validation",!1);t.find(".acf-gallery .thumbnail").exists()&&t.data("validation",!0)}e(document).trigger("acf/validate_field",[t]);if(!t.data("validation")){this.status=!1;t.closest(".field").addClass("error");if(t.data("validation_message")){var o=t.find("p.label:first"),u=null;o.children(".acf-error-message").remove();o.append('<span class="acf-error-message"><i class="bit"></i>'+t.data("validation_message")+"</span>")}}}};e(document).on("focus click",".field.required input, .field.required textarea, .field.required select",function(t){e(this).closest(".field").removeClass("error")});e(document).on("click","#save-post",function(){acf.validation.disabled=!0});e(document).on("submit","#post",function(){if(acf.validation.disabled)return!0;acf.validation.run();if(!acf.validation.status){var t=e(this);t.siblings("#message").remove();t.before('<div id="message" class="error"><p>'+acf.l10n.validation.error+"</p></div>");e("#publish").removeClass("button-primary-disabled");e("#ajax-loading").attr("style","");e("#publishing-action .spinner").hide();return!1}e(".acf_postbox.acf-hidden").remove();return!0})})(jQuery);(function(e){var t=acf.fields.wysiwyg={$el:null,$textarea:null,o:{},set:function(t){e.extend(this,t);this.$textarea=this.$el.find("textarea");this.o=acf.helpers.get_atts(this.$el);this.o.id=this.$textarea.attr("id");return this},has_tinymce:function(){var e=!1;typeof tinyMCE=="object"&&(e=!0);return e},init:function(){if(acf.helpers.is_clone_field(this.$textarea))return;var t=e.extend({},tinyMCE.settings);tinyMCE.settings.theme_advanced_buttons1="";tinyMCE.settings.theme_advanced_buttons2="";tinyMCE.settings.theme_advanced_buttons3="";tinyMCE.settings.theme_advanced_buttons4="";acf.helpers.isset(this.toolbars[this.o.toolbar])&&e.each(this.toolbars[this.o.toolbar],function(e,t){tinyMCE.settings[e]=t});tinyMCE.execCommand("mceAddControl",!1,this.o.id);e(document).trigger("acf/wysiwyg/load",this.o.id);this.add_events();tinyMCE.settings=t;wpActiveEditor=null},add_events:function(){var t=this.o.id,n=tinyMCE.get(t);if(!n)return;var r=e("#wp-"+t+"-wrap"),i=e(n.getBody());r.on("click",function(){e(document).trigger("acf/wysiwyg/click",t)});i.on("focus",function(){e(document).trigger("acf/wysiwyg/focus",t)});i.on("blur",function(){e(document).trigger("acf/wysiwyg/blur",t)})},destroy:function(){try{var e=this.o.id,t=tinyMCE.get(e);if(t){var n=t.getContent();tinyMCE.execCommand("mceRemoveControl",!1,e);this.$textarea.val(n)}}catch(r){}wpActiveEditor=null}};e(document).on("acf/setup_fields",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()});setTimeout(function(){e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).init()})},0)});e(document).on("acf/remove_fields",function(n,r){if(!t.has_tinymce())return;r.find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()})});e(document).on("acf/wysiwyg/click",function(t,n){wpActiveEditor=n;container=e("#wp-"+n+"-wrap").closest(".field").removeClass("error")});e(
|
14 |
+
document).on("acf/wysiwyg/focus",function(t,n){wpActiveEditor=n;container=e("#wp-"+n+"-wrap").closest(".field").removeClass("error")});e(document).on("acf/wysiwyg/blur",function(t,n){wpActiveEditor=null;var r=tinyMCE.get(n);if(!r)return;var i=r.getElement();r.save();e(i).trigger("change")});e(document).on("acf/sortable_start",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).destroy()})});e(document).on("acf/sortable_stop",function(n,r){if(!t.has_tinymce())return;e(r).find(".acf_wysiwyg").each(function(){t.set({$el:e(this)}).init()})});e(window).load(function(){if(!t.has_tinymce())return;var n=e("#wp-content-wrap").exists(),r=e("#wp-acf_settings-wrap").exists();mode="tmce";r&&e("#wp-acf_settings-wrap").hasClass("html-active")&&(mode="html");setTimeout(function(){r&&mode=="html"&&e("#acf_settings-tmce").trigger("click")},1);setTimeout(function(){r&&mode=="html"&&e("#acf_settings-html").trigger("click");n&&t.set({$el:e("#wp-content-wrap")}).add_events()},11)});e(document).on("click",".acf_wysiwyg a.mce_fullscreen",function(){var t=e(this).closest(".acf_wysiwyg"),n=t.attr("data-upload");n=="no"&&e("#mce_fullscreen_container td.mceToolbar .mce_add_media").remove()})})(jQuery);
|
lang/acf.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/advanced-custom-fields\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,100 +12,100 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: acf.php:
|
16 |
msgid "Field Groups"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: acf.php:
|
20 |
msgid "Advanced Custom Fields"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: acf.php:
|
24 |
msgid "Add New"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: acf.php:
|
28 |
msgid "Add New Field Group"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: acf.php:
|
32 |
msgid "Edit Field Group"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: acf.php:
|
36 |
msgid "New Field Group"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: acf.php:
|
40 |
msgid "View Field Group"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: acf.php:
|
44 |
msgid "Search Field Groups"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: acf.php:
|
48 |
msgid "No Field Groups found"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: acf.php:
|
52 |
msgid "No Field Groups found in Trash"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: acf.php:
|
56 |
msgid "Custom Fields"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: acf.php:
|
60 |
msgid "Field group updated."
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: acf.php:
|
64 |
msgid "Custom field updated."
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: acf.php:
|
68 |
msgid "Custom field deleted."
|
69 |
msgstr ""
|
70 |
|
71 |
#. translators: %s: date and time of the revision
|
72 |
-
#: acf.php:
|
73 |
msgid "Field group restored to revision from %s"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: acf.php:
|
77 |
msgid "Field group published."
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: acf.php:
|
81 |
msgid "Field group saved."
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: acf.php:
|
85 |
msgid "Field group submitted."
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: acf.php:
|
89 |
msgid "Field group scheduled for."
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: acf.php:
|
93 |
msgid "Field group draft updated."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: acf.php:
|
97 |
msgid "Thumbnail"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: acf.php:
|
101 |
msgid "Medium"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: acf.php:
|
105 |
msgid "Large"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: acf.php:
|
109 |
msgid "Full"
|
110 |
msgstr ""
|
111 |
|
@@ -491,7 +491,7 @@ msgstr ""
|
|
491 |
#: core/controllers/field_group.php:796 core/fields/file.php:186
|
492 |
#: core/fields/image.php:170 core/fields/page_link.php:109
|
493 |
#: core/fields/post_object.php:274 core/fields/post_object.php:298
|
494 |
-
#: core/fields/relationship.php:
|
495 |
#: core/fields/user.php:229
|
496 |
msgid "All"
|
497 |
msgstr ""
|
@@ -532,7 +532,7 @@ msgstr ""
|
|
532 |
msgid "Actions"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: core/controllers/field_groups.php:225 core/fields/relationship.php:
|
536 |
msgid "Filters"
|
537 |
msgstr ""
|
538 |
|
@@ -1096,39 +1096,47 @@ msgstr ""
|
|
1096 |
msgid "Google Map"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
-
#: core/fields/google-map.php:
|
1100 |
msgid "Locating"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
-
#: core/fields/google-map.php:
|
1104 |
msgid "Sorry, this browser does not support geolocation"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: core/fields/google-map.php:
|
1108 |
msgid "Clear location"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: core/fields/google-map.php:
|
1112 |
msgid "Find current location"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
-
#: core/fields/google-map.php:
|
1116 |
msgid "Search for address..."
|
1117 |
msgstr ""
|
1118 |
|
1119 |
-
#: core/fields/google-map.php:
|
1120 |
msgid "Center"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#: core/fields/google-map.php:
|
1124 |
msgid "Center the initial map"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
-
#: core/fields/google-map.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1128 |
msgid "Height"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: core/fields/google-map.php:
|
1132 |
msgid "Customise the map height"
|
1133 |
msgstr ""
|
1134 |
|
@@ -1164,7 +1172,7 @@ msgstr ""
|
|
1164 |
msgid "Add Image"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: core/fields/image.php:119 core/fields/relationship.php:
|
1168 |
msgid "Specify the returned value on front end"
|
1169 |
msgstr ""
|
1170 |
|
@@ -1232,7 +1240,7 @@ msgid "Relational"
|
|
1232 |
msgstr ""
|
1233 |
|
1234 |
#: core/fields/page_link.php:103 core/fields/post_object.php:268
|
1235 |
-
#: core/fields/relationship.php:
|
1236 |
#: core/views/meta_box_location.php:75
|
1237 |
msgid "Post Type"
|
1238 |
msgstr ""
|
@@ -1256,7 +1264,7 @@ msgstr ""
|
|
1256 |
msgid "Post Object"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: core/fields/post_object.php:292 core/fields/relationship.php:
|
1260 |
msgid "Filter from Taxonomy"
|
1261 |
msgstr ""
|
1262 |
|
@@ -1296,51 +1304,51 @@ msgstr ""
|
|
1296 |
msgid "Maximum values reached ( {max} values )"
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: core/fields/relationship.php:
|
1300 |
msgid "Search..."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: core/fields/relationship.php:
|
1304 |
msgid "Filter by post type"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: core/fields/relationship.php:
|
1308 |
msgid "Return Format"
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#: core/fields/relationship.php:
|
1312 |
msgid "Post Objects"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: core/fields/relationship.php:
|
1316 |
msgid "Post IDs"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: core/fields/relationship.php:
|
1320 |
msgid "Search"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: core/fields/relationship.php:
|
1324 |
msgid "Post Type Select"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: core/fields/relationship.php:
|
1328 |
msgid "Elements"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: core/fields/relationship.php:
|
1332 |
msgid "Selected elements will be displayed in each result"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: core/fields/relationship.php:
|
1336 |
msgid "Featured Image"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: core/fields/relationship.php:
|
1340 |
msgid "Post Title"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: core/fields/relationship.php:
|
1344 |
msgid "Maximum posts"
|
1345 |
msgstr ""
|
1346 |
|
@@ -1718,45 +1726,49 @@ msgid ""
|
|
1718 |
msgstr ""
|
1719 |
|
1720 |
#: core/views/meta_box_options.php:96
|
1721 |
-
msgid "
|
1722 |
msgstr ""
|
1723 |
|
1724 |
#: core/views/meta_box_options.php:97
|
|
|
|
|
|
|
|
|
1725 |
msgid "Excerpt"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
-
#: core/views/meta_box_options.php:
|
1729 |
msgid "Discussion"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
-
#: core/views/meta_box_options.php:
|
1733 |
msgid "Comments"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
-
#: core/views/meta_box_options.php:
|
1737 |
msgid "Revisions"
|
1738 |
msgstr ""
|
1739 |
|
1740 |
-
#: core/views/meta_box_options.php:
|
1741 |
msgid "Slug"
|
1742 |
msgstr ""
|
1743 |
|
1744 |
-
#: core/views/meta_box_options.php:
|
1745 |
msgid "Author"
|
1746 |
msgstr ""
|
1747 |
|
1748 |
-
#: core/views/meta_box_options.php:
|
1749 |
msgid "Format"
|
1750 |
msgstr ""
|
1751 |
|
1752 |
-
#: core/views/meta_box_options.php:
|
1753 |
msgid "Categories"
|
1754 |
msgstr ""
|
1755 |
|
1756 |
-
#: core/views/meta_box_options.php:
|
1757 |
msgid "Tags"
|
1758 |
msgstr ""
|
1759 |
|
1760 |
-
#: core/views/meta_box_options.php:
|
1761 |
msgid "Send Trackbacks"
|
1762 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/advanced-custom-fields\n"
|
7 |
+
"POT-Creation-Date: 2013-12-03 04:25:56+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: acf.php:437
|
16 |
msgid "Field Groups"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: acf.php:438 core/controllers/field_groups.php:214
|
20 |
msgid "Advanced Custom Fields"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: acf.php:439
|
24 |
msgid "Add New"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: acf.php:440
|
28 |
msgid "Add New Field Group"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: acf.php:441
|
32 |
msgid "Edit Field Group"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: acf.php:442
|
36 |
msgid "New Field Group"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: acf.php:443
|
40 |
msgid "View Field Group"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: acf.php:444
|
44 |
msgid "Search Field Groups"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: acf.php:445
|
48 |
msgid "No Field Groups found"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: acf.php:446
|
52 |
msgid "No Field Groups found in Trash"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: acf.php:549 core/views/meta_box_options.php:99
|
56 |
msgid "Custom Fields"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: acf.php:567 acf.php:570
|
60 |
msgid "Field group updated."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: acf.php:568
|
64 |
msgid "Custom field updated."
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: acf.php:569
|
68 |
msgid "Custom field deleted."
|
69 |
msgstr ""
|
70 |
|
71 |
#. translators: %s: date and time of the revision
|
72 |
+
#: acf.php:572
|
73 |
msgid "Field group restored to revision from %s"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: acf.php:573
|
77 |
msgid "Field group published."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: acf.php:574
|
81 |
msgid "Field group saved."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: acf.php:575
|
85 |
msgid "Field group submitted."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: acf.php:576
|
89 |
msgid "Field group scheduled for."
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: acf.php:577
|
93 |
msgid "Field group draft updated."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: acf.php:712
|
97 |
msgid "Thumbnail"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: acf.php:713
|
101 |
msgid "Medium"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: acf.php:714
|
105 |
msgid "Large"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: acf.php:715
|
109 |
msgid "Full"
|
110 |
msgstr ""
|
111 |
|
491 |
#: core/controllers/field_group.php:796 core/fields/file.php:186
|
492 |
#: core/fields/image.php:170 core/fields/page_link.php:109
|
493 |
#: core/fields/post_object.php:274 core/fields/post_object.php:298
|
494 |
+
#: core/fields/relationship.php:598 core/fields/relationship.php:622
|
495 |
#: core/fields/user.php:229
|
496 |
msgid "All"
|
497 |
msgstr ""
|
532 |
msgid "Actions"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: core/controllers/field_groups.php:225 core/fields/relationship.php:641
|
536 |
msgid "Filters"
|
537 |
msgstr ""
|
538 |
|
1096 |
msgid "Google Map"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: core/fields/google-map.php:33
|
1100 |
msgid "Locating"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: core/fields/google-map.php:34
|
1104 |
msgid "Sorry, this browser does not support geolocation"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
+
#: core/fields/google-map.php:120
|
1108 |
msgid "Clear location"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: core/fields/google-map.php:125
|
1112 |
msgid "Find current location"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: core/fields/google-map.php:126
|
1116 |
msgid "Search for address..."
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: core/fields/google-map.php:162
|
1120 |
msgid "Center"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: core/fields/google-map.php:163
|
1124 |
msgid "Center the initial map"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
+
#: core/fields/google-map.php:199
|
1128 |
+
msgid "Zoom"
|
1129 |
+
msgstr ""
|
1130 |
+
|
1131 |
+
#: core/fields/google-map.php:200
|
1132 |
+
msgid "Set the initial zoom level"
|
1133 |
+
msgstr ""
|
1134 |
+
|
1135 |
+
#: core/fields/google-map.php:217
|
1136 |
msgid "Height"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: core/fields/google-map.php:218
|
1140 |
msgid "Customise the map height"
|
1141 |
msgstr ""
|
1142 |
|
1172 |
msgid "Add Image"
|
1173 |
msgstr ""
|
1174 |
|
1175 |
+
#: core/fields/image.php:119 core/fields/relationship.php:573
|
1176 |
msgid "Specify the returned value on front end"
|
1177 |
msgstr ""
|
1178 |
|
1240 |
msgstr ""
|
1241 |
|
1242 |
#: core/fields/page_link.php:103 core/fields/post_object.php:268
|
1243 |
+
#: core/fields/relationship.php:592 core/fields/relationship.php:671
|
1244 |
#: core/views/meta_box_location.php:75
|
1245 |
msgid "Post Type"
|
1246 |
msgstr ""
|
1264 |
msgid "Post Object"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: core/fields/post_object.php:292 core/fields/relationship.php:616
|
1268 |
msgid "Filter from Taxonomy"
|
1269 |
msgstr ""
|
1270 |
|
1304 |
msgid "Maximum values reached ( {max} values )"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: core/fields/relationship.php:428
|
1308 |
msgid "Search..."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: core/fields/relationship.php:439
|
1312 |
msgid "Filter by post type"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
+
#: core/fields/relationship.php:572
|
1316 |
msgid "Return Format"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
+
#: core/fields/relationship.php:583
|
1320 |
msgid "Post Objects"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
+
#: core/fields/relationship.php:584
|
1324 |
msgid "Post IDs"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: core/fields/relationship.php:650
|
1328 |
msgid "Search"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: core/fields/relationship.php:651
|
1332 |
msgid "Post Type Select"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
+
#: core/fields/relationship.php:659
|
1336 |
msgid "Elements"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
+
#: core/fields/relationship.php:660
|
1340 |
msgid "Selected elements will be displayed in each result"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
+
#: core/fields/relationship.php:669 core/views/meta_box_options.php:106
|
1344 |
msgid "Featured Image"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
+
#: core/fields/relationship.php:670
|
1348 |
msgid "Post Title"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
+
#: core/fields/relationship.php:682
|
1352 |
msgid "Maximum posts"
|
1353 |
msgstr ""
|
1354 |
|
1726 |
msgstr ""
|
1727 |
|
1728 |
#: core/views/meta_box_options.php:96
|
1729 |
+
msgid "Permalink"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
#: core/views/meta_box_options.php:97
|
1733 |
+
msgid "Content Editor"
|
1734 |
+
msgstr ""
|
1735 |
+
|
1736 |
+
#: core/views/meta_box_options.php:98
|
1737 |
msgid "Excerpt"
|
1738 |
msgstr ""
|
1739 |
|
1740 |
+
#: core/views/meta_box_options.php:100
|
1741 |
msgid "Discussion"
|
1742 |
msgstr ""
|
1743 |
|
1744 |
+
#: core/views/meta_box_options.php:101
|
1745 |
msgid "Comments"
|
1746 |
msgstr ""
|
1747 |
|
1748 |
+
#: core/views/meta_box_options.php:102
|
1749 |
msgid "Revisions"
|
1750 |
msgstr ""
|
1751 |
|
1752 |
+
#: core/views/meta_box_options.php:103
|
1753 |
msgid "Slug"
|
1754 |
msgstr ""
|
1755 |
|
1756 |
+
#: core/views/meta_box_options.php:104
|
1757 |
msgid "Author"
|
1758 |
msgstr ""
|
1759 |
|
1760 |
+
#: core/views/meta_box_options.php:105
|
1761 |
msgid "Format"
|
1762 |
msgstr ""
|
1763 |
|
1764 |
+
#: core/views/meta_box_options.php:107
|
1765 |
msgid "Categories"
|
1766 |
msgstr ""
|
1767 |
|
1768 |
+
#: core/views/meta_box_options.php:108
|
1769 |
msgid "Tags"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: core/views/meta_box_options.php:109
|
1773 |
msgid "Send Trackbacks"
|
1774 |
msgstr ""
|
readme.txt
CHANGED
@@ -107,6 +107,17 @@ http://support.advancedcustomfields.com/
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
= 4.3.1 =
|
111 |
* API: Fixed bug with has_sub_field and have_rows functions causing complicated nested loops to produce incorrect results
|
112 |
* API: Fixed bug with get_fields function preventing values to be returned from options page and taxonomy terms
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
+
= 4.3.2 =
|
111 |
+
* Color Picker field: Fixed JS bug preventing wpColorPicker from updating value correctly
|
112 |
+
* Google Map field: Added new setting for initial zoom level
|
113 |
+
* Relationship field: minor update to fix compatibility issue with Polylang plugin
|
114 |
+
* Relationship field: Fixed bug causing filters / actions using $field['name'] to not fire correctly
|
115 |
+
* API: Fixed bug with have_rows/has_sub_field function where looping through multiple posts each containing nested repeater fields would result in an endless loop
|
116 |
+
* Export: Fixed bug causing exported XML fields to become corrupt due to line breaks
|
117 |
+
* Core: Fixed bug where duplicating a field would cause conditional logic to appear blank
|
118 |
+
* Core: Added Conditional Logic support to hide entire column of a repeater field where max_row is 1.
|
119 |
+
* Core: Added new field group 'hide on screen' option for 'permalink' which hides the permalink URL and buttons below the post title
|
120 |
+
|
121 |
= 4.3.1 =
|
122 |
* API: Fixed bug with has_sub_field and have_rows functions causing complicated nested loops to produce incorrect results
|
123 |
* API: Fixed bug with get_fields function preventing values to be returned from options page and taxonomy terms
|