Advanced Custom Fields - Version 3.5.3

Version Description

  • [Updated] Update / overhaul flexible content field UI
  • [Added] Add Show / Hide for flexible content layouts
  • [Added] Add column width for flexible content - http://support.advancedcustomfields.com/discussion/3382/percentage-widths-on-fc-fields
  • [Added] Add instructions for flexible content sub fields
  • [Added] Add new parameter to get_field to allow for no formatting - http://support.advancedcustomfields.com/discussion/3188/update_field-repeater
  • [Fixed] Fix compatibility issue with post type switcher plugin - http://support.advancedcustomfields.com/discussion/3493/field-group-changes-to-post-when-i-save
  • [Added] Add new location rules for "Front Page" "Post Page" - http://support.advancedcustomfields.com/discussion/3485/groups-association-whit-page-slug-instead-of-id
  • [Fixed] Fix flexible content + repeater row limit bug - http://support.advancedcustomfields.com/discussion/3557/repeater-fields-inside-flexible-field-on-backend-not-visible-before-first-savingpublishing
  • [Added] Add filter "acf_load_value" for values - http://support.advancedcustomfields.com/discussion/3725/a-filter-for-get_field
  • [Fixed] Fix choices backslash issue - http://support.advancedcustomfields.com/discussion/3796/backslash-simple-quote-bug-in-radio-button-values-fields
  • [Updated] acf_options_page_title now overrides the menu and title. If your field groups are not showing after update, please re-save them to update the location rules.
  • [Updated] Update location rules to show all post types in page / page_parent / post
  • [Added] Change all "pre_save_field" functions to "acf_save_field" hooks
  • [Improved] Improve general CSS / JS
Download this release

Release Info

Developer elliotcondon
Plugin Icon 128x128 Advanced Custom Fields
Version 3.5.3
Comparing to
See all releases

Code changes from version 3.5.2 to 3.5.3

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: 3.5.2
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
@@ -48,7 +48,7 @@ class Acf
48
  // vars
49
  $this->path = plugin_dir_path(__FILE__);
50
  $this->dir = plugins_url('',__FILE__);
51
- $this->version = '3.5.2';
52
  $this->upgrade_version = '3.4.1'; // this is the latest version which requires an upgrade
53
  $this->cache = array(); // basic array cache to hold data throughout the page load
54
 
@@ -167,6 +167,7 @@ class Acf
167
 
168
 
169
  // add child fields
 
170
  $return['text'] = new acf_Text($this);
171
  $return['textarea'] = new acf_Textarea($this);
172
  $return['wysiwyg'] = new acf_Wysiwyg($this);
@@ -576,12 +577,22 @@ class Acf
576
  $row['meta_value'] = maybe_unserialize( $row['meta_value'] ); // run again for WPML
577
 
578
 
579
- // run filters
580
  $field = $row['meta_value'];
 
 
 
581
  $field = apply_filters('acf_load_field', $field);
582
- $field = apply_filters('acf_load_field-' . $field['name'], $field);
583
- $field = apply_filters('acf_load_field-' . $field['key'], $field);
584
-
 
 
 
 
 
 
 
585
 
586
  // set cache
587
  $this->set_cache('acf_field_' . $field_key, $field);
@@ -607,10 +618,18 @@ class Acf
607
  {
608
  if($field['key'] == $field_key)
609
  {
610
- // run filters
611
  $field = apply_filters('acf_load_field', $field);
612
- $field = apply_filters('acf_load_field-' . $field['name'], $field);
613
- $field = apply_filters('acf_load_field-' . $field['key'], $field);
 
 
 
 
 
 
 
 
614
 
615
  // set cache
616
  $this->set_cache('acf_field_' . $field_key, $field);
@@ -946,30 +965,18 @@ class Acf
946
 
947
  function update_field($post_id, $field)
948
  {
 
 
 
 
949
  // format the field (select, repeater, etc)
950
- $field = $this->pre_save_field($field);
951
 
952
  // save it!
953
  update_post_meta($post_id, $field['key'], $field);
954
  }
955
 
956
 
957
- /*--------------------------------------------------------------------------------------
958
- *
959
- * pre_save_field
960
- *
961
- * @author Elliot Condon
962
- * @since 3.0.0
963
- *
964
- *-------------------------------------------------------------------------------------*/
965
-
966
- function pre_save_field($field)
967
- {
968
- // format the field (select, repeater, etc)
969
- return $this->fields[$field['type']]->pre_save_field($field);
970
- }
971
-
972
-
973
  /*--------------------------------------------------------------------------------------
974
  *
975
  * format_value_for_api
@@ -1274,37 +1281,108 @@ class Acf
1274
  // PAGE
1275
  case "page_type":
1276
 
1277
- $page_type = isset($overrides['page_type']) ? $overrides['page_type'] : $post->post_parent;
1278
 
1279
- if($rule['operator'] == "==")
1280
  {
1281
- if($rule['value'] == "parent" && $page_type == "0")
1282
- {
1283
- return true;
1284
- }
1285
-
1286
- if($rule['value'] == "child" && $page_type != "0")
1287
- {
1288
- return true;
1289
- }
1290
-
1291
- return false;
 
 
 
 
 
 
 
1292
  }
1293
- elseif($rule['operator'] == "!=")
 
 
1294
  {
1295
- if($rule['value'] == "parent" && $page_type != "0")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1296
  {
1297
- return true;
1298
  }
1299
-
1300
- if($rule['value'] == "child" && $page_type == "0")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1301
  {
1302
- return true;
1303
  }
1304
-
1305
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1306
  }
1307
 
 
1308
  break;
1309
 
1310
  // PAGE PARENT
@@ -1462,34 +1540,26 @@ class Acf
1462
 
1463
  // Options Page
1464
  case "options_page":
1465
-
1466
- if(!function_exists('get_admin_page_title'))
1467
- {
1468
- return false;
1469
- }
1470
-
1471
-
1472
- // value has changed in 3.2.6 to a sanitized string
1473
- //if( substr($rule['value'], 0, 7) != 'options' )
1474
- //{
1475
- // $rule['value'] = 'options-' . sanitize_title( $rule['value'] );
1476
- //}
1477
-
1478
-
1479
  // value has changed in 3.5.1 to a acf-options-$title
1480
- if( substr($rule['value'], 0, 12) != 'acf-options-' )
1481
  {
1482
  $rule['value'] = 'acf-options-' . sanitize_title( $rule['value'] );
 
 
 
 
 
 
1483
  }
1484
 
1485
 
1486
- // generate the page title to match against
1487
- $page_title = 'acf-options-' . sanitize_title( get_admin_page_title() );
1488
-
1489
-
1490
  if($rule['operator'] == "==")
1491
  {
1492
- if( $page_title == $rule['value'] )
1493
  {
1494
  return true;
1495
  }
@@ -1498,7 +1568,7 @@ class Acf
1498
  }
1499
  elseif($rule['operator'] == "!=")
1500
  {
1501
- if( $page_title == $rule['value'] )
1502
  {
1503
  return true;
1504
  }
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: 3.5.3.1
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
48
  // vars
49
  $this->path = plugin_dir_path(__FILE__);
50
  $this->dir = plugins_url('',__FILE__);
51
+ $this->version = '3.5.3.1';
52
  $this->upgrade_version = '3.4.1'; // this is the latest version which requires an upgrade
53
  $this->cache = array(); // basic array cache to hold data throughout the page load
54
 
167
 
168
 
169
  // add child fields
170
+ $return['none'] = new acf_Field($this);
171
  $return['text'] = new acf_Text($this);
172
  $return['textarea'] = new acf_Textarea($this);
173
  $return['wysiwyg'] = new acf_Wysiwyg($this);
577
  $row['meta_value'] = maybe_unserialize( $row['meta_value'] ); // run again for WPML
578
 
579
 
580
+ // store field
581
  $field = $row['meta_value'];
582
+
583
+
584
+ // apply filters
585
  $field = apply_filters('acf_load_field', $field);
586
+
587
+ $keys = array('type', 'name', 'key');
588
+ foreach( $keys as $key )
589
+ {
590
+ if( isset($field[ $key ]) )
591
+ {
592
+ $value = apply_filters('acf_load_field-' . $field[ $key ], $field);
593
+ }
594
+ }
595
+
596
 
597
  // set cache
598
  $this->set_cache('acf_field_' . $field_key, $field);
618
  {
619
  if($field['key'] == $field_key)
620
  {
621
+ // apply filters
622
  $field = apply_filters('acf_load_field', $field);
623
+
624
+ $keys = array('type', 'name', 'key');
625
+ foreach( $keys as $key )
626
+ {
627
+ if( isset($field[ $key ]) )
628
+ {
629
+ $value = apply_filters('acf_load_field-' . $field[ $key ], $field);
630
+ }
631
+ }
632
+
633
 
634
  // set cache
635
  $this->set_cache('acf_field_' . $field_key, $field);
965
 
966
  function update_field($post_id, $field)
967
  {
968
+ // apply filters
969
+ $field = apply_filters('acf_save_field', $field );
970
+ $field = apply_filters('acf_save_field-' . $field['type'], $field );
971
+
972
  // format the field (select, repeater, etc)
973
+ //$field = $this->pre_save_field($field);
974
 
975
  // save it!
976
  update_post_meta($post_id, $field['key'], $field);
977
  }
978
 
979
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
980
  /*--------------------------------------------------------------------------------------
981
  *
982
  * format_value_for_api
1281
  // PAGE
1282
  case "page_type":
1283
 
1284
+ $page = isset($overrides['page']) ? $overrides['page'] : $post->ID;
1285
 
1286
+ if( $rule['value'] == 'front_page')
1287
  {
1288
+ $front_page = (int) get_option('page_on_front');
1289
+
1290
+ if( $rule['operator'] == "==" )
1291
+ {
1292
+ if( $front_page == $page )
1293
+ {
1294
+ return true;
1295
+ }
1296
+ }
1297
+ elseif( $rule['operator'] == "!=" )
1298
+ {
1299
+ if( $front_page != $page )
1300
+ {
1301
+ return true;
1302
+ }
1303
+ }
1304
+
1305
+ return false;
1306
  }
1307
+
1308
+
1309
+ if( $rule['value'] == 'posts_page')
1310
  {
1311
+ $posts_page = (int) get_option('page_for_posts');
1312
+
1313
+ if( $rule['operator'] == "==" )
1314
+ {
1315
+ if( $posts_page == $page )
1316
+ {
1317
+ return true;
1318
+ }
1319
+ }
1320
+ elseif( $rule['operator'] == "!=" )
1321
+ {
1322
+ if( $posts_page != $page )
1323
+ {
1324
+ return true;
1325
+ }
1326
+ }
1327
+
1328
+ return false;
1329
+ }
1330
+
1331
+
1332
+ if( $rule['value'] == 'parent')
1333
+ {
1334
+ $post_parent = $post->post_parent;
1335
+ if( isset($overrides['page_parent']) )
1336
  {
1337
+ $post_parent = (int) $overrides['page_parent'];
1338
  }
1339
+
1340
+ if( $rule['operator'] == "==" )
1341
+ {
1342
+ if( $post_parent == 0 )
1343
+ {
1344
+ return true;
1345
+ }
1346
+ }
1347
+ elseif( $rule['operator'] == "!=" )
1348
+ {
1349
+ if( $post_parent != 0 )
1350
+ {
1351
+ return true;
1352
+ }
1353
+ }
1354
+
1355
+ return false;
1356
+ }
1357
+
1358
+
1359
+ if( $rule['value'] == 'child')
1360
+ {
1361
+ $post_parent = $post->post_parent;
1362
+ if( isset($overrides['page_parent']) )
1363
  {
1364
+ $post_parent = (int) $overrides['page_parent'];
1365
  }
1366
+
1367
+ if( $rule['operator'] == "==" )
1368
+ {
1369
+ if( $post_parent != 0 )
1370
+ {
1371
+ return true;
1372
+ }
1373
+ }
1374
+ elseif( $rule['operator'] == "!=" )
1375
+ {
1376
+ if( $post_parent == 0 )
1377
+ {
1378
+ return true;
1379
+ }
1380
+ }
1381
+
1382
+ return false;
1383
  }
1384
 
1385
+
1386
  break;
1387
 
1388
  // PAGE PARENT
1540
 
1541
  // Options Page
1542
  case "options_page":
1543
+
1544
+ global $plugin_page;
1545
+
1546
+
 
 
 
 
 
 
 
 
 
 
1547
  // value has changed in 3.5.1 to a acf-options-$title
1548
+ if( substr($rule['value'], 0, 11) != 'acf-options' )
1549
  {
1550
  $rule['value'] = 'acf-options-' . sanitize_title( $rule['value'] );
1551
+
1552
+ // value may now be wrong (acf-options-options)
1553
+ if( $rule['value'] == 'acf-options-options' )
1554
+ {
1555
+ $rule['value'] = 'acf-options';
1556
+ }
1557
  }
1558
 
1559
 
 
 
 
 
1560
  if($rule['operator'] == "==")
1561
  {
1562
+ if( $plugin_page == $rule['value'] )
1563
  {
1564
  return true;
1565
  }
1568
  }
1569
  elseif($rule['operator'] == "!=")
1570
  {
1571
+ if( $plugin_page == $rule['value'] )
1572
  {
1573
  return true;
1574
  }
core/api.php CHANGED
@@ -93,7 +93,7 @@ function get_fields($post_id = false)
93
  *
94
  *-------------------------------------------------------------------------------------*/
95
 
96
- function get_field($field_key, $post_id = false)
97
  {
98
  global $post, $acf;
99
 
@@ -125,30 +125,40 @@ function get_field($field_key, $post_id = false)
125
  );
126
 
127
 
128
- // is $field_name a name? pre 3.4.0
129
- if( strpos($field_key, "field_") === false )
130
  {
131
- // get field key
132
- if( is_numeric($post_id) )
133
- {
134
- $field_key = get_post_meta($post_id, '_' . $field_key, true);
135
- }
136
- elseif( strpos($post_id, 'user_') !== false )
137
  {
138
- $temp_post_id = str_replace('user_', '', $post_id);
139
- $field_key = get_user_meta($temp_post_id, '_' . $field_key, true);
 
 
 
 
 
 
 
 
 
 
 
 
140
  }
141
- else
 
 
 
142
  {
143
- $field_key = get_option('_' . $post_id . '_' . $field_key);
144
  }
145
  }
146
-
147
-
148
- // get field
149
- if( strpos($field_key, "field_") !== false )
150
  {
151
- $field = $acf->get_acf_field($field_key);
 
 
 
152
  }
153
 
154
 
@@ -459,14 +469,16 @@ $GLOBALS['acf_register_options_page'] = array();
459
 
460
  function register_options_page($title = "")
461
  {
462
- $GLOBALS['acf_register_options_page'][] = array(
463
- 'title' => $title,
464
- 'slug' => 'acf-options-' . sanitize_title( $title ),
465
- );
466
  }
467
 
468
  function acf_register_options_page($array)
469
  {
 
 
 
 
 
470
  $array = array_merge($array, $GLOBALS['acf_register_options_page']);
471
 
472
  return $array;
93
  *
94
  *-------------------------------------------------------------------------------------*/
95
 
96
+ function get_field($field_key, $post_id = false, $format_value = true)
97
  {
98
  global $post, $acf;
99
 
125
  );
126
 
127
 
128
+ if( $format_value )
 
129
  {
130
+ // is $field_name a name? pre 3.4.0
131
+ if( strpos($field_key, "field_") === false )
 
 
 
 
132
  {
133
+ // get field key
134
+ if( is_numeric($post_id) )
135
+ {
136
+ $field_key = get_post_meta($post_id, '_' . $field_key, true);
137
+ }
138
+ elseif( strpos($post_id, 'user_') !== false )
139
+ {
140
+ $temp_post_id = str_replace('user_', '', $post_id);
141
+ $field_key = get_user_meta($temp_post_id, '_' . $field_key, true);
142
+ }
143
+ else
144
+ {
145
+ $field_key = get_option('_' . $post_id . '_' . $field_key);
146
+ }
147
  }
148
+
149
+
150
+ // get field
151
+ if( strpos($field_key, "field_") !== false )
152
  {
153
+ $field = $acf->get_acf_field($field_key);
154
  }
155
  }
156
+ else
 
 
 
157
  {
158
+ $field = array(
159
+ 'type' => 'none',
160
+ 'name' => $field_key
161
+ );
162
  }
163
 
164
 
469
 
470
  function register_options_page($title = "")
471
  {
472
+ $GLOBALS['acf_register_options_page'][] = $title;
 
 
 
473
  }
474
 
475
  function acf_register_options_page($array)
476
  {
477
+ if( empty($GLOBALS['acf_register_options_page']) )
478
+ {
479
+ return $array;
480
+ }
481
+
482
  $array = array_merge($array, $GLOBALS['acf_register_options_page']);
483
 
484
  return $array;
core/controllers/field_group.php CHANGED
@@ -305,46 +305,65 @@ class acf_field_group
305
  //'public' => true
306
  ));
307
 
308
- unset( $choices['attachment'], $choices['revision'] , $choices['nav_menu_item'] );
309
 
310
  break;
311
 
312
 
313
  case "page":
314
 
315
- $pages = get_pages(array(
316
- 'numberposts' => -1,
317
- 'post_type' => 'page',
318
- 'sort_column' => 'menu_order',
319
- 'order' => 'ASC',
320
- 'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
321
- 'suppress_filters' => false,
322
- ));
323
-
324
- foreach($pages as $page)
325
  {
326
- $title = '';
327
- $ancestors = get_ancestors($page->ID, 'page');
328
- if($ancestors)
329
  {
330
- foreach($ancestors as $a)
 
 
 
 
 
 
 
 
 
331
  {
332
- $title .= '- ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  }
 
334
  }
335
-
336
- $title .= apply_filters( 'the_title', $page->post_title, $page->ID );
337
-
338
-
339
- // status
340
- if($page->post_status != "publish")
341
- {
342
- $title .= " ($page->post_status)";
343
- }
344
-
345
- $choices[$page->ID] = $title;
346
-
347
  }
 
348
 
349
  break;
350
 
@@ -352,8 +371,10 @@ class acf_field_group
352
  case "page_type" :
353
 
354
  $choices = array(
355
- 'parent' => __("Parent Page",'acf'),
356
- 'child' => __("Child Page",'acf'),
 
 
357
  );
358
 
359
  break;
@@ -374,24 +395,47 @@ class acf_field_group
374
 
375
  case "post" :
376
 
377
- $posts = get_posts(array(
378
- 'numberposts' => '-1',
379
- 'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
380
- 'suppress_filters' => false,
381
- ));
382
 
383
- foreach($posts as $post)
384
  {
385
- $title = apply_filters( 'the_title', $post->post_title, $post->ID );
386
-
387
- // status
388
- if($post->post_status != "publish")
389
  {
390
- $title .= " ($post->post_status)";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  }
392
-
393
- $choices[$post->ID] = $title;
394
  }
 
 
395
 
396
  break;
397
 
@@ -423,22 +467,22 @@ class acf_field_group
423
 
424
  case "options_page" :
425
 
426
- $parent_title = apply_filters('acf_options_page_title', __('Options','acf'));
427
-
428
  $choices = array(
429
- $parent_title => $parent_title,
430
  );
431
-
432
- $custom = apply_filters('acf_register_options_page',array());
433
- if(!empty($custom))
434
- {
 
435
  $choices = array();
436
- foreach($custom as $c)
437
  {
438
- $choices[$c['slug']] = $c['title'];
 
439
  }
440
  }
441
-
442
  break;
443
 
444
  case "taxonomy" :
305
  //'public' => true
306
  ));
307
 
308
+ unset( $choices['attachment'], $choices['revision'] , $choices['nav_menu_item'], $choices['acf'] );
309
 
310
  break;
311
 
312
 
313
  case "page":
314
 
315
+ $optgroup = true;
316
+ $post_types = get_post_types( array('capability_type' => 'page') );
317
+ unset( $post_types['attachment'], $post_types['revision'] , $post_types['nav_menu_item'], $post_types['acf'] );
318
+
319
+ if( $post_types )
 
 
 
 
 
320
  {
321
+ foreach( $post_types as $post_type )
 
 
322
  {
323
+ $pages = get_pages(array(
324
+ 'numberposts' => -1,
325
+ 'post_type' => $post_type,
326
+ 'sort_column' => 'menu_order',
327
+ 'order' => 'ASC',
328
+ 'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
329
+ 'suppress_filters' => false,
330
+ ));
331
+
332
+ if( $pages )
333
  {
334
+ $choices[$post_type] = array();
335
+
336
+ foreach($pages as $page)
337
+ {
338
+ $title = '';
339
+ $ancestors = get_ancestors($page->ID, 'page');
340
+ if($ancestors)
341
+ {
342
+ foreach($ancestors as $a)
343
+ {
344
+ $title .= '- ';
345
+ }
346
+ }
347
+
348
+ $title .= apply_filters( 'the_title', $page->post_title, $page->ID );
349
+
350
+
351
+ // status
352
+ if($page->post_status != "publish")
353
+ {
354
+ $title .= " ($page->post_status)";
355
+ }
356
+
357
+ $choices[$post_type][$page->ID] = $title;
358
+
359
+ }
360
+ // foreach($pages as $page)
361
  }
362
+ // if( $pages )
363
  }
364
+ // foreach( $post_types as $post_type )
 
 
 
 
 
 
 
 
 
 
 
365
  }
366
+ // if( $post_types )
367
 
368
  break;
369
 
371
  case "page_type" :
372
 
373
  $choices = array(
374
+ 'front_page' => __("Front Page",'acf'),
375
+ 'posts_page' => __("Posts Page",'acf'),
376
+ 'parent' => __("Parent Page",'acf'),
377
+ 'child' => __("Child Page",'acf'),
378
  );
379
 
380
  break;
395
 
396
  case "post" :
397
 
398
+ $optgroup = true;
399
+ $post_types = get_post_types( array('capability_type' => 'post') );
400
+ unset( $post_types['attachment'], $post_types['revision'] , $post_types['nav_menu_item'], $post_types['acf'] );
 
 
401
 
402
+ if( $post_types )
403
  {
404
+ foreach( $post_types as $post_type )
 
 
 
405
  {
406
+
407
+ $posts = get_posts(array(
408
+ 'numberposts' => '-1',
409
+ 'post_type' => $post_type,
410
+ 'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
411
+ 'suppress_filters' => false,
412
+ ));
413
+
414
+ if( $posts)
415
+ {
416
+ $choices[$post_type] = array();
417
+
418
+ foreach($posts as $post)
419
+ {
420
+ $title = apply_filters( 'the_title', $post->post_title, $post->ID );
421
+
422
+ // status
423
+ if($post->post_status != "publish")
424
+ {
425
+ $title .= " ($post->post_status)";
426
+ }
427
+
428
+ $choices[$post_type][$post->ID] = $title;
429
+
430
+ }
431
+ // foreach($posts as $post)
432
+ }
433
+ // if( $posts )
434
  }
435
+ // foreach( $post_types as $post_type )
 
436
  }
437
+ // if( $post_types )
438
+
439
 
440
  break;
441
 
467
 
468
  case "options_page" :
469
 
 
 
470
  $choices = array(
471
+ 'acf-options' => apply_filters( 'acf_options_page_title', __('Options','acf') )
472
  );
473
+
474
+
475
+ $titles = apply_filters( 'acf_register_options_page', array() );
476
+ if( !empty($titles) )
477
+ {
478
  $choices = array();
479
+ foreach( $titles as $title )
480
  {
481
+ $slug = 'acf-options-' . sanitize_title( $title );
482
+ $choices[ $slug ] = $title;
483
  }
484
  }
485
+
486
  break;
487
 
488
  case "taxonomy" :
core/controllers/input.php CHANGED
@@ -569,6 +569,21 @@ acf.text.gallery_tb_title_edit = "<?php _e("Edit Image",'acf'); ?>";
569
 
570
  function acf_print_scripts_input()
571
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
  foreach($this->parent->fields as $field)
573
  {
574
  $field->admin_print_scripts();
@@ -587,6 +602,14 @@ acf.text.gallery_tb_title_edit = "<?php _e("Edit Image",'acf'); ?>";
587
 
588
  function acf_print_styles_input()
589
  {
 
 
 
 
 
 
 
 
590
  foreach($this->parent->fields as $field)
591
  {
592
  $field->admin_print_styles();
569
 
570
  function acf_print_scripts_input()
571
  {
572
+
573
+ wp_register_script('acf-datepicker', $this->parent->dir . '/core/fields/date_picker/jquery.ui.datepicker.js', false, $this->parent->version);
574
+
575
+ wp_enqueue_script(array(
576
+ 'jquery',
577
+ 'jquery-ui-core',
578
+ 'jquery-ui-tabs',
579
+ 'jquery-ui-sortable',
580
+ 'farbtastic',
581
+ 'thickbox',
582
+ 'media-upload',
583
+ 'acf-datepicker',
584
+ ));
585
+
586
+
587
  foreach($this->parent->fields as $field)
588
  {
589
  $field->admin_print_scripts();
602
 
603
  function acf_print_styles_input()
604
  {
605
+ wp_register_style('acf-datepicker', $this->parent->dir . '/core/fields/date_picker/style.date_picker.css', false, $this->parent->version);
606
+
607
+ wp_enqueue_style(array(
608
+ 'thickbox',
609
+ 'farbtastic',
610
+ 'acf-datepicker',
611
+ ));
612
+
613
  foreach($this->parent->fields as $field)
614
  {
615
  $field->admin_print_styles();
core/controllers/options_page.php CHANGED
@@ -66,11 +66,15 @@ class acf_options_page
66
 
67
 
68
  // redirect to first child
69
- $custom = apply_filters('acf_register_options_page',array());
70
  if( !empty($custom) )
71
  {
72
- $parent_slug = $custom[0]['slug'];
73
- $parent_title = $custom[0]['title'];
 
 
 
 
74
  }
75
 
76
 
@@ -96,7 +100,10 @@ class acf_options_page
96
  {
97
  foreach($custom as $c)
98
  {
99
- $child_page = add_submenu_page($parent_slug, $c['title'], $c['title'], 'edit_posts', $c['slug'], array($this, 'html'));
 
 
 
100
 
101
  // some fields require js + css
102
  add_action('admin_print_scripts-'.$child_page, array($this, 'admin_print_scripts'));
66
 
67
 
68
  // redirect to first child
69
+ $custom = apply_filters( 'acf_register_options_page',array() );
70
  if( !empty($custom) )
71
  {
72
+ $parent_title = $custom[0];
73
+ $parent_slug = 'acf-options-' . sanitize_title( $parent_title );
74
+ }
75
+ else
76
+ {
77
+ $parent_title = apply_filters('acf_options_page_title', $parent_title);
78
  }
79
 
80
 
100
  {
101
  foreach($custom as $c)
102
  {
103
+ $sub_title = $c;
104
+ $sub_slug = 'acf-options-' . sanitize_title( $sub_title );
105
+
106
+ $child_page = add_submenu_page($parent_slug, $sub_title, $sub_title, 'edit_posts', $sub_slug, array($this, 'html'));
107
 
108
  // some fields require js + css
109
  add_action('admin_print_scripts-'.$child_page, array($this, 'admin_print_scripts'));
core/controllers/settings.php CHANGED
@@ -64,6 +64,7 @@ class acf_settings
64
  * @description:
65
  * @since 3.5.2
66
  * @created: 16/11/12
 
67
  */
68
 
69
  function load()
64
  * @description:
65
  * @since 3.5.2
66
  * @created: 16/11/12
67
+ * @thanks: Kevin Biloski and Charlie Eriksen via Secunia SVCRP
68
  */
69
 
70
  function load()
core/controllers/third_party.php CHANGED
@@ -36,6 +36,38 @@ class acf_third_party
36
 
37
  // Duplicate Post - http://wordpress.org/extend/plugins/duplicate-post/
38
  add_action( 'dp_duplicate_page', array($this, 'dp_duplicate_page'), 11, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
 
41
 
36
 
37
  // Duplicate Post - http://wordpress.org/extend/plugins/duplicate-post/
38
  add_action( 'dp_duplicate_page', array($this, 'dp_duplicate_page'), 11, 2);
39
+
40
+
41
+ // Post Type Switcher - http://wordpress.org/extend/plugins/post-type-switcher/
42
+ add_filter('pts_post_type_filter', array($this, 'pts_post_type_filter'));
43
+ }
44
+
45
+
46
+ /*
47
+ * pts_allowed_pages
48
+ *
49
+ * @description:
50
+ * @since 3.5.3
51
+ * @created: 19/11/12
52
+ */
53
+
54
+ function pts_post_type_filter( $args )
55
+ {
56
+
57
+ // global
58
+ global $typenow;
59
+
60
+ if( $typenow == "acf" )
61
+ {
62
+ $args = array(
63
+ 'public' => false,
64
+ 'show_ui' => true
65
+ );
66
+ }
67
+
68
+
69
+ // return
70
+ return $args;
71
  }
72
 
73
 
core/fields/acf_field.php CHANGED
@@ -114,10 +114,18 @@ class acf_Field
114
  // strip slashes
115
  $value = stripslashes_deep($value);
116
 
 
117
  // apply filters
118
  $value = apply_filters('acf_update_value', $value, $field, $post_id );
119
- $value = apply_filters('acf_update_value-' . $field['name'], $value, $field, $post_id);
120
- $value = apply_filters('acf_update_value-' . $field['key'], $value, $field, $post_id);
 
 
 
 
 
 
 
121
 
122
 
123
  // if $post_id is a string, then it is used in the everything fields and can be found in the options table
@@ -145,21 +153,6 @@ class acf_Field
145
  }
146
 
147
 
148
- /*--------------------------------------------------------------------------------------
149
- *
150
- * pre_save_field
151
- * - called just before saving the field to the database.
152
- *
153
- * @author Elliot Condon
154
- * @since 2.2.0
155
- *
156
- *-------------------------------------------------------------------------------------*/
157
-
158
- function pre_save_field($field)
159
- {
160
- return $field;
161
- }
162
-
163
 
164
  /*--------------------------------------------------------------------------------------
165
  *
@@ -240,7 +233,21 @@ class acf_Field
240
 
241
  // if value was duplicated, it may now be a serialized string!
242
  $value = maybe_unserialize($value);
243
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  return $value;
246
  }
114
  // strip slashes
115
  $value = stripslashes_deep($value);
116
 
117
+
118
  // apply filters
119
  $value = apply_filters('acf_update_value', $value, $field, $post_id );
120
+
121
+ $keys = array('type', 'name', 'key');
122
+ foreach( $keys as $key )
123
+ {
124
+ if( isset($field[ $key ]) )
125
+ {
126
+ $value = apply_filters('acf_update_value-' . $field[ $key ], $value, $field, $post_id);
127
+ }
128
+ }
129
 
130
 
131
  // if $post_id is a string, then it is used in the everything fields and can be found in the options table
153
  }
154
 
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  /*--------------------------------------------------------------------------------------
158
  *
233
 
234
  // if value was duplicated, it may now be a serialized string!
235
  $value = maybe_unserialize($value);
236
+
237
+
238
+ // apply filters
239
+ $value = apply_filters('acf_load_value', $value, $field, $post_id );
240
+
241
+ $keys = array('type', 'name', 'key');
242
+ foreach( $keys as $key )
243
+ {
244
+ if( isset($field[ $key ]) )
245
+ {
246
+ $value = apply_filters('acf_load_value-' . $field[ $key ], $value, $field, $post_id);
247
+ }
248
+ }
249
+
250
+
251
 
252
  return $value;
253
  }
core/fields/checkbox.php CHANGED
@@ -121,76 +121,18 @@ class acf_Checkbox extends acf_Field
121
  </p>
122
  </td>
123
  <td>
124
- <textarea class="texarea field_option-choices" rows="5" name="fields[<?php echo $key; ?>][choices]" id=""><?php echo $field['choices']; ?></textarea>
 
 
 
 
 
 
 
125
  </td>
126
  </tr>
127
  <?php
128
  }
129
-
130
-
131
- /*--------------------------------------------------------------------------------------
132
- *
133
- * pre_save_field
134
- * - called just before saving the field to the database.
135
- *
136
- * @author Elliot Condon
137
- * @since 2.2.0
138
- *
139
- *-------------------------------------------------------------------------------------*/
140
-
141
- function pre_save_field($field)
142
- {
143
- // vars
144
- $defaults = array(
145
- 'choices' => '',
146
- );
147
-
148
- $field = array_merge($defaults, $field);
149
-
150
-
151
- // check if is array. Normal back end edit posts a textarea, but a user might use update_field from the front end
152
- if( is_array( $field['choices'] ))
153
- {
154
- return $field;
155
- }
156
-
157
-
158
- // vars
159
- $new_choices = array();
160
-
161
- // explode choices from each line
162
- if(strpos($field['choices'], "\n") !== false)
163
- {
164
- // found multiple lines, explode it
165
- $field['choices'] = explode("\n", $field['choices']);
166
- }
167
- else
168
- {
169
- // no multiple lines!
170
- $field['choices'] = array($field['choices']);
171
- }
172
-
173
- // key => value
174
- foreach($field['choices'] as $choice)
175
- {
176
- if(strpos($choice, ' : ') !== false)
177
- {
178
- $choice = explode(' : ', $choice);
179
- $new_choices[trim($choice[0])] = trim($choice[1]);
180
- }
181
- else
182
- {
183
- $new_choices[trim($choice)] = trim($choice);
184
- }
185
- }
186
-
187
- // update choices
188
- $field['choices'] = $new_choices;
189
-
190
- // return updated field
191
- return $field;
192
-
193
- }
194
 
195
  }
196
  ?>
121
  </p>
122
  </td>
123
  <td>
124
+ <?php
125
+ $this->parent->create_field(array(
126
+ 'type' => 'textarea',
127
+ 'class' => 'textarea field_option-choices',
128
+ 'name' => 'fields['.$key.'][choices]',
129
+ 'value' => $field['choices'],
130
+ ));
131
+ ?>
132
  </td>
133
  </tr>
134
  <?php
135
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
  }
138
  ?>
core/fields/color_picker.php CHANGED
@@ -23,31 +23,6 @@ class acf_Color_picker extends acf_Field
23
  }
24
 
25
 
26
- /*--------------------------------------------------------------------------------------
27
- *
28
- * admin_print_scripts / admin_print_styles
29
- *
30
- * @author Elliot Condon
31
- * @since 3.0.0
32
- *
33
- *-------------------------------------------------------------------------------------*/
34
-
35
- function admin_print_scripts()
36
- {
37
- wp_enqueue_script(array(
38
- 'farbtastic'
39
- ));
40
- }
41
-
42
- function admin_print_styles()
43
- {
44
- wp_enqueue_style(array(
45
- 'farbtastic'
46
- ));
47
-
48
- }
49
-
50
-
51
  /*--------------------------------------------------------------------------------------
52
  *
53
  * create_field
23
  }
24
 
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /*--------------------------------------------------------------------------------------
27
  *
28
  * create_field
core/fields/date_picker/date_picker.php CHANGED
@@ -21,23 +21,6 @@ class acf_Date_picker extends acf_Field
21
  $this->title = __("Date Picker",'acf');
22
 
23
  }
24
-
25
-
26
- /*--------------------------------------------------------------------------------------
27
- *
28
- * admin_head
29
- *
30
- * @author Elliot Condon
31
- * @since 2.0.6
32
- *
33
- *-------------------------------------------------------------------------------------*/
34
-
35
- function admin_head()
36
- {
37
- // add datepicker
38
- echo '<link rel="stylesheet" type="text/css" href="'.$this->parent->dir.'/core/fields/date_picker/style.date_picker.css" />';
39
- echo '<script type="text/javascript" src="'.$this->parent->dir.'/core/fields/date_picker/jquery.ui.datepicker.js" ></script>';
40
- }
41
 
42
 
43
  /*--------------------------------------------------------------------------------------
21
  $this->title = __("Date Picker",'acf');
22
 
23
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
 
26
  /*--------------------------------------------------------------------------------------
core/fields/file.php CHANGED
@@ -139,35 +139,6 @@ class acf_File extends acf_Field
139
  }
140
 
141
 
142
- /*--------------------------------------------------------------------------------------
143
- *
144
- * admin_print_scripts / admin_print_styles
145
- *
146
- * @author Elliot Condon
147
- * @since 3.0.0
148
- *
149
- *-------------------------------------------------------------------------------------*/
150
-
151
- function admin_print_scripts()
152
- {
153
- wp_enqueue_script(array(
154
- 'jquery',
155
- 'jquery-ui-core',
156
- 'jquery-ui-tabs',
157
-
158
- 'thickbox',
159
- 'media-upload',
160
- ));
161
- }
162
-
163
- function admin_print_styles()
164
- {
165
- wp_enqueue_style(array(
166
- 'thickbox',
167
- ));
168
- }
169
-
170
-
171
  /*--------------------------------------------------------------------------------------
172
  *
173
  * create_field
139
  }
140
 
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  /*--------------------------------------------------------------------------------------
143
  *
144
  * create_field
core/fields/flexible_content.php CHANGED
@@ -19,7 +19,10 @@ class acf_Flexible_content extends acf_Field
19
 
20
  $this->name = 'flexible_content';
21
  $this->title = __("Flexible Content",'acf');
22
-
 
 
 
23
  }
24
 
25
 
@@ -57,80 +60,102 @@ class acf_Flexible_content extends acf_Field
57
 
58
  <input type="hidden" name="<?php echo $field['name']; ?>[999][acf_fc_layout]" value="<?php echo $layout['name']; ?>" />
59
 
60
- <ul class="hl actions">
61
- <li><a class="order" href="#"></a></li>
62
- <li><a class="delete" href="#"></a></li>
63
- </ul>
64
-
65
- <p class="layout-label"><?php echo $layout['label']; ?></p>
66
 
67
- <table class="widefat">
68
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  <tbody>
70
- <tr><?php
71
-
72
- if($layout['display'] == 'row'):
73
- ?><td><?php
74
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
- if( $layout['sub_fields'] ):
 
 
 
 
 
 
 
 
77
 
78
- $l = 0;
 
79
 
80
- foreach($layout['sub_fields'] as $sub_field):
81
-
82
- $l++;
83
-
84
- if($layout['display'] == 'table'):
85
- ?><td style="width:<?php echo 100/count($layout['sub_fields']); ?>%;"><?php
86
- else:
87
- ?><div class="row-layout-field"><?php
88
- endif;
89
-
90
- ?><p class="label">
91
- <label><?php echo $sub_field['label']; ?></label><?php
92
-
93
- if(!isset($sub_field['instructions']))
94
- $sub_field['instructions'] = "";
95
-
96
- echo $sub_field['instructions'];
97
-
98
- ?></p><?php
99
-
100
- // add value
101
- $sub_field['value'] = isset($sub_field['default_value']) ? $sub_field['default_value'] : false;
102
-
103
- // add name
104
- $sub_field['name'] = $field['name'] . '[999][' . $sub_field['key'] . ']';
105
-
106
- // create field
107
- $this->parent->create_field($sub_field);
108
-
109
-
110
- if($layout['display'] == 'table'):
111
- ?></td><?php
112
- else:
113
- ?></div><?php
114
- endif;
115
 
116
- endforeach;
117
- // foreach($layout['sub_fields'] as $sub_field):
118
-
119
- else:
120
 
121
- if($layout['display'] == 'table'):
122
- ?><td></td><?php
123
- endif;
124
-
125
- endif;
126
- // if( $layout['sub_fields'] ):
127
 
 
 
 
128
 
129
- if($layout['display'] == 'row'):
130
- ?></td><?php
131
- endif;
132
 
133
- ?></tr>
 
 
 
 
 
 
 
 
 
 
 
 
134
  </tbody>
135
 
136
  </table>
@@ -160,81 +185,106 @@ class acf_Flexible_content extends acf_Field
160
 
161
  <input type="hidden" name="<?php echo $field['name'] ?>[<?php echo $i ?>][acf_fc_layout]" value="<?php echo $layout['name']; ?>" />
162
 
163
- <ul class="hl actions">
164
- <li><a class="order" href="#"></a></li>
165
- <li><a class="delete" href="#"></a></li>
166
- </ul>
167
 
168
- <p class="layout-label"><?php echo $layout['label']; ?></p>
169
 
170
- <table class="widefat">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  <tbody>
172
- <tr><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
- if($layout['display'] == 'row'):
175
- ?><td><?php
176
- endif;
177
 
178
- if( $layout['sub_fields'] ):
 
 
 
 
 
 
 
 
179
 
180
- $l = 0;
 
181
 
182
- foreach($layout['sub_fields'] as $sub_field):
183
-
184
- $l++;
185
-
186
- if($layout['display'] == 'table'):
187
- ?><td style="width:<?php echo 100/count($layout['sub_fields']); ?>%;"><?php
188
- else:
189
- ?><div class="row-layout-field"><?php
190
- endif;
191
-
192
- ?><p class="label">
193
- <label><?php echo $sub_field['label']; ?></label><?php
194
-
195
- if(!isset($sub_field['instructions']))
196
- $sub_field['instructions'] = "";
197
-
198
- echo $sub_field['instructions'];
199
-
200
- ?></p><?php
201
-
202
- // add value
203
- $sub_field['value'] = isset($value[$sub_field['name']]) ? $value[$sub_field['name']] : false;
204
-
205
- // add name
206
- $sub_field['name'] = $field['name'] . '[' . $i . '][' . $sub_field['key'] . ']';
207
-
208
- // create field
209
- $this->parent->create_field($sub_field);
210
-
211
-
212
- if($layout['display'] == 'table'):
213
- ?></td><?php
214
- else:
215
- ?></div><?php
216
- endif;
217
 
218
- endforeach;
219
- // foreach($layout['sub_fields'] as $sub_field):
220
-
221
- else:
222
 
223
- if($layout['display'] == 'table'):
224
- ?><td></td><?php
225
- endif;
226
-
227
- endif;
228
- // if( $layout['sub_fields'] ):
229
 
 
 
 
230
 
231
- if($layout['display'] == 'row'):
232
- ?></td><?php
233
- endif;
234
 
235
- ?></tr>
236
- </tbody>
237
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  </div>
239
  <?php
240
 
@@ -296,7 +346,7 @@ class acf_Flexible_content extends acf_Field
296
  $field['layouts'][] = array(
297
  'name' => '',
298
  'label' => '',
299
- 'display' => 'table',
300
  'sub_fields' => array(),
301
  );
302
  }
@@ -305,7 +355,10 @@ class acf_Flexible_content extends acf_Field
305
  // get name of all fields for use in field type
306
  foreach($this->parent->fields as $f)
307
  {
308
- $fields_names[$f->name] = $f->title;
 
 
 
309
  }
310
  unset($fields_names['flexible_content']);
311
 
@@ -359,7 +412,7 @@ class acf_Flexible_content extends acf_Field
359
  ));
360
  ?>
361
  </td>
362
- <td style="padding-right:0;">
363
  <label><?php _e('Display','acf'); ?></label>
364
  <?php
365
  $this->parent->create_field(array(
@@ -367,8 +420,8 @@ class acf_Flexible_content extends acf_Field
367
  'name' => 'fields['.$key.'][layouts][' . $layout_key . '][display]',
368
  'value' => $layout['display'],
369
  'choices' => array(
 
370
  'table' => __("Table",'acf'),
371
- 'row' => __("Row",'acf')
372
  )
373
  ));
374
  ?>
@@ -468,6 +521,47 @@ class acf_Flexible_content extends acf_Field
468
  ?>
469
  </td>
470
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  <?php
472
 
473
  $this->parent->fields[$sub_field['type']]->create_options($key.'][layouts][' . $layout_key . '][sub_fields]['.$sub_field['key'], $sub_field);
@@ -516,31 +610,6 @@ class acf_Flexible_content extends acf_Field
516
  </tr><?php
517
  }
518
 
519
-
520
-
521
- /*--------------------------------------------------------------------------------------
522
- *
523
- * admin_print_scripts / admin_print_styles
524
- *
525
- * @author Elliot Condon
526
- * @since 3.0.0
527
- *
528
- *-------------------------------------------------------------------------------------*/
529
-
530
- function admin_print_scripts()
531
- {
532
- wp_enqueue_script(array(
533
-
534
- 'jquery-ui-sortable',
535
-
536
- ));
537
- }
538
-
539
- function admin_print_styles()
540
- {
541
-
542
- }
543
-
544
 
545
  /*--------------------------------------------------------------------------------------
546
  *
@@ -610,7 +679,7 @@ class acf_Flexible_content extends acf_Field
610
  *
611
  *-------------------------------------------------------------------------------------*/
612
 
613
- function pre_save_field($field)
614
  {
615
 
616
  // format sub_fields
@@ -635,8 +704,9 @@ class acf_Flexible_content extends acf_Field
635
  $f['order_no'] = $i;
636
  $f['key'] = $key;
637
 
638
- // format
639
- $f = $this->parent->pre_save_field( $f );
 
640
 
641
  $layout['sub_fields'][ $key ] = $f;
642
  }
19
 
20
  $this->name = 'flexible_content';
21
  $this->title = __("Flexible Content",'acf');
22
+
23
+
24
+ // filters
25
+ add_filter('acf_save_field-' . $this->name, array($this, 'acf_save_field'));
26
  }
27
 
28
 
60
 
61
  <input type="hidden" name="<?php echo $field['name']; ?>[999][acf_fc_layout]" value="<?php echo $layout['name']; ?>" />
62
 
63
+ <a class="ir fc-delete-layout" href="#"></a>
64
+ <p class="menu-item-handle"><span class="fc-layout-order"><?php echo $i+1; ?></span>. <?php echo $layout['label']; ?></p>
 
 
 
 
65
 
66
+ <table class="widefat acf-input-table <?php if( $layout['display'] == 'row' ): ?>row_layout<?php endif; ?>">
67
+ <?php if( $layout['display'] == 'table' ): ?>
68
+ <thead>
69
+ <tr>
70
+ <?php foreach( $layout['sub_fields'] as $sub_field_i => $sub_field):
71
+
72
+ // add width attr
73
+ $attr = "";
74
+
75
+ if( count($layout['sub_fields']) > 1 && isset($sub_field['column_width']) && $sub_field['column_width'] )
76
+ {
77
+ $attr = 'width="' . $sub_field['column_width'] . '%"';
78
+ }
79
+
80
+ ?>
81
+ <th class="acf-th-<?php echo $sub_field['name']; ?>" <?php echo $attr; ?>>
82
+ <span><?php echo $sub_field['label']; ?></span>
83
+ <?php if( isset($sub_field['instructions']) ): ?>
84
+ <span class="sub-field-instructions"><?php echo $sub_field['instructions']; ?></span>
85
+ <?php endif; ?>
86
+ </th><?php
87
+ endforeach; ?>
88
+ </tr>
89
+ </thead>
90
+ <?php endif; ?>
91
  <tbody>
92
+ <tr>
93
+ <?php
94
+
95
+ // layout: Row
96
+
97
+ if( $layout['display'] == 'row' ): ?>
98
+ <td class="acf_input-wrap">
99
+ <table class="widefat acf_input">
100
+ <?php endif; ?>
101
+
102
+
103
+ <?php
104
+
105
+ // loop though sub fields
106
+
107
+ foreach( $layout['sub_fields'] as $j => $sub_field ): ?>
108
+
109
+ <?php
110
+
111
+ // layout: Row
112
 
113
+ if( $layout['display'] == 'row' ): ?>
114
+ <tr>
115
+ <td class="label">
116
+ <label><?php echo $sub_field['label']; ?></label>
117
+ <?php if( isset($sub_field['instructions']) ): ?>
118
+ <span class="sub-field-instructions"><?php echo $sub_field['instructions']; ?></span>
119
+ <?php endif; ?>
120
+ </td>
121
+ <?php endif; ?>
122
 
123
+ <td>
124
+ <?php
125
 
126
+ // add value
127
+ $sub_field['value'] = isset($sub_field['default_value']) ? $sub_field['default_value'] : false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
+ // add name
130
+ $sub_field['name'] = $field['name'] . '[999][' . $sub_field['key'] . ']';
 
 
131
 
132
+ // create field
133
+ $this->parent->create_field($sub_field);
134
+
135
+ ?>
136
+ </td>
 
137
 
138
+ <?php
139
+
140
+ // layout: Row
141
 
142
+ if( $layout['display'] == 'row' ): ?>
143
+ </tr>
144
+ <?php endif; ?>
145
 
146
+
147
+ <?php endforeach; ?>
148
+
149
+ <?php
150
+
151
+ // layout: Row
152
+
153
+ if( $layout['display'] == 'row' ): ?>
154
+ </table>
155
+ </td>
156
+ <?php endif; ?>
157
+
158
+ </tr>
159
  </tbody>
160
 
161
  </table>
185
 
186
  <input type="hidden" name="<?php echo $field['name'] ?>[<?php echo $i ?>][acf_fc_layout]" value="<?php echo $layout['name']; ?>" />
187
 
188
+ <a class="ir fc-delete-layout" href="#"></a>
189
+ <p class="menu-item-handle"><span class="fc-layout-order"><?php echo $i+1; ?></span>. <?php echo $layout['label']; ?></p>
 
 
190
 
 
191
 
192
+ <table class="widefat acf-input-table <?php if( $layout['display'] == 'row' ): ?>row_layout<?php endif; ?>">
193
+ <?php if( $layout['display'] == 'table' ): ?>
194
+ <thead>
195
+ <tr>
196
+ <?php foreach( $layout['sub_fields'] as $sub_field_i => $sub_field):
197
+
198
+ // add width attr
199
+ $attr = "";
200
+
201
+ if( count($layout['sub_fields']) > 1 && isset($sub_field['column_width']) && $sub_field['column_width'] )
202
+ {
203
+ $attr = 'width="' . $sub_field['column_width'] . '%"';
204
+ }
205
+
206
+ ?>
207
+ <th class="acf-th-<?php echo $sub_field['name']; ?>" <?php echo $attr; ?>>
208
+ <span><?php echo $sub_field['label']; ?></span>
209
+ <?php if( isset($sub_field['instructions']) ): ?>
210
+ <span class="sub-field-instructions"><?php echo $sub_field['instructions']; ?></span>
211
+ <?php endif; ?>
212
+ </th><?php
213
+ endforeach; ?>
214
+ </tr>
215
+ </thead>
216
+ <?php endif; ?>
217
  <tbody>
218
+ <tr>
219
+ <?php
220
+
221
+ // layout: Row
222
+
223
+ if( $layout['display'] == 'row' ): ?>
224
+ <td class="acf_input-wrap">
225
+ <table class="widefat acf_input">
226
+ <?php endif; ?>
227
+
228
+
229
+ <?php
230
+
231
+ // loop though sub fields
232
+
233
+ foreach( $layout['sub_fields'] as $j => $sub_field ): ?>
234
 
235
+ <?php
236
+
237
+ // layout: Row
238
 
239
+ if( $layout['display'] == 'row' ): ?>
240
+ <tr>
241
+ <td class="label">
242
+ <label><?php echo $sub_field['label']; ?></label>
243
+ <?php if( isset($sub_field['instructions']) ): ?>
244
+ <span class="sub-field-instructions"><?php echo $sub_field['instructions']; ?></span>
245
+ <?php endif; ?>
246
+ </td>
247
+ <?php endif; ?>
248
 
249
+ <td>
250
+ <?php
251
 
252
+ // add value
253
+ $sub_field['value'] = isset($value[$sub_field['name']]) ? $value[$sub_field['name']] : false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
+ // add name
256
+ $sub_field['name'] = $field['name'] . '[' . $i . '][' . $sub_field['key'] . ']';
 
 
257
 
258
+ // create field
259
+ $this->parent->create_field($sub_field);
260
+
261
+ ?>
262
+ </td>
 
263
 
264
+ <?php
265
+
266
+ // layout: Row
267
 
268
+ if( $layout['display'] == 'row' ): ?>
269
+ </tr>
270
+ <?php endif; ?>
271
 
272
+
273
+ <?php endforeach; ?>
274
+
275
+ <?php
276
+
277
+ // layout: Row
278
+
279
+ if( $layout['display'] == 'row' ): ?>
280
+ </table>
281
+ </td>
282
+ <?php endif; ?>
283
+
284
+ </tr>
285
+ </tbody>
286
+
287
+ </table>
288
  </div>
289
  <?php
290
 
346
  $field['layouts'][] = array(
347
  'name' => '',
348
  'label' => '',
349
+ 'display' => 'row',
350
  'sub_fields' => array(),
351
  );
352
  }
355
  // get name of all fields for use in field type
356
  foreach($this->parent->fields as $f)
357
  {
358
+ if( $f->name )
359
+ {
360
+ $fields_names[$f->name] = $f->title;
361
+ }
362
  }
363
  unset($fields_names['flexible_content']);
364
 
412
  ));
413
  ?>
414
  </td>
415
+ <td class="acf_fc_display" style="padding-right:0;">
416
  <label><?php _e('Display','acf'); ?></label>
417
  <?php
418
  $this->parent->create_field(array(
420
  'name' => 'fields['.$key.'][layouts][' . $layout_key . '][display]',
421
  'value' => $layout['display'],
422
  'choices' => array(
423
+ 'row' => __("Row",'acf'),
424
  'table' => __("Table",'acf'),
 
425
  )
426
  ));
427
  ?>
521
  ?>
522
  </td>
523
  </tr>
524
+ <tr class="field_instructions">
525
+ <td class="label"><label><?php _e("Field Instructions",'acf'); ?></label></td>
526
+ <td>
527
+ <?php
528
+
529
+ if( !isset($sub_field['instructions']) )
530
+ {
531
+ $sub_field['instructions'] = "";
532
+ }
533
+
534
+ $this->parent->create_field(array(
535
+ 'type' => 'text',
536
+ 'name' => 'fields['.$key.'][layouts][' . $layout_key . '][sub_fields]['.$sub_field['key'].'][instructions]',
537
+ 'value' => $sub_field['instructions'],
538
+ 'class' => 'instructions',
539
+ ));
540
+ ?>
541
+ </td>
542
+ </tr>
543
+ <tr class="field_column_width">
544
+ <td class="label">
545
+ <label><?php _e("Column Width",'acf'); ?></label>
546
+ <p class="description"><?php _e("Leave blank for auto",'acf'); ?></p>
547
+ </td>
548
+ <td>
549
+ <?php
550
+
551
+ if( !isset($sub_field['column_width']) )
552
+ {
553
+ $sub_field['column_width'] = "";
554
+ }
555
+
556
+ $this->parent->create_field(array(
557
+ 'type' => 'number',
558
+ 'name' => 'fields['.$key.'][layouts][' . $layout_key . '][sub_fields]['.$sub_field['key'].'][column_width]',
559
+ 'value' => $sub_field['column_width'],
560
+ 'class' => 'column_width',
561
+ ));
562
+ ?> %
563
+ </td>
564
+ </tr>
565
  <?php
566
 
567
  $this->parent->fields[$sub_field['type']]->create_options($key.'][layouts][' . $layout_key . '][sub_fields]['.$sub_field['key'], $sub_field);
610
  </tr><?php
611
  }
612
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
 
614
  /*--------------------------------------------------------------------------------------
615
  *
679
  *
680
  *-------------------------------------------------------------------------------------*/
681
 
682
+ function acf_save_field( $field )
683
  {
684
 
685
  // format sub_fields
704
  $f['order_no'] = $i;
705
  $f['key'] = $key;
706
 
707
+ // apply filters
708
+ $f = apply_filters('acf_save_field', $f );
709
+ $f = apply_filters('acf_save_field-' . $f['type'], $f );
710
 
711
  $layout['sub_fields'][ $key ] = $f;
712
  }
core/fields/image.php CHANGED
@@ -118,35 +118,6 @@ class acf_Image extends acf_Field
118
  return($vars);
119
  }
120
 
121
-
122
- /*--------------------------------------------------------------------------------------
123
- *
124
- * admin_print_scripts / admin_print_styles
125
- *
126
- * @author Elliot Condon
127
- * @since 3.0.0
128
- *
129
- *-------------------------------------------------------------------------------------*/
130
-
131
- function admin_print_scripts()
132
- {
133
- wp_enqueue_script(array(
134
- 'jquery',
135
- 'jquery-ui-core',
136
- 'jquery-ui-tabs',
137
-
138
- 'thickbox',
139
- 'media-upload',
140
- ));
141
- }
142
-
143
- function admin_print_styles()
144
- {
145
- wp_enqueue_style(array(
146
- 'thickbox',
147
- ));
148
- }
149
-
150
 
151
  /*--------------------------------------------------------------------------------------
152
  *
118
  return($vars);
119
  }
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
  /*--------------------------------------------------------------------------------------
123
  *
core/fields/radio.php CHANGED
@@ -122,7 +122,14 @@ class acf_Radio extends acf_Field
122
  </p>
123
  </td>
124
  <td>
125
- <textarea class="texarea field_option-choices" rows="5" name="fields[<?php echo $key; ?>][choices]" id=""><?php echo $field['choices']; ?></textarea>
 
 
 
 
 
 
 
126
  </td>
127
  </tr>
128
  <tr class="field_option field_option_<?php echo $this->name; ?>">
@@ -158,63 +165,11 @@ class acf_Radio extends acf_Field
158
  ?>
159
  </td>
160
  </tr>
161
-
162
-
163
  <?php
164
  }
165
 
166
 
167
- /*--------------------------------------------------------------------------------------
168
- *
169
- * pre_save_field
170
- * - called just before saving the field to the database.
171
- *
172
- * @author Elliot Condon
173
- * @since 2.2.0
174
- *
175
- *-------------------------------------------------------------------------------------*/
176
 
177
- function pre_save_field($field)
178
- {
179
- // defaults
180
- $field['choices'] = isset($field['choices']) ? $field['choices'] : '';
181
-
182
- // vars
183
- $new_choices = array();
184
-
185
- // explode choices from each line
186
- if(strpos($field['choices'], "\n") !== false)
187
- {
188
- // found multiple lines, explode it
189
- $field['choices'] = explode("\n", $field['choices']);
190
- }
191
- else
192
- {
193
- // no multiple lines!
194
- $field['choices'] = array($field['choices']);
195
- }
196
-
197
- // key => value
198
- foreach($field['choices'] as $choice)
199
- {
200
- if(strpos($choice, ' : ') !== false)
201
- {
202
- $choice = explode(' : ', $choice);
203
- $new_choices[trim($choice[0])] = trim($choice[1]);
204
- }
205
- else
206
- {
207
- $new_choices[trim($choice)] = trim($choice);
208
- }
209
- }
210
-
211
- // update choices
212
- $field['choices'] = $new_choices;
213
-
214
- // return updated field
215
- return $field;
216
-
217
- }
218
  }
219
 
220
  ?>
122
  </p>
123
  </td>
124
  <td>
125
+ <?php
126
+ $this->parent->create_field(array(
127
+ 'type' => 'textarea',
128
+ 'class' => 'textarea field_option-choices',
129
+ 'name' => 'fields['.$key.'][choices]',
130
+ 'value' => $field['choices'],
131
+ ));
132
+ ?>
133
  </td>
134
  </tr>
135
  <tr class="field_option field_option_<?php echo $this->name; ?>">
165
  ?>
166
  </td>
167
  </tr>
 
 
168
  <?php
169
  }
170
 
171
 
 
 
 
 
 
 
 
 
 
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
 
175
  ?>
core/fields/relationship.php CHANGED
@@ -20,7 +20,10 @@ class acf_Relationship extends acf_Field
20
  $this->name = 'relationship';
21
  $this->title = __("Relationship",'acf');
22
 
 
 
23
  add_action('wp_ajax_acf_get_relationship_results', array($this, 'acf_get_relationship_results'));
 
24
  }
25
 
26
 
@@ -30,6 +33,7 @@ class acf_Relationship extends acf_Field
30
  * @description:
31
  * @created: 3/09/12
32
  */
 
33
  function posts_where( $where, &$wp_query )
34
  {
35
  global $wpdb;
@@ -200,28 +204,6 @@ class acf_Relationship extends acf_Field
200
  }
201
 
202
  }
203
-
204
-
205
- /*--------------------------------------------------------------------------------------
206
- *
207
- * admin_print_scripts / admin_print_styles
208
- *
209
- * @author Elliot Condon
210
- * @since 3.0.0
211
- *
212
- *-------------------------------------------------------------------------------------*/
213
-
214
- function admin_print_scripts()
215
- {
216
- wp_enqueue_script(array(
217
- 'jquery-ui-sortable',
218
- ));
219
- }
220
-
221
- function admin_print_styles()
222
- {
223
-
224
- }
225
 
226
 
227
  /*--------------------------------------------------------------------------------------
20
  $this->name = 'relationship';
21
  $this->title = __("Relationship",'acf');
22
 
23
+
24
+ // actions
25
  add_action('wp_ajax_acf_get_relationship_results', array($this, 'acf_get_relationship_results'));
26
+
27
  }
28
 
29
 
33
  * @description:
34
  * @created: 3/09/12
35
  */
36
+
37
  function posts_where( $where, &$wp_query )
38
  {
39
  global $wpdb;
204
  }
205
 
206
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
 
209
  /*--------------------------------------------------------------------------------------
core/fields/repeater.php CHANGED
@@ -20,29 +20,11 @@ class acf_Repeater extends acf_Field
20
  $this->name = 'repeater';
21
  $this->title = __("Repeater",'acf');
22
 
 
 
 
23
  }
24
 
25
-
26
- /*--------------------------------------------------------------------------------------
27
- *
28
- * admin_print_scripts / admin_print_styles
29
- *
30
- * @author Elliot Condon
31
- * @since 3.0.0
32
- *
33
- *-------------------------------------------------------------------------------------*/
34
-
35
- function admin_print_scripts()
36
- {
37
- wp_enqueue_script(array(
38
- 'jquery-ui-sortable',
39
- ));
40
- }
41
-
42
- function admin_print_styles()
43
- {
44
-
45
- }
46
 
47
 
48
  /*--------------------------------------------------------------------------------------
@@ -75,13 +57,21 @@ class acf_Repeater extends acf_Field
75
  $field['row_min'] = (int) $field['row_min'];
76
 
77
 
 
 
 
 
 
 
 
78
  // row limit = 0?
79
- if( $field['row_limit'] == 0 )
80
  {
81
  $field['row_limit'] = 999;
82
  }
83
 
84
 
 
85
  // min rows
86
  if( $field['row_min'] > count($field['value']) )
87
  {
@@ -93,7 +83,7 @@ class acf_Repeater extends acf_Field
93
  }
94
  }
95
  }
96
-
97
 
98
  // max rows
99
  if( $field['row_limit'] < count($field['value']) )
@@ -106,7 +96,7 @@ class acf_Repeater extends acf_Field
106
  }
107
  }
108
  }
109
-
110
 
111
  // setup values for row clone
112
  $field['value'][999] = array();
@@ -117,9 +107,10 @@ class acf_Repeater extends acf_Field
117
  }
118
 
119
 
 
120
  ?>
121
  <div class="repeater" data-min_rows="<?php echo $field['row_min']; ?>" data-max_rows="<?php echo $field['row_limit']; ?>">
122
- <table class="widefat <?php if( $field['layout'] == 'row' ): ?>row_layout<?php endif; ?>">
123
  <?php if( $field['layout'] == 'table' ): ?>
124
  <thead>
125
  <tr>
@@ -311,11 +302,14 @@ class acf_Repeater extends acf_Field
311
  // get name of all fields for use in field type
312
  foreach($this->parent->fields as $f)
313
  {
314
- $fields_names[$f->name] = $f->title;
 
 
 
315
  }
316
 
317
  ?>
318
- <tr class="field_option field_option_<?php echo $this->name; ?>">
319
  <td class="label">
320
  <label><?php _e("Repeater Fields",'acf'); ?></label>
321
  </td>
@@ -515,7 +509,7 @@ class acf_Repeater extends acf_Field
515
  ?>
516
  </td>
517
  </tr>
518
- <tr class="field_option field_option_<?php echo $this->name; ?>">
519
  <td class="label">
520
  <label><?php _e("Layout",'acf'); ?></label>
521
  </td>
@@ -562,7 +556,7 @@ class acf_Repeater extends acf_Field
562
  *
563
  *-------------------------------------------------------------------------------------*/
564
 
565
- function pre_save_field($field)
566
  {
567
  // format sub_fields
568
  if( $field['sub_fields'] )
@@ -581,8 +575,9 @@ class acf_Repeater extends acf_Field
581
  $f['order_no'] = $i;
582
  $f['key'] = $key;
583
 
584
- // format
585
- $f = $this->parent->pre_save_field($f);
 
586
 
587
  $field['sub_fields'][ $key ] = $f;
588
  }
20
  $this->name = 'repeater';
21
  $this->title = __("Repeater",'acf');
22
 
23
+
24
+ // filters
25
+ add_filter('acf_save_field-' . $this->name, array($this, 'acf_save_field'));
26
  }
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
 
30
  /*--------------------------------------------------------------------------------------
57
  $field['row_min'] = (int) $field['row_min'];
58
 
59
 
60
+ // value may be false
61
+ if( !$field['value'] )
62
+ {
63
+ $field['value'] = array();
64
+ }
65
+
66
+
67
  // row limit = 0?
68
+ if( $field['row_limit'] < 1 )
69
  {
70
  $field['row_limit'] = 999;
71
  }
72
 
73
 
74
+
75
  // min rows
76
  if( $field['row_min'] > count($field['value']) )
77
  {
83
  }
84
  }
85
  }
86
+
87
 
88
  // max rows
89
  if( $field['row_limit'] < count($field['value']) )
96
  }
97
  }
98
  }
99
+
100
 
101
  // setup values for row clone
102
  $field['value'][999] = array();
107
  }
108
 
109
 
110
+
111
  ?>
112
  <div class="repeater" data-min_rows="<?php echo $field['row_min']; ?>" data-max_rows="<?php echo $field['row_limit']; ?>">
113
+ <table class="widefat acf-input-table <?php if( $field['layout'] == 'row' ): ?>row_layout<?php endif; ?>">
114
  <?php if( $field['layout'] == 'table' ): ?>
115
  <thead>
116
  <tr>
302
  // get name of all fields for use in field type
303
  foreach($this->parent->fields as $f)
304
  {
305
+ if( $f->name )
306
+ {
307
+ $fields_names[$f->name] = $f->title;
308
+ }
309
  }
310
 
311
  ?>
312
+ <tr class="field_option field_option_<?php echo $this->name; ?> field_option_<?php echo $this->name; ?>_fields">
313
  <td class="label">
314
  <label><?php _e("Repeater Fields",'acf'); ?></label>
315
  </td>
509
  ?>
510
  </td>
511
  </tr>
512
+ <tr class="field_option field_option_<?php echo $this->name; ?> field_option_<?php echo $this->name; ?>_layout">
513
  <td class="label">
514
  <label><?php _e("Layout",'acf'); ?></label>
515
  </td>
556
  *
557
  *-------------------------------------------------------------------------------------*/
558
 
559
+ function acf_save_field($field)
560
  {
561
  // format sub_fields
562
  if( $field['sub_fields'] )
575
  $f['order_no'] = $i;
576
  $f['key'] = $key;
577
 
578
+ // apply filters
579
+ $f = apply_filters('acf_save_field', $f );
580
+ $f = apply_filters('acf_save_field-' . $f['type'], $f );
581
 
582
  $field['sub_fields'][ $key ] = $f;
583
  }
core/fields/select.php CHANGED
@@ -20,6 +20,11 @@ class acf_Select extends acf_Field
20
  $this->name = 'select';
21
  $this->title = __("Select",'acf');
22
 
 
 
 
 
 
23
  }
24
 
25
 
@@ -182,7 +187,14 @@ class acf_Select extends acf_Field
182
  </p>
183
  </td>
184
  <td>
185
- <textarea class="texarea field_option-choices" rows="5" name="fields[<?php echo $key; ?>][choices]" id=""><?php echo $field['choices']; ?></textarea>
 
 
 
 
 
 
 
186
  </td>
187
  </tr>
188
  <tr class="field_option field_option_<?php echo $this->name; ?>">
@@ -252,7 +264,7 @@ class acf_Select extends acf_Field
252
  *
253
  *-------------------------------------------------------------------------------------*/
254
 
255
- function pre_save_field($field)
256
  {
257
  // vars
258
  $defaults = array(
@@ -276,6 +288,9 @@ class acf_Select extends acf_Field
276
  // explode choices from each line
277
  if( $field['choices'] )
278
  {
 
 
 
279
  if(strpos($field['choices'], "\n") !== false)
280
  {
281
  // found multiple lines, explode it
20
  $this->name = 'select';
21
  $this->title = __("Select",'acf');
22
 
23
+
24
+ // filters (for all fields with choices)
25
+ add_filter('acf_save_field-select', array($this, 'acf_save_field'));
26
+ add_filter('acf_save_field-checkbox', array($this, 'acf_save_field'));
27
+ add_filter('acf_save_field-radio', array($this, 'acf_save_field'));
28
  }
29
 
30
 
187
  </p>
188
  </td>
189
  <td>
190
+ <?php
191
+ $this->parent->create_field(array(
192
+ 'type' => 'textarea',
193
+ 'class' => 'textarea field_option-choices',
194
+ 'name' => 'fields['.$key.'][choices]',
195
+ 'value' => $field['choices'],
196
+ ));
197
+ ?>
198
  </td>
199
  </tr>
200
  <tr class="field_option field_option_<?php echo $this->name; ?>">
264
  *
265
  *-------------------------------------------------------------------------------------*/
266
 
267
+ function acf_save_field( $field )
268
  {
269
  // vars
270
  $defaults = array(
288
  // explode choices from each line
289
  if( $field['choices'] )
290
  {
291
+ // stripslashes ("")
292
+ $field['choices'] = stripslashes_deep($field['choices']);
293
+
294
  if(strpos($field['choices'], "\n") !== false)
295
  {
296
  // found multiple lines, explode it
core/views/meta_box_fields.php CHANGED
@@ -38,9 +38,12 @@ $fields[] = array(
38
 
39
 
40
  // get name of all fields for use in field type drop down
41
- foreach( $this->parent->fields as $field )
42
  {
43
- $fields_names[$field->name] = $field->title;
 
 
 
44
  }
45
 
46
  ?>
38
 
39
 
40
  // get name of all fields for use in field type drop down
41
+ foreach($this->parent->fields as $f)
42
  {
43
+ if( $f->name )
44
+ {
45
+ $fields_names[$f->name] = $f->title;
46
+ }
47
  }
48
 
49
  ?>
core/views/meta_box_location.php CHANGED
@@ -48,17 +48,17 @@ if( empty($location['rules']) )
48
  'post_type' => __("Post Type",'acf'),
49
  'user_type' => __("Logged in User Type",'acf'),
50
  ),
51
- __("Page Specific",'acf') => array(
52
  'page' => __("Page",'acf'),
53
- 'page_type' => __("Page Type",'acf'),
54
- 'page_parent' => __("Page Parent",'acf'),
55
- 'page_template' => __("Page Template",'acf'),
56
  ),
57
- __("Post Specific",'acf') => array(
58
  'post' => __("Post",'acf'),
59
- 'post_category' => __("Post Category",'acf'),
60
- 'post_format' => __("Post Format",'acf'),
61
- 'taxonomy' => __("Post Taxonomy",'acf'),
62
  ),
63
  __("Other",'acf') => array(
64
  'ef_taxonomy' => __("Taxonomy (Add / Edit)",'acf'),
48
  'post_type' => __("Post Type",'acf'),
49
  'user_type' => __("Logged in User Type",'acf'),
50
  ),
51
+ __("Page",'acf') => array(
52
  'page' => __("Page",'acf'),
53
+ 'page_type' => __("Type",'acf'),
54
+ 'page_parent' => __("Parent",'acf'),
55
+ 'page_template' => __("Template",'acf'),
56
  ),
57
+ __("Post",'acf') => array(
58
  'post' => __("Post",'acf'),
59
+ 'post_category' => __("Category",'acf'),
60
+ 'post_format' => __("Format",'acf'),
61
+ 'taxonomy' => __("Taxonomy",'acf'),
62
  ),
63
  __("Other",'acf') => array(
64
  'ef_taxonomy' => __("Taxonomy (Add / Edit)",'acf'),
css/fields.css CHANGED
@@ -238,22 +238,21 @@ table.widefat.acf td {
238
  background: #F9F9F9;
239
  }
240
 
241
- #acf_fields .field.ui-sortable-helper {
242
-
243
- }
244
- #acf_fields .field.ui-sortable-helper {
245
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
246
  }
247
 
248
- #acf_fields .field.ui-sortable-placeholder {
249
- background: #f5f5f5;
250
- box-shadow: inset 0 0px 3px rgba(0,0,0,0.1);
251
- visibility: visible !important;
252
- border: #dfdfdf solid 1px;
253
- border-top: 0 none;
254
- border-bottom: 0 none;
255
  }
256
 
 
 
 
 
 
257
 
258
  .fields .field:nth-child(even) {
259
  background: #FCFCFC;
@@ -271,6 +270,11 @@ table.widefat.acf td {
271
  border-bottom: 0 none;
272
  }
273
 
 
 
 
 
 
274
 
275
 
276
  /*---------------------------------------------------------------------------------------------
@@ -379,6 +383,10 @@ table.acf_input tr td .acf tr td {
379
  width: 50%;
380
  }
381
 
 
 
 
 
382
  /*---------------------------------------------------------------------------------------------
383
  Field Form
384
  ---------------------------------------------------------------------------------------------*/
@@ -577,9 +585,8 @@ table.acf_input table.acf_cf_meta select {
577
  cursor: move;
578
  }
579
 
580
- .ui-state-highlight {
581
- height: 40px;
582
- }
583
 
584
 
585
  /*---------------------------------------------------------------------------------------------
238
  background: #F9F9F9;
239
  }
240
 
241
+
242
+ #acf_fields .ui-sortable-helper {
243
+ box-shadow: 0 1px 5px rgba(0,0,0,0.2);
244
+ background: #fff;
 
245
  }
246
 
247
+ #acf_fields .ui-sortable-placeholder {
248
+ visibility: visible !important;
 
 
 
 
 
249
  }
250
 
251
+ #acf_fields .ui-sortable-placeholder td {
252
+ border: 0 none !important;
253
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
254
+ background: rgba(0,0,0,0.075);
255
+ }
256
 
257
  .fields .field:nth-child(even) {
258
  background: #FCFCFC;
270
  border-bottom: 0 none;
271
  }
272
 
273
+ .fields .field.ui-sortable-placeholder {
274
+ border: 0 none !important;
275
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
276
+ background: rgba(0,0,0,0.075);
277
+ }
278
 
279
 
280
  /*---------------------------------------------------------------------------------------------
383
  width: 50%;
384
  }
385
 
386
+ .repeater.layout-row > .fields > .field > .field_form_mask > .field_form > .widefat > tbody > tr.field_column_width {
387
+ display: none;
388
+ }
389
+
390
  /*---------------------------------------------------------------------------------------------
391
  Field Form
392
  ---------------------------------------------------------------------------------------------*/
585
  cursor: move;
586
  }
587
 
588
+
589
+
 
590
 
591
 
592
  /*---------------------------------------------------------------------------------------------
css/input.css CHANGED
@@ -1,7 +1,8 @@
1
  /*---------------------------------------------------------------------------------------------
2
- Post Box
3
- ---------------------------------------------------------------------------------------------*/
4
-
 
5
 
6
  #poststuff .acf_postbox {
7
  display: block;
@@ -22,12 +23,26 @@
22
  padding: 0;
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- /* Field */
27
  #poststuff .acf_postbox .field {
28
  position: relative;
29
  padding: 15px 10px;
30
- border-top: 1px solid #fff;
31
  border-bottom: #e8e8e8 solid 1px;
32
  }
33
 
@@ -38,7 +53,8 @@
38
  #poststuff .acf_postbox.no_box .field {
39
  border-top: 0 none;
40
  border-bottom: 0 none;
41
- padding: 15px 0;
 
42
  }
43
 
44
 
@@ -68,7 +84,7 @@
68
  }
69
 
70
 
71
-
72
  #poststuff .acf_postbox p.label {
73
  font-size: 11px;
74
  line-height: 1.1em;
@@ -97,22 +113,11 @@
97
  }
98
 
99
 
100
- /* no box style */
101
- #poststuff .acf_postbox.no_box {
102
- border: 0 none;
103
- background: transparent;
104
- }
105
-
106
- #poststuff .acf_postbox.no_box > h3,
107
- #poststuff .acf_postbox.no_box > .handlediv {
108
- display: none;
109
- }
110
-
111
-
112
-
113
  /*---------------------------------------------------------------------------------------------
114
- Basic Field Styles
115
- ---------------------------------------------------------------------------------------------*/
 
 
116
 
117
  .acf_postbox .field input[type="text"],
118
  .acf_postbox .field input[type="number"],
@@ -134,36 +139,42 @@
134
  resize: none;
135
  }
136
 
137
-
138
- #poststuff .acf_postbox .field select optgroup {
139
  padding: 5px;
140
  background: #fff;
141
  border-top: #DFDFDF solid 1px;
142
  }
143
 
144
- #poststuff .acf_postbox .field select option {
145
  padding: 3px;
146
  }
147
 
148
- #poststuff .acf_postbox .field select optgroup option {
149
  padding-left: 6px;
150
  }
151
 
152
- #poststuff .acf_postbox .field select optgroup:nth-child(2n) {
153
  background: #F9F9F9;
154
  }
155
 
156
- #poststuff .acf_postbox .field select[multiple] {
157
  padding: 0;
158
  }
159
 
160
- #poststuff .acf_postbox .field select[multiple] > optgroup:first-child {
161
  border-top: 0 none;
162
  }
163
 
 
164
  /*---------------------------------------------------------------------------------------------
165
- Field: WYSIWYG
166
- ---------------------------------------------------------------------------------------------*/
 
 
 
 
 
 
167
 
168
  .acf_wysiwyg .wp_themeSkin table.mceToolbarRow1 {
169
  margin-top: 2px !important;
@@ -177,10 +188,6 @@
177
  top: -2px !important;
178
  }
179
 
180
- /*.acf_wysiwyg .editor-toolbar {
181
- display: none;
182
- }*/
183
-
184
  .acf_wysiwyg .wp-editor-container {
185
  background: #fff;
186
  border-color: #CCCCCC #CCCCCC #DFDFDF;
@@ -192,11 +199,10 @@
192
 
193
  /*---------------------------------------------------------------------------------------------
194
  *
195
- * Image Upload
196
  *
197
  *---------------------------------------------------------------------------------------------*/
198
 
199
-
200
  .acf-image-uploader {
201
  position: relative;
202
  }
@@ -300,8 +306,11 @@
300
 
301
 
302
  /*---------------------------------------------------------------------------------------------
303
- File Upload
304
- ---------------------------------------------------------------------------------------------*/
 
 
 
305
  .acf-file-uploader {
306
  position: relative;
307
  line-height: 1.5em;
@@ -331,59 +340,103 @@
331
  width: auto;
332
  }
333
 
 
334
  /*---------------------------------------------------------------------------------------------
335
- Repeater
336
- ---------------------------------------------------------------------------------------------*/
337
- .repeater {
338
-
339
-
 
 
340
  }
341
 
342
- .repeater > table {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  border-radius: 0 0 0 0;
344
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
345
  }
346
 
347
- .repeater > table > tbody > tr > td {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  background: transparent;
349
  border: 0 none;
 
 
350
  border-right: 1px solid #ededed;
 
 
 
 
 
 
 
 
 
351
  border-top: 1px solid #ededed;
352
- padding: 8px !important;
 
 
353
  position: relative;
354
  }
355
 
356
- .repeater > table.row_layout > tbody > tr > td {
357
  border-top-color: #DFDFDF;
358
  }
359
 
360
- .repeater > table > tbody > tr:first-child > td {
361
  border-top: 0 none;
362
  }
363
 
364
- .repeater > table > tbody > tr > td:last-child {
365
  border-right: 0 none;
366
  }
367
 
368
- .repeater > table > tbody > tr:nth-child(even) {
369
- background: #fff;
370
- }
371
-
372
- .repeater > table > tbody > tr:nth-child(odd) {
373
- background: #FCFCFC;
374
- }
375
-
376
- .repeater > table > thead > tr > th {
377
- vertical-align: top;
378
- border-right: 1px solid #e1e1e1;
379
- }
380
 
381
- .repeater > table > thead > tr > th:last-child {
382
- border-right: 0 none;
383
- }
 
 
384
 
385
- .repeater > table > tbody > tr:hover > td.remove > a.remove-row,
386
- .repeater > table > tbody > tr:hover > td.remove > a.add-row {
387
 
388
  -webkit-transition-delay:0s;
389
  -moz-transition-delay:0s;
@@ -394,13 +447,10 @@
394
  opacity: 1;
395
  }
396
 
397
- .repeater.disabled > table > tbody > tr:hover > td.remove > a.add-row {
398
  visibility: hidden !important;
399
  }
400
 
401
- .repeater > table.row_layout > tbody > tr > td > label:first-child {
402
- padding-top: 0;
403
- }
404
 
405
  a.add-row {
406
  display: block;
@@ -453,16 +503,24 @@ a.remove-row:hover {
453
  vertical-align: middle;
454
  color: #aaa;
455
  text-shadow: #fff 0 1px 0;
 
 
 
 
456
  }
457
 
458
- .repeater table tr td.order {
459
- cursor: move;
460
- background: #f4f4f4;
461
- border-top-color: #e8e8e8;
462
  border-right-color: #E1E1E1;
 
463
  }
464
 
465
- .repeater table tr td.order:hover {
 
 
 
 
 
 
466
  color: #666;
467
  }
468
 
@@ -472,68 +530,22 @@ a.remove-row:hover {
472
  vertical-align: middle;
473
  }
474
 
475
- .repeater > table td.order a.order_up {
476
- display: block;
477
- width: 16px;
478
- height: 16px;
479
- background: green;
480
- margin: 0 auto;
481
- }
482
-
483
- .repeater > table td.order a.order_down {
484
- display: block;
485
- width: 16px;
486
- height: 16px;
487
- background: red;
488
- margin: 0 auto;
489
- }
490
-
491
 
 
492
  .repeater table tr td select {
493
  width: 120px;
494
  margin: 0;
495
  }
 
496
 
497
  .repeater .repeater-footer {
498
  margin: 8px 0;
499
  }
500
 
501
- #acf_input .wp_themeSkin tr.mceFirst td.mceToolbar {
502
-
503
- }
504
-
505
- #poststuff #acf_input .wp_themeSkin .mceStatusbar {
506
-
507
- }
508
-
509
- #wpcontent select[multiple] {
510
- height: auto;
511
- }
512
-
513
- #wpcontent select optgroup {
514
- padding: 0 2px
515
- }
516
-
517
- #wpcontent select optgroup option {
518
- padding-left: 6px;
519
- }
520
-
521
- ul.checkbox_list {
522
- background: transparent !important;
523
- }
524
-
525
  .repeater tr.row-clone {
526
  display: none;
527
  }
528
 
529
- .repeater td .row-layout-field {
530
- padding: 30px 0 0;
531
- }
532
-
533
- .repeater td .row-layout-field:first-child {
534
- padding-top: 10px;
535
- }
536
-
537
  .repeater > table > tbody > tr.ui-sortable-helper {
538
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
539
  }
@@ -554,13 +566,15 @@ ul.checkbox_list {
554
  border-bottom: 0 none;
555
  }
556
 
557
- .repeater > table > tbody > tr > td.acf_input-wrap {
558
  padding: 0 !important;;
559
  }
560
 
 
561
  .repeater > table > tbody > tr > td.acf_input-wrap .acf_input {
562
  width: 100%;
563
  }
 
564
 
565
  .sub-field-instructions {
566
  color: #999999;
@@ -568,18 +582,14 @@ ul.checkbox_list {
568
  font-family: sans-serif;
569
  font-size: 12px;
570
  text-shadow: 0 1px 0 #FFFFFF;
 
 
571
  }
572
 
573
 
574
-
575
- /*---------------------------------------------------------------------------------------------
576
- In Box
577
- ---------------------------------------------------------------------------------------------*/
578
-
579
-
580
  /*---------------------------------------------------------------------------------------------
581
  *
582
- * Relationship
583
  *
584
  *---------------------------------------------------------------------------------------------*/
585
 
@@ -750,98 +760,56 @@ ul.checkbox_list {
750
 
751
 
752
  /*---------------------------------------------------------------------------------------------
753
- Flexible Content
754
- ---------------------------------------------------------------------------------------------*/
 
 
 
755
  .acf_flexible_content {
756
-
757
  }
758
 
759
  .acf_flexible_content .layout {
760
- margin: 20px 0 30px;
761
  position: relative;
 
 
 
 
762
  }
763
 
764
- .acf_flexible_content .layout .layout-label {
765
- font-size: 12px;
766
- line-height: 1em;
767
- font-weight: bold;
768
- color: #999999;
769
- text-shadow: #fff 0 1px 0;
770
- margin: 0 0 0.75em;
771
- padding: 0;
772
- }
773
-
774
- .acf_flexible_content .layout .actions {
775
- position: absolute;
776
- top: 7px;
777
- right: 5px;
778
- float: left;
779
- background: #ffffff;
780
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea'); /* for IE */
781
- background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eaeaea)); /* for webkit browsers */
782
- background: -moz-linear-gradient(top, #ffffff, #eaeaea); /* for firefox 3.6+ */
783
-
784
- box-shadow: rgba(0,0,0,0.1) 0 1px 3px;
785
- border-radius: 3px;
786
- border: #d4d4d4 solid 1px;
787
-
788
- z-index: 1;
789
-
790
- visibility: hidden;
791
- opacity: 0;
792
-
793
- -webkit-transition: right 0.25s 0s ease-in-out, opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
794
- -moz-transition: right 0.25s 0s ease-in-out, opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
795
- -o-transition: right 0.25s 0s ease-in-out, opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
796
- transition: right 0.25s 0s ease-in-out, opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
797
-
798
-
799
  }
800
 
801
- .acf_flexible_content .layout:hover .actions {
802
-
803
- visibility: visible;
804
- opacity: 1;
805
- right: 10px;
 
806
 
807
- -webkit-transition-delay:0s;
808
- -moz-transition-delay:0s;
809
- -o-transition-delay:0s;
810
- transition-delay:0s;
811
  }
812
 
813
- .acf_flexible_content .layout .actions .order,
814
- .acf_flexible_content .layout .actions .delete {
815
  width: 30px;
816
  height: 25px;
817
- display: block;
818
- background: url(../images/sprite.png) 0px -100px no-repeat;
819
- }
820
- .acf_flexible_content .layout .actions .order:hover { background-position: 0px -150px; }
821
- .acf_flexible_content .layout .actions .delete { background-position: -50px -100px; }
822
- .acf_flexible_content .layout .actions .delete:hover { background-position: -50px -150px; }
823
-
824
-
825
-
826
-
827
- .acf_flexible_content table.widefat > tbody > tr > td {
828
- padding: 15px 10px;
829
- position: relative;
830
-
831
- border-left: #fff solid 1px;
832
- border-right: #DFDFDF solid 1px;
833
- }
834
-
835
- .acf_flexible_content table.widefat > tbody > tr:first-child > td {
836
 
 
 
 
 
837
  }
838
 
839
- .acf_flexible_content table.widefat > tbody > tr:last-child > td {
840
- border-bottom: 0 none;
841
  }
842
 
843
- .acf_flexible_content table.widefat > tbody > tr > td:last-child {
844
- border-right: 0 none;
845
  }
846
 
847
  .acf_flexible_content .clones {
@@ -852,14 +820,30 @@ ul.checkbox_list {
852
  visibility: visible !important;
853
  border: #DFDFDF dashed 2px;
854
  border-radius: 3px;
 
 
 
 
 
 
 
 
 
 
855
  }
856
 
857
- .acf_flexible_content td .row-layout-field {
858
- padding: 30px 0 0;
 
 
 
 
 
 
859
  }
860
 
861
- .acf_flexible_content td .row-layout-field:first-child {
862
- padding-top: 3px;
863
  }
864
 
865
  .acf-popup {
@@ -982,7 +966,7 @@ ul.checkbox_list {
982
  }
983
 
984
  .acf_flexible_content .flexible-footer {
985
- margin: 8px 0;
986
  }
987
 
988
  /*---------------------------------------------------------------------------------------------
@@ -1033,21 +1017,27 @@ ul.checkbox_list {
1033
  overflow: hidden;
1034
  border: #DFDFDF solid 1px;
1035
  border-radius: 3px;
1036
- box-shadow: #f9f9f9 0 1px 0;
1037
  }
1038
 
1039
  .acf-gallery .thumbnails {
1040
- background: #ececec;
 
 
 
 
 
 
 
 
 
 
 
1041
  min-height: 400px;
1042
  margin: 0 0 0 0;
1043
 
1044
  position: relative;
1045
  z-index: 1;
1046
-
1047
- -webkit-transition: all 0.5s ease-out; /* Saf3.2+, Chrome */
1048
- -moz-transition: all 0.5s ease-out; /* FF4+ */
1049
- -o-transition: all 0.5s ease-out; /* Opera 10.5+ */
1050
- transition: all 0.5s ease-out;
1051
 
1052
  }
1053
 
1
  /*---------------------------------------------------------------------------------------------
2
+ *
3
+ * Post Box
4
+ *
5
+ *---------------------------------------------------------------------------------------------*/
6
 
7
  #poststuff .acf_postbox {
8
  display: block;
23
  padding: 0;
24
  }
25
 
26
+ #poststuff .acf_postbox.no_box {
27
+ border: 0 none;
28
+ background: transparent;
29
+ }
30
+
31
+ #poststuff .acf_postbox.no_box > h3,
32
+ #poststuff .acf_postbox.no_box > .handlediv {
33
+ display: none;
34
+ }
35
+
36
+
37
+ /*---------------------------------------------------------------------------------------------
38
+ *
39
+ * Field
40
+ *
41
+ *---------------------------------------------------------------------------------------------*/
42
 
 
43
  #poststuff .acf_postbox .field {
44
  position: relative;
45
  padding: 15px 10px;
 
46
  border-bottom: #e8e8e8 solid 1px;
47
  }
48
 
53
  #poststuff .acf_postbox.no_box .field {
54
  border-top: 0 none;
55
  border-bottom: 0 none;
56
+ padding-left: 0;
57
+ padding-right: 0;
58
  }
59
 
60
 
84
  }
85
 
86
 
87
+ /* Field Label */
88
  #poststuff .acf_postbox p.label {
89
  font-size: 11px;
90
  line-height: 1.1em;
113
  }
114
 
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  /*---------------------------------------------------------------------------------------------
117
+ *
118
+ * Basic Field Styles
119
+ *
120
+ *---------------------------------------------------------------------------------------------*/
121
 
122
  .acf_postbox .field input[type="text"],
123
  .acf_postbox .field input[type="number"],
139
  resize: none;
140
  }
141
 
142
+ .acf_postbox .field select optgroup {
 
143
  padding: 5px;
144
  background: #fff;
145
  border-top: #DFDFDF solid 1px;
146
  }
147
 
148
+ .acf_postbox .field select option {
149
  padding: 3px;
150
  }
151
 
152
+ .acf_postbox .field select optgroup option {
153
  padding-left: 6px;
154
  }
155
 
156
+ .acf_postbox .field select optgroup:nth-child(2n) {
157
  background: #F9F9F9;
158
  }
159
 
160
+ .acf_postbox .field select[multiple] {
161
  padding: 0;
162
  }
163
 
164
+ .acf_postbox .field select[multiple] > optgroup:first-child {
165
  border-top: 0 none;
166
  }
167
 
168
+
169
  /*---------------------------------------------------------------------------------------------
170
+ *
171
+ * Field: WYSIWYG
172
+ *
173
+ *---------------------------------------------------------------------------------------------*/
174
+
175
+ .acf_wysiwyg {
176
+
177
+ }
178
 
179
  .acf_wysiwyg .wp_themeSkin table.mceToolbarRow1 {
180
  margin-top: 2px !important;
188
  top: -2px !important;
189
  }
190
 
 
 
 
 
191
  .acf_wysiwyg .wp-editor-container {
192
  background: #fff;
193
  border-color: #CCCCCC #CCCCCC #DFDFDF;
199
 
200
  /*---------------------------------------------------------------------------------------------
201
  *
202
+ * Field: Image
203
  *
204
  *---------------------------------------------------------------------------------------------*/
205
 
 
206
  .acf-image-uploader {
207
  position: relative;
208
  }
306
 
307
 
308
  /*---------------------------------------------------------------------------------------------
309
+ *
310
+ * Field: File
311
+ *
312
+ *---------------------------------------------------------------------------------------------*/
313
+
314
  .acf-file-uploader {
315
  position: relative;
316
  line-height: 1.5em;
340
  width: auto;
341
  }
342
 
343
+
344
  /*---------------------------------------------------------------------------------------------
345
+ *
346
+ * Field: Select
347
+ *
348
+ *---------------------------------------------------------------------------------------------*/
349
+
350
+ #wpcontent select[multiple] {
351
+ height: auto;
352
  }
353
 
354
+ #wpcontent select optgroup {
355
+ padding: 0 2px
356
+ }
357
+
358
+ #wpcontent select optgroup option {
359
+ padding-left: 6px;
360
+ }
361
+
362
+ ul.checkbox_list {
363
+ background: transparent !important;
364
+ }
365
+
366
+
367
+ /*---------------------------------------------------------------------------------------------
368
+ *
369
+ * Field: Repeater / Flexible Content (.acf-input-table)
370
+ *
371
+ *---------------------------------------------------------------------------------------------*/
372
+
373
+ .acf-input-table {
374
  border-radius: 0 0 0 0;
375
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
376
  }
377
 
378
+ .acf-input-table > thead { }
379
+ .acf-input-table > thead > tr > th {
380
+ padding: 8px;
381
+ position: relative;
382
+
383
+ vertical-align: top;
384
+ border-right: 1px solid #e1e1e1;
385
+ }
386
+
387
+ .repeater > table > thead > tr > th:last-child {
388
+ border-right: 0 none;
389
+ }
390
+
391
+ .acf-input-table > tbody {}
392
+
393
+ .acf-input-table > tbody > tr {
394
+ background: #fff;
395
+ }
396
+
397
+ .acf-input-table > tbody > tr > td {
398
  background: transparent;
399
  border: 0 none;
400
+
401
+ border-top: 1px solid #ededed;
402
  border-right: 1px solid #ededed;
403
+
404
+ padding: 8px;
405
+ position: relative;
406
+ }
407
+
408
+ .acf-input-table > tbody > tr > td {
409
+ background: transparent;
410
+ border: 0 none;
411
+
412
  border-top: 1px solid #ededed;
413
+ border-right: 1px solid #ededed;
414
+
415
+ padding: 8px;
416
  position: relative;
417
  }
418
 
419
+ .acf-input-table.row_layout > tbody > tr > td {
420
  border-top-color: #DFDFDF;
421
  }
422
 
423
+ .acf-input-table > tbody > tr:first-child > td {
424
  border-top: 0 none;
425
  }
426
 
427
+ .acf-input-table > tbody > tr > td:last-child {
428
  border-right: 0 none;
429
  }
430
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
+ /*---------------------------------------------------------------------------------------------
433
+ *
434
+ * Field: Repeater
435
+ *
436
+ *---------------------------------------------------------------------------------------------*/
437
 
438
+ .repeater > .acf-input-table > tbody > tr:hover > td.remove > a.remove-row,
439
+ .repeater > .acf-input-table > tbody > tr:hover > td.remove > a.add-row {
440
 
441
  -webkit-transition-delay:0s;
442
  -moz-transition-delay:0s;
447
  opacity: 1;
448
  }
449
 
450
+ .repeater.disabled > .acf-input-table > tbody > tr:hover > td.remove > a.add-row {
451
  visibility: hidden !important;
452
  }
453
 
 
 
 
454
 
455
  a.add-row {
456
  display: block;
503
  vertical-align: middle;
504
  color: #aaa;
505
  text-shadow: #fff 0 1px 0;
506
+
507
+ cursor: move;
508
+
509
+
510
  }
511
 
512
+ .repeater > table > tbody > tr > td.order {
 
 
 
513
  border-right-color: #E1E1E1;
514
+ background: #f4f4f4;
515
  }
516
 
517
+ .repeater > table > tbody > tr > td.remove {
518
+ background: #F9F9F9;
519
+ }
520
+
521
+
522
+ .repeater > table > thead > tr > th.order:hover,
523
+ .repeater > table > tbody > tr > td.order:hover {
524
  color: #666;
525
  }
526
 
530
  vertical-align: middle;
531
  }
532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
 
534
+ /*
535
  .repeater table tr td select {
536
  width: 120px;
537
  margin: 0;
538
  }
539
+ */
540
 
541
  .repeater .repeater-footer {
542
  margin: 8px 0;
543
  }
544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  .repeater tr.row-clone {
546
  display: none;
547
  }
548
 
 
 
 
 
 
 
 
 
549
  .repeater > table > tbody > tr.ui-sortable-helper {
550
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
551
  }
566
  border-bottom: 0 none;
567
  }
568
 
569
+ td.acf_input-wrap {
570
  padding: 0 !important;;
571
  }
572
 
573
+ /*
574
  .repeater > table > tbody > tr > td.acf_input-wrap .acf_input {
575
  width: 100%;
576
  }
577
+ */
578
 
579
  .sub-field-instructions {
580
  color: #999999;
582
  font-family: sans-serif;
583
  font-size: 12px;
584
  text-shadow: 0 1px 0 #FFFFFF;
585
+
586
+ font-weight: normal;
587
  }
588
 
589
 
 
 
 
 
 
 
590
  /*---------------------------------------------------------------------------------------------
591
  *
592
+ * Field: Relationship
593
  *
594
  *---------------------------------------------------------------------------------------------*/
595
 
760
 
761
 
762
  /*---------------------------------------------------------------------------------------------
763
+ *
764
+ * Field: Flexible Content
765
+ *
766
+ *---------------------------------------------------------------------------------------------*/
767
+
768
  .acf_flexible_content {
769
+ position: relative;
770
  }
771
 
772
  .acf_flexible_content .layout {
773
+ margin: 20px 0 0;
774
  position: relative;
775
+
776
+ border-radius: 0;
777
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
778
+ background: #fff;
779
  }
780
 
781
+ .acf_flexible_content .layout:first-child {
782
+ margin-top: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  }
784
 
785
+ .acf_flexible_content .layout .menu-item-handle {
786
+ display: block;
787
+ position: relative;
788
+ border-radius: 0;
789
+ width: auto;
790
+ margin: 0;
791
 
792
+ color: #666;
 
 
 
793
  }
794
 
795
+ .acf_flexible_content .layout .fc-delete-layout {
 
796
  width: 30px;
797
  height: 25px;
798
+ display: none;
799
+ background: url(../images/sprite.png) -50px -100px no-repeat;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
 
801
+ position: absolute;
802
+ top: 6px;
803
+ right: 6px;
804
+ z-index: 1;
805
  }
806
 
807
+ .acf_flexible_content .layout:hover .fc-delete-layout {
808
+ display: block;
809
  }
810
 
811
+ .acf_flexible_content .layout .fc-delete-layout:hover {
812
+ background-position: -50px -150px;
813
  }
814
 
815
  .acf_flexible_content .clones {
820
  visibility: visible !important;
821
  border: #DFDFDF dashed 2px;
822
  border-radius: 3px;
823
+ box-shadow: none;
824
+ }
825
+
826
+ .acf_flexible_content .layout > .acf-input-table {
827
+ border-top: 0 none;
828
+ box-shadow: none;
829
+ }
830
+
831
+ .acf_flexible_content .layout > .acf-input-table > tbody > tr {
832
+ background: #fff;
833
  }
834
 
835
+ .acf_flexible_content .layout > .acf-input-table > thead > tr > th {
836
+ background: none repeat scroll 0 0 #F9F9F9;
837
+ border-bottom: 1px solid #E1E1E1;
838
+ border-right: 1px solid #E1E1E1;
839
+
840
+ font-size: 12px;
841
+ font-family: sans-serif;
842
+ font-weight: bold;
843
  }
844
 
845
+ .acf_flexible_content .layout > .acf-input-table > thead > tr > th:last-child {
846
+ border-right: 0 none;
847
  }
848
 
849
  .acf-popup {
966
  }
967
 
968
  .acf_flexible_content .flexible-footer {
969
+ margin: 20px 0 0;
970
  }
971
 
972
  /*---------------------------------------------------------------------------------------------
1017
  overflow: hidden;
1018
  border: #DFDFDF solid 1px;
1019
  border-radius: 3px;
 
1020
  }
1021
 
1022
  .acf-gallery .thumbnails {
1023
+ background-color:#f9f9f9;
1024
+ /*
1025
+ background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);
1026
+ background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);
1027
+ background-image:-o-linear-gradient(top,#f9f9f9,#ececec);
1028
+ background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
1029
+ background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);
1030
+ background-image:linear-gradient(top,#f9f9f9,#ececec);
1031
+ */
1032
+
1033
+ box-shadow: inset 0px 1px 5px rgba(0,0,0,0.06);
1034
+
1035
  min-height: 400px;
1036
  margin: 0 0 0 0;
1037
 
1038
  position: relative;
1039
  z-index: 1;
1040
+
 
 
 
 
1041
 
1042
  }
1043
 
js/fields.js CHANGED
@@ -5,7 +5,8 @@ var acf = {
5
  'checked' : 'checked',
6
  'conditional_no_fields' : 'No "toggle" fields avilable'
7
  },
8
- fields : []
 
9
 
10
  };
11
 
@@ -24,6 +25,23 @@ var acf = {
24
  };
25
 
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  /*
28
  * uniqid
29
  *
@@ -461,9 +479,7 @@ var acf = {
461
  update: function(event, ui){
462
  update_order_numbers();
463
  },
464
- handle: 'td.field_order',
465
- axis: "y",
466
- revert: true
467
  });
468
  });
469
 
@@ -677,12 +693,6 @@ var acf = {
677
  // add new tr
678
  tr.after(new_tr);
679
 
680
- // add drag / drop
681
- new_tr.find('.fields').sortable({
682
- handle: 'td.field_order',
683
- axis: "y",
684
- revert: true
685
- });
686
 
687
  return false;
688
  });
@@ -724,20 +734,20 @@ var acf = {
724
 
725
  if(table.hasClass('sortable')) return false;
726
 
727
- var fixHelper = function(e, ui) {
728
- ui.children().each(function() {
729
- $(this).width($(this).width());
730
- });
731
- return ui;
732
- };
733
-
734
  table.addClass('sortable').children('tbody').sortable({
735
  items: ".field_option_flexible_content",
736
  handle: 'a.acf_fc_reorder',
737
- helper: fixHelper,
738
- placeholder: "ui-state-highlight",
739
- axis: "y",
740
- revert: true
 
 
 
 
 
 
 
741
  });
742
 
743
  });
@@ -764,6 +774,64 @@ var acf = {
764
  });
765
 
766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
767
  /*
768
  * Screen Options
769
  *
5
  'checked' : 'checked',
6
  'conditional_no_fields' : 'No "toggle" fields avilable'
7
  },
8
+ fields : [],
9
+ sortable_helper : null
10
 
11
  };
12
 
25
  };
26
 
27
 
28
+ /*
29
+ * Sortable Helper
30
+ *
31
+ * @description: keeps widths of td's inside a tr
32
+ * @since 3.5.1
33
+ * @created: 10/11/12
34
+ */
35
+
36
+ acf.sortable_helper = function(e, ui)
37
+ {
38
+ ui.children().each(function(){
39
+ $(this).width($(this).width());
40
+ });
41
+ return ui;
42
+ };
43
+
44
+
45
  /*
46
  * uniqid
47
  *
479
  update: function(event, ui){
480
  update_order_numbers();
481
  },
482
+ handle: 'td.field_order'
 
 
483
  });
484
  });
485
 
693
  // add new tr
694
  tr.after(new_tr);
695
 
 
 
 
 
 
 
696
 
697
  return false;
698
  });
734
 
735
  if(table.hasClass('sortable')) return false;
736
 
 
 
 
 
 
 
 
737
  table.addClass('sortable').children('tbody').sortable({
738
  items: ".field_option_flexible_content",
739
  handle: 'a.acf_fc_reorder',
740
+ helper: acf.sortable_helper,
741
+ forceHelperSize : true,
742
+ forcePlaceholderSize : true,
743
+ scroll : true,
744
+ start : function (event, ui) {
745
+
746
+ // add markup to the placeholder
747
+ var td_count = ui.item.children('td').length;
748
+ ui.placeholder.html('<td colspan="' + td_count + '"></td>');
749
+
750
+ }
751
  });
752
 
753
  });
774
  });
775
 
776
 
777
+ /*
778
+ * Repeater CHange layout display (Row | Table)
779
+ *
780
+ * @description:
781
+ * @since 3.5.2
782
+ * @created: 18/11/12
783
+ */
784
+
785
+ $('#acf_fields .field_option_repeater_layout input[type="radio"]').live('click', function(){
786
+
787
+ // vars
788
+ var radio = $(this);
789
+
790
+
791
+ // Set class
792
+ radio.closest('.field_option_repeater').siblings('.field_option_repeater_fields').find('.repeater:first').removeClass('layout-row').removeClass('layout-table').addClass( 'layout-' + radio.val() );
793
+
794
+ });
795
+
796
+ $(document).live('acf/field_form-open', function(e, field){
797
+
798
+ $(field).find('.field_option_repeater_layout input[type="radio"]:checked').each(function(){
799
+ $(this).trigger('click');
800
+ });
801
+
802
+ });
803
+
804
+
805
+
806
+ /*
807
+ * Flexible Content CHange layout display (Row | Table)
808
+ *
809
+ * @description:
810
+ * @since 3.5.2
811
+ * @created: 18/11/12
812
+ */
813
+
814
+ $('#acf_fields .acf_fc_display select').live('change', function(){
815
+
816
+ // vars
817
+ var select = $(this);
818
+
819
+
820
+ // Set class
821
+ select.closest('.repeater').removeClass('layout-row').removeClass('layout-table').addClass( 'layout-' + select.val() );
822
+
823
+ });
824
+
825
+ $(document).live('acf/field_form-open', function(e, field){
826
+
827
+ $(field).find('.acf_fc_display select').each(function(){
828
+ $(this).trigger('change');
829
+ });
830
+
831
+ });
832
+
833
+
834
+
835
  /*
836
  * Screen Options
837
  *
js/input-actions.js CHANGED
@@ -957,111 +957,106 @@ var acf = {
957
  return newDate.getTime();
958
  }
959
 
960
-
961
- // update order numbers
962
  function repeater_update_order( repeater )
963
  {
964
  repeater.find('> table > tbody > tr.row').each(function(i){
965
- $(this).children('td.order').html(i+1);
966
  });
967
 
968
  };
969
 
970
 
971
- // make sortable
972
- function repeater_add_sortable( repeater ){
973
-
974
- repeater.find('> table > tbody').unbind('sortable').sortable({
975
- update: function(event, ui){
976
- repeater_update_order( repeater );
977
- },
978
- items : '> tr.row',
979
- handle : '> td.order',
980
- helper : acf.sortable_helper,
981
- forceHelperSize : true,
982
- forcePlaceholderSize : true,
983
- scroll : true,
984
- start : function (event, ui) {
985
-
986
- $(document).trigger('acf/sortable_start', ui.item);
987
-
988
- // add markup to the placeholder
989
- var td_count = ui.item.children('td').length;
990
- ui.placeholder.html('<td colspan="' + td_count + '"></td>');
991
-
992
- },
993
- stop : function (event, ui) {
994
-
995
- $(document).trigger('acf/sortable_stop', ui.item);
996
-
997
- }
998
- });
999
- };
1000
-
1001
-
1002
  // setup repeater fields
1003
  $(document).live('acf/setup_fields', function(e, postbox){
1004
 
1005
  $(postbox).find('.repeater').each(function(){
1006
 
1007
- var repeater = $(this),
1008
- min_rows = parseInt( repeater.attr('data-min_rows') ),
1009
- max_rows = parseInt( repeater.attr('data-max_rows') );
1010
 
1011
 
1012
  // set column widths
1013
- if( ! repeater.find('> table').hasClass('row_layout') )
1014
- {
1015
- // accomodate for order / remove th widths
1016
- var column_width = 93;
1017
-
1018
- // find columns that already have a width and remove these amounts from the column_width var
1019
- repeater.find('> table > thead > tr > th[width]').each(function( i ){
1020
-
1021
- column_width -= parseInt( $(this).attr('width') );
1022
- });
1023
-
1024
-
1025
- var ths = repeater.find('> table > thead > tr th').not('[width]').has('span');
1026
- if( ths.length > 1 )
1027
- {
1028
- column_width = column_width / ths.length;
1029
-
1030
- ths.each(function( i ){
1031
-
1032
- // dont add width to last th
1033
- if( (i+1) == ths.length )
1034
- {
1035
- return;
1036
- }
1037
-
1038
- $(this).attr('width', column_width + '%');
1039
-
1040
- });
1041
- }
1042
-
1043
- }
1044
 
1045
 
1046
  // update classes based on row count
1047
- repeater_check_rows( repeater );
1048
 
1049
 
1050
- // sortable
1051
- if( max_rows > 1 ){
1052
- repeater_add_sortable( repeater );
1053
- }
1054
-
1055
  });
1056
 
1057
  });
1058
 
1059
 
1060
- // repeater_check_rows
1061
- function repeater_check_rows( repeater )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1062
  {
1063
  // vars
1064
- var max_rows = parseInt( repeater.attr('data-max_rows') ),
1065
  row_count = repeater.find('> table > tbody > tr.row').length;
1066
 
1067
 
@@ -1088,6 +1083,56 @@ var acf = {
1088
  }
1089
 
1090
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1091
  // add field
1092
  function repeater_add_field( repeater, before )
1093
  {
@@ -1128,7 +1173,7 @@ var acf = {
1128
 
1129
 
1130
  // update classes based on row count
1131
- repeater_check_rows( repeater );
1132
 
1133
 
1134
  // setup fields
@@ -1201,7 +1246,7 @@ var acf = {
1201
 
1202
 
1203
  // update classes based on row count
1204
- repeater_check_rows( repeater );
1205
 
1206
  }, 400);
1207
 
@@ -1248,19 +1293,23 @@ var acf = {
1248
  // remove (if clone) and add sortable
1249
  div.children('.values').unbind('sortable').sortable({
1250
  items : '> .layout',
1251
- handle : '> .actions .order',
1252
  forceHelperSize : true,
1253
  forcePlaceholderSize : true,
1254
  scroll : true,
1255
  start : function (event, ui) {
1256
 
1257
  $(document).trigger('acf/sortable_start', ui.item);
 
1258
 
1259
  },
1260
  stop : function (event, ui) {
1261
 
1262
  $(document).trigger('acf/sortable_stop', ui.item);
 
1263
 
 
 
1264
  }
1265
  });
1266
 
@@ -1326,11 +1375,22 @@ var acf = {
1326
  }
1327
 
1328
 
1329
- $('.acf_flexible_content .actions .delete').live('click', function(){
1330
  var layout = $(this).closest('.layout');
1331
  flexible_content_remove_layout( layout );
1332
  return false;
1333
  });
 
 
 
 
 
 
 
 
 
 
 
1334
 
1335
 
1336
  // add layout
@@ -1359,6 +1419,10 @@ var acf = {
1359
  $(document).trigger('acf/setup_fields',new_field);
1360
 
1361
 
 
 
 
 
1362
  // validation
1363
  div.closest('.field').removeClass('error');
1364
 
@@ -1375,9 +1439,45 @@ var acf = {
1375
 
1376
  // sortable
1377
  flexible_content_add_sortable( div );
 
 
 
 
 
 
 
 
1378
  });
1379
 
1380
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1381
 
1382
 
1383
  /*
957
  return newDate.getTime();
958
  }
959
 
960
+
961
+ // update order
962
  function repeater_update_order( repeater )
963
  {
964
  repeater.find('> table > tbody > tr.row').each(function(i){
965
+ $(this).children('td.order').html( i+1 );
966
  });
967
 
968
  };
969
 
970
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
971
  // setup repeater fields
972
  $(document).live('acf/setup_fields', function(e, postbox){
973
 
974
  $(postbox).find('.repeater').each(function(){
975
 
976
+ var repeater = $(this)
 
 
977
 
978
 
979
  // set column widths
980
+ repeater_set_column_widths( repeater );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
 
982
 
983
  // update classes based on row count
984
+ repeater_update_classes( repeater );
985
 
986
 
987
+ // add sortable
988
+ repeater_add_sortable( repeater );
989
+
 
 
990
  });
991
 
992
  });
993
 
994
 
995
+ /*
996
+ * repeater_set_column_widths
997
+ *
998
+ * @description:
999
+ * @since 3.5.1
1000
+ * @created: 11/11/12
1001
+ */
1002
+
1003
+ function repeater_set_column_widths( repeater )
1004
+ {
1005
+ // validate
1006
+ if( repeater.children('.acf-input-table').hasClass('row_layout') )
1007
+ {
1008
+ return;
1009
+ }
1010
+
1011
+
1012
+ // accomodate for order / remove
1013
+ var column_width = 100;
1014
+ if( repeater.find('> .acf-input-table > thead > tr > th.order').exists() )
1015
+ {
1016
+ column_width = 93;
1017
+ }
1018
+
1019
+
1020
+ // find columns that already have a width and remove these amounts from the column_width var
1021
+ repeater.find('> .acf-input-table > thead > tr > th[width]').each(function( i ){
1022
+
1023
+ column_width -= parseInt( $(this).attr('width') );
1024
+ });
1025
+
1026
+
1027
+ var ths = repeater.find('> .acf-input-table > thead > tr > th').not('[width]').has('span');
1028
+ if( ths.length > 1 )
1029
+ {
1030
+ column_width = column_width / ths.length;
1031
+
1032
+ ths.each(function( i ){
1033
+
1034
+ // dont add width to last th
1035
+ if( (i+1) == ths.length )
1036
+ {
1037
+ return;
1038
+ }
1039
+
1040
+ $(this).attr('width', column_width + '%');
1041
+
1042
+ });
1043
+ }
1044
+
1045
+ }
1046
+
1047
+
1048
+ /*
1049
+ * repeater_update_classes
1050
+ *
1051
+ * @description:
1052
+ * @since 3.5.2
1053
+ * @created: 11/11/12
1054
+ */
1055
+
1056
+ function repeater_update_classes( repeater )
1057
  {
1058
  // vars
1059
+ var max_rows = parseFloat( repeater.attr('data-max_rows') ),
1060
  row_count = repeater.find('> table > tbody > tr.row').length;
1061
 
1062
 
1083
  }
1084
 
1085
 
1086
+ /*
1087
+ * repeater_add_sortable
1088
+ *
1089
+ * @description:
1090
+ * @since 3.5.2
1091
+ * @created: 11/11/12
1092
+ */
1093
+
1094
+ function repeater_add_sortable( repeater ){
1095
+
1096
+ // vars
1097
+ var max_rows = parseFloat( repeater.attr('data-max_rows') );
1098
+
1099
+
1100
+ // validate
1101
+ if( max_rows <= 1 )
1102
+ {
1103
+ return;
1104
+ }
1105
+
1106
+ repeater.find('> table > tbody').unbind('sortable').sortable({
1107
+ items : '> tr.row',
1108
+ handle : '> td.order',
1109
+ helper : acf.sortable_helper,
1110
+ forceHelperSize : true,
1111
+ forcePlaceholderSize : true,
1112
+ scroll : true,
1113
+ start : function (event, ui) {
1114
+
1115
+ $(document).trigger('acf/sortable_start', ui.item);
1116
+ $(document).trigger('acf/sortable_start_repeater', ui.item);
1117
+
1118
+ // add markup to the placeholder
1119
+ var td_count = ui.item.children('td').length;
1120
+ ui.placeholder.html('<td colspan="' + td_count + '"></td>');
1121
+
1122
+ },
1123
+ stop : function (event, ui) {
1124
+
1125
+ $(document).trigger('acf/sortable_stop', ui.item);
1126
+ $(document).trigger('acf/sortable_stop_repeater', ui.item);
1127
+
1128
+ // update order numbers
1129
+ repeater_update_order( repeater );
1130
+
1131
+ }
1132
+ });
1133
+ };
1134
+
1135
+
1136
  // add field
1137
  function repeater_add_field( repeater, before )
1138
  {
1173
 
1174
 
1175
  // update classes based on row count
1176
+ repeater_update_classes( repeater );
1177
 
1178
 
1179
  // setup fields
1246
 
1247
 
1248
  // update classes based on row count
1249
+ repeater_update_classes( repeater );
1250
 
1251
  }, 400);
1252
 
1293
  // remove (if clone) and add sortable
1294
  div.children('.values').unbind('sortable').sortable({
1295
  items : '> .layout',
1296
+ handle : '> .menu-item-handle',
1297
  forceHelperSize : true,
1298
  forcePlaceholderSize : true,
1299
  scroll : true,
1300
  start : function (event, ui) {
1301
 
1302
  $(document).trigger('acf/sortable_start', ui.item);
1303
+ $(document).trigger('acf/sortable_start_flexible_content', ui.item);
1304
 
1305
  },
1306
  stop : function (event, ui) {
1307
 
1308
  $(document).trigger('acf/sortable_stop', ui.item);
1309
+ $(document).trigger('acf/sortable_stop_flexible_content', ui.item);
1310
 
1311
+ // update order numbers
1312
+ flexible_content_update_order( div );
1313
  }
1314
  });
1315
 
1375
  }
1376
 
1377
 
1378
+ $('.acf_flexible_content .fc-delete-layout').live('click', function(){
1379
  var layout = $(this).closest('.layout');
1380
  flexible_content_remove_layout( layout );
1381
  return false;
1382
  });
1383
+
1384
+
1385
+
1386
+ // update order
1387
+ function flexible_content_update_order( div )
1388
+ {
1389
+ div.find('> .values .layout').each(function(i){
1390
+ $(this).find('> .menu-item-handle .fc-layout-order').html(i+1);
1391
+ });
1392
+
1393
+ };
1394
 
1395
 
1396
  // add layout
1419
  $(document).trigger('acf/setup_fields',new_field);
1420
 
1421
 
1422
+ // update order numbers
1423
+ flexible_content_update_order( div );
1424
+
1425
+
1426
  // validation
1427
  div.closest('.field').removeClass('error');
1428
 
1439
 
1440
  // sortable
1441
  flexible_content_add_sortable( div );
1442
+
1443
+
1444
+ // set column widths
1445
+ $(div).find('.layout').each(function(){
1446
+ repeater_set_column_widths( $(this) );
1447
+ });
1448
+
1449
+
1450
  });
1451
 
1452
  });
1453
+
1454
+
1455
+ /*
1456
+ * Hide Show Flexible Content
1457
+ *
1458
+ * @description:
1459
+ * @since 3.5.2
1460
+ * @created: 11/11/12
1461
+ */
1462
+
1463
+ $('.acf_flexible_content .layout .menu-item-handle').live('click', function(){
1464
+
1465
+ // vars
1466
+ var layout = $(this).closest('.layout');
1467
+
1468
+
1469
+ if( layout.attr('data-toggle') == 'closed' )
1470
+ {
1471
+ layout.attr('data-toggle', 'open');
1472
+ layout.children('.acf-input-table').show();
1473
+ }
1474
+ else
1475
+ {
1476
+ layout.attr('data-toggle', 'closed');
1477
+ layout.children('.acf-input-table').hide();
1478
+ }
1479
+
1480
+ });
1481
 
1482
 
1483
  /*
js/input-ajax.js CHANGED
@@ -33,7 +33,7 @@
33
  action : 'get_input_metabox_ids',
34
  post_id : 0,
35
  page_template : false,
36
- page_parent : false,
37
  page_type : false,
38
  page : 0,
39
  post : 0,
@@ -187,7 +187,7 @@
187
  else
188
  {
189
  acf.data.page_type = 'parent';
190
- acf.data.page_parent = false;
191
  }
192
 
193
  update_fields();
33
  action : 'get_input_metabox_ids',
34
  post_id : 0,
35
  page_template : false,
36
+ page_parent : 0,
37
  page_type : false,
38
  page : 0,
39
  post : 0,
187
  else
188
  {
189
  acf.data.page_type = 'parent';
190
+ acf.data.page_parent = 0;
191
  }
192
 
193
  update_fields();
lang/acf-uk.mo ADDED
Binary file
lang/acf-uk.po ADDED
@@ -0,0 +1,1358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2012
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: ACF\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/advanced-custom-fields\n"
7
+ "POT-Creation-Date: 2012-10-04 22:38:59+00:00\n"
8
+ "PO-Revision-Date: 2012-11-09 03:32+0200\n"
9
+ "Last-Translator: Jurko Chervony <info@skinik.name>\n"
10
+ "Language-Team: UA WordPress <skinik@wordpress.co.ua>\n"
11
+ "Language: Ukrainian\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e\n"
19
+ "X-Poedit-Basepath: ..\n"
20
+ "X-Generator: Poedit 1.5.3\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+
23
+ #: acf.php:286 core/views/meta_box_options.php:94
24
+ msgid "Custom Fields"
25
+ msgstr "Додаткові поля"
26
+
27
+ #: acf.php:307
28
+ msgid "Field&nbsp;Groups"
29
+ msgstr "Групи полів"
30
+
31
+ #: acf.php:308 core/controllers/field_groups.php:234
32
+ #: core/controllers/upgrade.php:70
33
+ msgid "Advanced Custom Fields"
34
+ msgstr ""
35
+
36
+ #: acf.php:309 core/fields/flexible_content.php:325
37
+ msgid "Add New"
38
+ msgstr "Додати нову"
39
+
40
+ #: acf.php:310
41
+ msgid "Add New Field Group"
42
+ msgstr "Додати нову групу полів"
43
+
44
+ #: acf.php:311
45
+ msgid "Edit Field Group"
46
+ msgstr "Редагувати групу полів"
47
+
48
+ #: acf.php:312
49
+ msgid "New Field Group"
50
+ msgstr "Нова група полів"
51
+
52
+ #: acf.php:313
53
+ msgid "View Field Group"
54
+ msgstr "Переглянути групу полів"
55
+
56
+ #: acf.php:314
57
+ msgid "Search Field Groups"
58
+ msgstr "Шукати групи полів"
59
+
60
+ #: acf.php:315
61
+ msgid "No Field Groups found"
62
+ msgstr "Не знайдено груп полів"
63
+
64
+ #: acf.php:316
65
+ msgid "No Field Groups found in Trash"
66
+ msgstr "У кошику немає груп полів"
67
+
68
+ #: acf.php:351 acf.php:354
69
+ msgid "Field group updated."
70
+ msgstr "Групу полів оновлено."
71
+
72
+ #: acf.php:352
73
+ msgid "Custom field updated."
74
+ msgstr "Додаткове поле оновлено."
75
+
76
+ #: acf.php:353
77
+ msgid "Custom field deleted."
78
+ msgstr "Додаткове поле видалено."
79
+
80
+ #. translators: %s: date and time of the revision
81
+ #: acf.php:356
82
+ msgid "Field group restored to revision from %s"
83
+ msgstr ""
84
+
85
+ #: acf.php:357
86
+ msgid "Field group published."
87
+ msgstr "Групу полів опубліковано."
88
+
89
+ #: acf.php:358
90
+ msgid "Field group saved."
91
+ msgstr "Групу полів збережено."
92
+
93
+ #: acf.php:359
94
+ msgid "Field group submitted."
95
+ msgstr ""
96
+
97
+ #: acf.php:360
98
+ msgid "Field group scheduled for."
99
+ msgstr ""
100
+
101
+ #: acf.php:361
102
+ msgid "Field group draft updated."
103
+ msgstr ""
104
+
105
+ #: acf.php:380 core/fields/gallery.php:66 core/fields/gallery.php:229
106
+ msgid "Title"
107
+ msgstr "Заголовок"
108
+
109
+ #: acf.php:623
110
+ msgid "Error: Field Type does not exist!"
111
+ msgstr ""
112
+
113
+ #: acf.php:1709
114
+ msgid "Thumbnail"
115
+ msgstr "Мініатюра"
116
+
117
+ #: acf.php:1710
118
+ msgid "Medium"
119
+ msgstr "Середній"
120
+
121
+ #: acf.php:1711
122
+ msgid "Large"
123
+ msgstr "Великий"
124
+
125
+ #: acf.php:1712 core/fields/wysiwyg.php:105
126
+ msgid "Full"
127
+ msgstr "Повний"
128
+
129
+ #: core/actions/export.php:26
130
+ msgid "No ACF groups selected"
131
+ msgstr ""
132
+
133
+ #: core/controllers/field_group.php:148 core/controllers/field_group.php:167
134
+ #: core/controllers/field_groups.php:144
135
+ msgid "Fields"
136
+ msgstr "Поля"
137
+
138
+ #: core/controllers/field_group.php:149
139
+ msgid "Location"
140
+ msgstr "Розміщення"
141
+
142
+ #: core/controllers/field_group.php:150 core/controllers/field_group.php:427
143
+ #: core/controllers/options_page.php:62 core/controllers/options_page.php:74
144
+ #: core/views/meta_box_location.php:143
145
+ msgid "Options"
146
+ msgstr "Опції"
147
+
148
+ #: core/controllers/field_group.php:355
149
+ msgid "Parent Page"
150
+ msgstr "Батьківська сторінка"
151
+
152
+ #: core/controllers/field_group.php:356
153
+ msgid "Child Page"
154
+ msgstr "Дочірня сторінка"
155
+
156
+ #: core/controllers/field_group.php:364
157
+ msgid "Default Template"
158
+ msgstr "Стандартний шаблон"
159
+
160
+ #: core/controllers/field_group.php:451 core/controllers/field_group.php:472
161
+ #: core/controllers/field_group.php:479 core/fields/page_link.php:76
162
+ #: core/fields/post_object.php:223 core/fields/post_object.php:251
163
+ #: core/fields/relationship.php:392 core/fields/relationship.php:421
164
+ msgid "All"
165
+ msgstr ""
166
+
167
+ #: core/controllers/field_groups.php:197 core/views/meta_box_options.php:50
168
+ msgid "Normal"
169
+ msgstr "Стандартно"
170
+
171
+ #: core/controllers/field_groups.php:198 core/views/meta_box_options.php:51
172
+ msgid "Side"
173
+ msgstr "Збоку"
174
+
175
+ #: core/controllers/field_groups.php:208 core/views/meta_box_options.php:71
176
+ msgid "Standard Metabox"
177
+ msgstr ""
178
+
179
+ #: core/controllers/field_groups.php:209 core/views/meta_box_options.php:70
180
+ msgid "No Metabox"
181
+ msgstr ""
182
+
183
+ #: core/controllers/field_groups.php:236
184
+ msgid "Changelog"
185
+ msgstr "Список змін"
186
+
187
+ #: core/controllers/field_groups.php:237
188
+ msgid "See what's new in"
189
+ msgstr "Перегляньте що нового у"
190
+
191
+ #: core/controllers/field_groups.php:239
192
+ msgid "Resources"
193
+ msgstr "Документація"
194
+
195
+ #: core/controllers/field_groups.php:240
196
+ msgid ""
197
+ "Read documentation, learn the functions and find some tips &amp; tricks for "
198
+ "your next web project."
199
+ msgstr ""
200
+ "В документації ви знайдете детальний опис функцій та декілька порад і трюків "
201
+ "для кращого використання плаґіну."
202
+
203
+ #: core/controllers/field_groups.php:241
204
+ msgid "Visit the ACF website"
205
+ msgstr "Відвідайте сайт плаґіну"
206
+
207
+ #: core/controllers/field_groups.php:246
208
+ msgid "Created by"
209
+ msgstr "Плаґін створив"
210
+
211
+ #: core/controllers/field_groups.php:249
212
+ msgid "Vote"
213
+ msgstr ""
214
+
215
+ #: core/controllers/field_groups.php:250
216
+ msgid "Follow"
217
+ msgstr ""
218
+
219
+ #: core/controllers/input.php:528
220
+ msgid "Validation Failed. One or more fields below are required."
221
+ msgstr "Заповніть всі поля! Одне або декілька полів нижче не заповнено."
222
+
223
+ #: core/controllers/input.php:529
224
+ msgid "Add File to Field"
225
+ msgstr ""
226
+
227
+ #: core/controllers/input.php:530
228
+ msgid "Edit File"
229
+ msgstr "Редагувати файл"
230
+
231
+ #: core/controllers/input.php:531
232
+ msgid "Add Image to Field"
233
+ msgstr ""
234
+
235
+ #: core/controllers/input.php:532 core/controllers/input.php:535
236
+ msgid "Edit Image"
237
+ msgstr "Редагувати зображення"
238
+
239
+ #: core/controllers/input.php:533
240
+ msgid "Maximum values reached ( {max} values )"
241
+ msgstr ""
242
+
243
+ #: core/controllers/input.php:534
244
+ msgid "Add Image to Gallery"
245
+ msgstr "Додати зображення до галереї"
246
+
247
+ #: core/controllers/input.php:625
248
+ msgid "Attachment updated"
249
+ msgstr "Вкладення завантажено"
250
+
251
+ #: core/controllers/options_page.php:121
252
+ msgid "Options Updated"
253
+ msgstr "Опції оновлено"
254
+
255
+ #: core/controllers/options_page.php:251
256
+ msgid "No Custom Field Group found for the options page"
257
+ msgstr ""
258
+
259
+ #: core/controllers/options_page.php:251
260
+ msgid "Create a Custom Field Group"
261
+ msgstr "Створити групу додаткових полів"
262
+
263
+ #: core/controllers/options_page.php:262
264
+ msgid "Publish"
265
+ msgstr "Опублікувати"
266
+
267
+ #: core/controllers/options_page.php:265
268
+ msgid "Save Options"
269
+ msgstr "Зберегти опції"
270
+
271
+ #: core/controllers/settings.php:49
272
+ msgid "Settings"
273
+ msgstr "Налаштування"
274
+
275
+ #: core/controllers/settings.php:111
276
+ msgid "Repeater field deactivated"
277
+ msgstr ""
278
+
279
+ #: core/controllers/settings.php:115
280
+ msgid "Options page deactivated"
281
+ msgstr ""
282
+
283
+ #: core/controllers/settings.php:119
284
+ msgid "Flexible Content field deactivated"
285
+ msgstr ""
286
+
287
+ #: core/controllers/settings.php:123
288
+ msgid "Gallery field deactivated"
289
+ msgstr ""
290
+
291
+ #: core/controllers/settings.php:147
292
+ msgid "Repeater field activated"
293
+ msgstr ""
294
+
295
+ #: core/controllers/settings.php:151
296
+ msgid "Options page activated"
297
+ msgstr ""
298
+
299
+ #: core/controllers/settings.php:155
300
+ msgid "Flexible Content field activated"
301
+ msgstr ""
302
+
303
+ #: core/controllers/settings.php:159
304
+ msgid "Gallery field activated"
305
+ msgstr ""
306
+
307
+ #: core/controllers/settings.php:164
308
+ msgid "License key unrecognised"
309
+ msgstr ""
310
+
311
+ #: core/controllers/settings.php:216
312
+ msgid "Activate Add-ons."
313
+ msgstr ""
314
+
315
+ #: core/controllers/settings.php:217
316
+ msgid ""
317
+ "Add-ons can be unlocked by purchasing a license key. Each key can be used on "
318
+ "multiple sites."
319
+ msgstr ""
320
+
321
+ #: core/controllers/settings.php:218
322
+ msgid "Find Add-ons"
323
+ msgstr ""
324
+
325
+ #: core/controllers/settings.php:225 core/fields/flexible_content.php:380
326
+ #: core/fields/flexible_content.php:456 core/fields/repeater.php:330
327
+ #: core/fields/repeater.php:406 core/views/meta_box_fields.php:63
328
+ #: core/views/meta_box_fields.php:138
329
+ msgid "Field Type"
330
+ msgstr "Тип поля"
331
+
332
+ #: core/controllers/settings.php:226
333
+ msgid "Status"
334
+ msgstr "Статус"
335
+
336
+ #: core/controllers/settings.php:227
337
+ msgid "Activation Code"
338
+ msgstr "Код активації"
339
+
340
+ #: core/controllers/settings.php:232
341
+ msgid "Repeater Field"
342
+ msgstr ""
343
+
344
+ #: core/controllers/settings.php:233 core/controllers/settings.php:252
345
+ #: core/controllers/settings.php:271 core/controllers/settings.php:290
346
+ msgid "Active"
347
+ msgstr "Активно"
348
+
349
+ #: core/controllers/settings.php:233 core/controllers/settings.php:252
350
+ #: core/controllers/settings.php:271 core/controllers/settings.php:290
351
+ msgid "Inactive"
352
+ msgstr "Неактивно"
353
+
354
+ #: core/controllers/settings.php:239 core/controllers/settings.php:258
355
+ #: core/controllers/settings.php:277 core/controllers/settings.php:296
356
+ msgid "Deactivate"
357
+ msgstr "Деактивувати"
358
+
359
+ #: core/controllers/settings.php:245 core/controllers/settings.php:264
360
+ #: core/controllers/settings.php:283 core/controllers/settings.php:302
361
+ msgid "Activate"
362
+ msgstr "Активувати"
363
+
364
+ #: core/controllers/settings.php:251
365
+ msgid "Flexible Content Field"
366
+ msgstr ""
367
+
368
+ #: core/controllers/settings.php:270
369
+ msgid "Gallery Field"
370
+ msgstr "Поле галереї"
371
+
372
+ #: core/controllers/settings.php:289 core/views/meta_box_location.php:74
373
+ msgid "Options Page"
374
+ msgstr "Сторінка опцій"
375
+
376
+ #: core/controllers/settings.php:314
377
+ msgid "Export Field Groups to XML"
378
+ msgstr ""
379
+
380
+ #: core/controllers/settings.php:315
381
+ msgid ""
382
+ "ACF will create a .xml export file which is compatible with the native WP "
383
+ "import plugin."
384
+ msgstr ""
385
+
386
+ #: core/controllers/settings.php:316 core/controllers/settings.php:355
387
+ msgid "Instructions"
388
+ msgstr "Інструкція"
389
+
390
+ #: core/controllers/settings.php:318
391
+ msgid "Import Field Groups"
392
+ msgstr "Імпортувати групи полів"
393
+
394
+ #: core/controllers/settings.php:319
395
+ msgid ""
396
+ "Imported field groups <b>will</b> appear in the list of editable field "
397
+ "groups. This is useful for migrating fields groups between Wp websites."
398
+ msgstr ""
399
+
400
+ #: core/controllers/settings.php:321
401
+ msgid "Select field group(s) from the list and click \"Export XML\""
402
+ msgstr ""
403
+
404
+ #: core/controllers/settings.php:322
405
+ msgid "Save the .xml file when prompted"
406
+ msgstr ""
407
+
408
+ #: core/controllers/settings.php:323
409
+ msgid "Navigate to Tools &raquo; Import and select WordPress"
410
+ msgstr ""
411
+
412
+ #: core/controllers/settings.php:324
413
+ msgid "Install WP import plugin if prompted"
414
+ msgstr ""
415
+
416
+ #: core/controllers/settings.php:325
417
+ msgid "Upload and import your exported .xml file"
418
+ msgstr ""
419
+
420
+ #: core/controllers/settings.php:326
421
+ msgid "Select your user and ignore Import Attachments"
422
+ msgstr ""
423
+
424
+ #: core/controllers/settings.php:327
425
+ msgid "That's it! Happy WordPressing"
426
+ msgstr ""
427
+
428
+ #: core/controllers/settings.php:346
429
+ msgid "Export XML"
430
+ msgstr "Експортувати XML"
431
+
432
+ #: core/controllers/settings.php:353
433
+ msgid "Export Field Groups to PHP"
434
+ msgstr "Експортувати групи полів в код PHP"
435
+
436
+ #: core/controllers/settings.php:354
437
+ msgid "ACF will create the PHP code to include in your theme."
438
+ msgstr ""
439
+
440
+ #: core/controllers/settings.php:357 core/controllers/settings.php:474
441
+ msgid "Register Field Groups"
442
+ msgstr ""
443
+
444
+ #: core/controllers/settings.php:358 core/controllers/settings.php:475
445
+ msgid ""
446
+ "Registered field groups <b>will not</b> appear in the list of editable field "
447
+ "groups. This is useful for including fields in themes."
448
+ msgstr ""
449
+
450
+ #: core/controllers/settings.php:359 core/controllers/settings.php:476
451
+ msgid ""
452
+ "Please note that if you export and register field groups within the same WP, "
453
+ "you will see duplicate fields on your edit screens. To fix this, please move "
454
+ "the origional field group to the trash or remove the code from your "
455
+ "functions.php file."
456
+ msgstr ""
457
+
458
+ #: core/controllers/settings.php:361
459
+ msgid "Select field group(s) from the list and click \"Create PHP\""
460
+ msgstr ""
461
+
462
+ #: core/controllers/settings.php:362 core/controllers/settings.php:478
463
+ msgid "Copy the PHP code generated"
464
+ msgstr "Скопіюйте згенерований код PHP"
465
+
466
+ #: core/controllers/settings.php:363 core/controllers/settings.php:479
467
+ msgid "Paste into your functions.php file"
468
+ msgstr "Вставте у <code>functions.php</code>"
469
+
470
+ #: core/controllers/settings.php:364 core/controllers/settings.php:480
471
+ msgid "To activate any Add-ons, edit and use the code in the first few lines."
472
+ msgstr ""
473
+
474
+ #: core/controllers/settings.php:383
475
+ msgid "Create PHP"
476
+ msgstr "Створити PHP"
477
+
478
+ #: core/controllers/settings.php:469
479
+ msgid "Back to settings"
480
+ msgstr "Повернутися до налаштувань"
481
+
482
+ #: core/controllers/settings.php:504
483
+ msgid ""
484
+ "/**\n"
485
+ " * Activate Add-ons\n"
486
+ " * Here you can enter your activation codes to unlock Add-ons to use in your "
487
+ "theme. \n"
488
+ " * Since all activation codes are multi-site licenses, you are allowed to "
489
+ "include your key in premium themes. \n"
490
+ " * Use the commented out code to update the database with your activation "
491
+ "code. \n"
492
+ " * You may place this code inside an IF statement that only runs on theme "
493
+ "activation.\n"
494
+ " */"
495
+ msgstr ""
496
+
497
+ #: core/controllers/settings.php:519
498
+ msgid ""
499
+ "/**\n"
500
+ " * Register field groups\n"
501
+ " * The register_field_group function accepts 1 array which holds the "
502
+ "relevant data to register a field group\n"
503
+ " * You may edit the array as you see fit. However, this may result in errors "
504
+ "if the array is not compatible with ACF\n"
505
+ " * This code must run every time the functions.php file is read\n"
506
+ " */"
507
+ msgstr ""
508
+
509
+ #: core/controllers/settings.php:558
510
+ msgid "No field groups were selected"
511
+ msgstr ""
512
+
513
+ #: core/controllers/settings.php:608
514
+ msgid "Advanced Custom Fields Settings"
515
+ msgstr "Налаштування груп додаткових полів"
516
+
517
+ #: core/controllers/upgrade.php:51
518
+ msgid "Upgrade"
519
+ msgstr "Оновити"
520
+
521
+ #: core/controllers/upgrade.php:70
522
+ msgid "requires a database upgrade"
523
+ msgstr "потребує оновлення бази даних"
524
+
525
+ #: core/controllers/upgrade.php:70
526
+ msgid "why?"
527
+ msgstr "для чого?"
528
+
529
+ #: core/controllers/upgrade.php:70
530
+ msgid "Please"
531
+ msgstr "Будь ласка,"
532
+
533
+ #: core/controllers/upgrade.php:70
534
+ msgid "backup your database"
535
+ msgstr "створіть резервну копію БД"
536
+
537
+ #: core/controllers/upgrade.php:70
538
+ msgid "then click"
539
+ msgstr "і натискайте цю кнопку"
540
+
541
+ #: core/controllers/upgrade.php:70
542
+ msgid "Upgrade Database"
543
+ msgstr "Оновити базу даних"
544
+
545
+ #: core/controllers/upgrade.php:604
546
+ msgid "Modifying field group options 'show on page'"
547
+ msgstr ""
548
+
549
+ #: core/controllers/upgrade.php:658
550
+ msgid "Modifying field option 'taxonomy'"
551
+ msgstr ""
552
+
553
+ #: core/controllers/upgrade.php:755
554
+ msgid "Moving user custom fields from wp_options to wp_usermeta'"
555
+ msgstr ""
556
+
557
+ #: core/fields/checkbox.php:21
558
+ msgid "Checkbox"
559
+ msgstr ""
560
+
561
+ #: core/fields/checkbox.php:55 core/fields/radio.php:45
562
+ #: core/fields/select.php:54
563
+ msgid "No choices to choose from"
564
+ msgstr ""
565
+
566
+ #: core/fields/checkbox.php:113 core/fields/radio.php:114
567
+ #: core/fields/select.php:174
568
+ msgid "Choices"
569
+ msgstr "Варіанти вибору"
570
+
571
+ #: core/fields/checkbox.php:114 core/fields/radio.php:115
572
+ #: core/fields/select.php:175
573
+ msgid "Enter your choices one per line"
574
+ msgstr "У кожному рядку по варіанту"
575
+
576
+ #: core/fields/checkbox.php:116 core/fields/radio.php:117
577
+ #: core/fields/select.php:177
578
+ msgid "Red"
579
+ msgstr "Червоний"
580
+
581
+ #: core/fields/checkbox.php:117 core/fields/radio.php:118
582
+ #: core/fields/select.php:178
583
+ msgid "Blue"
584
+ msgstr "Синій"
585
+
586
+ #: core/fields/checkbox.php:119 core/fields/radio.php:120
587
+ #: core/fields/select.php:180
588
+ msgid "red : Red"
589
+ msgstr "red : Червоний"
590
+
591
+ #: core/fields/checkbox.php:120 core/fields/radio.php:121
592
+ #: core/fields/select.php:181
593
+ msgid "blue : Blue"
594
+ msgstr "blue : Синій"
595
+
596
+ #: core/fields/color_picker.php:21
597
+ msgid "Color Picker"
598
+ msgstr "Вибір кольору"
599
+
600
+ #: core/fields/color_picker.php:92 core/fields/number.php:65
601
+ #: core/fields/radio.php:130 core/fields/select.php:190
602
+ #: core/fields/text.php:65 core/fields/textarea.php:62
603
+ #: core/fields/wysiwyg.php:81
604
+ msgid "Default Value"
605
+ msgstr "Значення за замовчуванням"
606
+
607
+ #: core/fields/color_picker.php:93
608
+ msgid "eg: #ffffff"
609
+ msgstr ""
610
+
611
+ #: core/fields/date_picker/date_picker.php:21
612
+ msgid "Date Picker"
613
+ msgstr "Вибір дати"
614
+
615
+ #: core/fields/date_picker/date_picker.php:106
616
+ msgid "Save format"
617
+ msgstr "Зберегти формат"
618
+
619
+ #: core/fields/date_picker/date_picker.php:107
620
+ msgid ""
621
+ "This format will determin the value saved to the database and returned via "
622
+ "the API"
623
+ msgstr ""
624
+
625
+ #: core/fields/date_picker/date_picker.php:108
626
+ msgid "\"yymmdd\" is the most versatile save format. Read more about"
627
+ msgstr ""
628
+
629
+ #: core/fields/date_picker/date_picker.php:108
630
+ #: core/fields/date_picker/date_picker.php:118
631
+ #, fuzzy
632
+ msgid "jQuery date formats"
633
+ msgstr "Формат дати"
634
+
635
+ #: core/fields/date_picker/date_picker.php:116
636
+ #, fuzzy
637
+ msgid "Display format"
638
+ msgstr "Формат дати"
639
+
640
+ #: core/fields/date_picker/date_picker.php:117
641
+ msgid "This format will be seen by the user when entering a value"
642
+ msgstr ""
643
+
644
+ #: core/fields/date_picker/date_picker.php:118
645
+ msgid ""
646
+ "\"dd/mm/yy\" or \"mm/dd/yy\" are the most used display formats. Read more "
647
+ "about"
648
+ msgstr ""
649
+
650
+ #: core/fields/file.php:21
651
+ msgid "File"
652
+ msgstr "Файл"
653
+
654
+ #: core/fields/file.php:49
655
+ msgid "File Updated."
656
+ msgstr "Файл оновлено."
657
+
658
+ #: core/fields/file.php:90 core/fields/flexible_content.php:407
659
+ #: core/fields/gallery.php:251 core/fields/gallery.php:281
660
+ #: core/fields/image.php:187 core/fields/repeater.php:356
661
+ #: core/views/meta_box_fields.php:88
662
+ msgid "Edit"
663
+ msgstr "Редагувати"
664
+
665
+ #: core/fields/file.php:91 core/fields/gallery.php:250
666
+ #: core/fields/gallery.php:280 core/fields/image.php:186
667
+ msgid "Remove"
668
+ msgstr "Прибрати"
669
+
670
+ #: core/fields/file.php:196
671
+ msgid "No File Selected"
672
+ msgstr "Файл не обрано"
673
+
674
+ #: core/fields/file.php:196
675
+ msgid "Add File"
676
+ msgstr "Додати файл"
677
+
678
+ #: core/fields/file.php:229 core/fields/image.php:223
679
+ msgid "Return Value"
680
+ msgstr "Повернення значення"
681
+
682
+ #: core/fields/file.php:239
683
+ msgid "File Object"
684
+ msgstr ""
685
+
686
+ #: core/fields/file.php:240
687
+ msgid "File URL"
688
+ msgstr ""
689
+
690
+ #: core/fields/file.php:241
691
+ #, fuzzy
692
+ msgid "File ID"
693
+ msgstr "Файл"
694
+
695
+ #: core/fields/file.php:273 core/fields/image.php:291
696
+ msgid "Media attachment updated."
697
+ msgstr ""
698
+
699
+ #: core/fields/file.php:407
700
+ msgid "No files selected"
701
+ msgstr ""
702
+
703
+ #: core/fields/file.php:502
704
+ msgid "Add Selected Files"
705
+ msgstr ""
706
+
707
+ #: core/fields/file.php:532
708
+ msgid "Select File"
709
+ msgstr "Обрати файл"
710
+
711
+ #: core/fields/file.php:535
712
+ msgid "Update File"
713
+ msgstr "Оновити файл"
714
+
715
+ #: core/fields/flexible_content.php:21
716
+ msgid "Flexible Content"
717
+ msgstr ""
718
+
719
+ #: core/fields/flexible_content.php:38 core/fields/flexible_content.php:286
720
+ msgid "+ Add Row"
721
+ msgstr "+ Додати рядок"
722
+
723
+ #: core/fields/flexible_content.php:313 core/fields/repeater.php:302
724
+ #: core/views/meta_box_fields.php:25
725
+ msgid "New Field"
726
+ msgstr "Нове поле"
727
+
728
+ #: core/fields/flexible_content.php:322 core/fields/radio.php:144
729
+ #: core/fields/repeater.php:523
730
+ msgid "Layout"
731
+ msgstr "Шаблон структури"
732
+
733
+ #: core/fields/flexible_content.php:324
734
+ msgid "Reorder Layout"
735
+ msgstr ""
736
+
737
+ #: core/fields/flexible_content.php:324
738
+ msgid "Reorder"
739
+ msgstr ""
740
+
741
+ #: core/fields/flexible_content.php:325
742
+ msgid "Add New Layout"
743
+ msgstr ""
744
+
745
+ #: core/fields/flexible_content.php:326
746
+ msgid "Delete Layout"
747
+ msgstr ""
748
+
749
+ #: core/fields/flexible_content.php:326 core/fields/flexible_content.php:410
750
+ #: core/fields/repeater.php:359 core/views/meta_box_fields.php:91
751
+ msgid "Delete"
752
+ msgstr "Видалити"
753
+
754
+ #: core/fields/flexible_content.php:336
755
+ msgid "Label"
756
+ msgstr "Назва"
757
+
758
+ #: core/fields/flexible_content.php:346
759
+ msgid "Name"
760
+ msgstr "Назва"
761
+
762
+ #: core/fields/flexible_content.php:356
763
+ msgid "Display"
764
+ msgstr "Таблиця"
765
+
766
+ #: core/fields/flexible_content.php:363
767
+ msgid "Table"
768
+ msgstr "Таблиця"
769
+
770
+ #: core/fields/flexible_content.php:364 core/fields/repeater.php:534
771
+ msgid "Row"
772
+ msgstr "Рядок"
773
+
774
+ #: core/fields/flexible_content.php:377 core/fields/repeater.php:327
775
+ #: core/views/meta_box_fields.php:60
776
+ msgid "Field Order"
777
+ msgstr "Порядок полів"
778
+
779
+ #: core/fields/flexible_content.php:378 core/fields/flexible_content.php:425
780
+ #: core/fields/repeater.php:328 core/fields/repeater.php:375
781
+ #: core/views/meta_box_fields.php:61 core/views/meta_box_fields.php:107
782
+ msgid "Field Label"
783
+ msgstr "Назва поля"
784
+
785
+ #: core/fields/flexible_content.php:379 core/fields/flexible_content.php:441
786
+ #: core/fields/repeater.php:329 core/fields/repeater.php:391
787
+ #: core/views/meta_box_fields.php:62 core/views/meta_box_fields.php:123
788
+ msgid "Field Name"
789
+ msgstr "Машинна назва поля"
790
+
791
+ #: core/fields/flexible_content.php:388 core/fields/repeater.php:338
792
+ #, fuzzy
793
+ msgid ""
794
+ "No fields. Click the \"+ Add Sub Field button\" to create your first field."
795
+ msgstr ""
796
+ "Ще немає полів. Click the \"+ Add Sub Field button\" to create your first "
797
+ "field."
798
+
799
+ #: core/fields/flexible_content.php:404 core/fields/flexible_content.php:407
800
+ #: core/fields/repeater.php:353 core/fields/repeater.php:356
801
+ #: core/views/meta_box_fields.php:85 core/views/meta_box_fields.php:88
802
+ msgid "Edit this Field"
803
+ msgstr "Редагувати це поле"
804
+
805
+ #: core/fields/flexible_content.php:408 core/fields/repeater.php:357
806
+ #: core/views/meta_box_fields.php:89
807
+ msgid "Read documentation for this field"
808
+ msgstr "Прочитати документацію про це поле"
809
+
810
+ #: core/fields/flexible_content.php:408 core/fields/repeater.php:357
811
+ #: core/views/meta_box_fields.php:89
812
+ msgid "Docs"
813
+ msgstr "Документація"
814
+
815
+ #: core/fields/flexible_content.php:409 core/fields/repeater.php:358
816
+ #: core/views/meta_box_fields.php:90
817
+ msgid "Duplicate this Field"
818
+ msgstr "Дублювати це поле"
819
+
820
+ #: core/fields/flexible_content.php:409 core/fields/repeater.php:358
821
+ #: core/views/meta_box_fields.php:90
822
+ msgid "Duplicate"
823
+ msgstr "Дублювати"
824
+
825
+ #: core/fields/flexible_content.php:410 core/fields/repeater.php:359
826
+ #: core/views/meta_box_fields.php:91
827
+ msgid "Delete this Field"
828
+ msgstr "Видалити це поле"
829
+
830
+ #: core/fields/flexible_content.php:426 core/fields/repeater.php:376
831
+ #: core/views/meta_box_fields.php:108
832
+ msgid "This is the name which will appear on the EDIT page"
833
+ msgstr "Ця назва відображується на сторінці редагування"
834
+
835
+ #: core/fields/flexible_content.php:442 core/fields/repeater.php:392
836
+ #: core/views/meta_box_fields.php:124
837
+ msgid "Single word, no spaces. Underscores and dashes allowed"
838
+ msgstr "Одне слово, без пробілів. Можете використовувати нижнє підкреслення."
839
+
840
+ #: core/fields/flexible_content.php:476 core/fields/repeater.php:467
841
+ msgid "Save Field"
842
+ msgstr "Зберегти поле"
843
+
844
+ #: core/fields/flexible_content.php:481 core/fields/repeater.php:472
845
+ #: core/views/meta_box_fields.php:190
846
+ msgid "Close Field"
847
+ msgstr "Закрити поле"
848
+
849
+ #: core/fields/flexible_content.php:481 core/fields/repeater.php:472
850
+ msgid "Close Sub Field"
851
+ msgstr "Закрити дочірнє поле"
852
+
853
+ #: core/fields/flexible_content.php:495 core/fields/repeater.php:487
854
+ #: core/views/meta_box_fields.php:203
855
+ msgid "Drag and drop to reorder"
856
+ msgstr "Поля можна перетягувати"
857
+
858
+ #: core/fields/flexible_content.php:496 core/fields/repeater.php:488
859
+ msgid "+ Add Sub Field"
860
+ msgstr "+ Додати дочірнє поле"
861
+
862
+ #: core/fields/flexible_content.php:503 core/fields/repeater.php:542
863
+ msgid "Button Label"
864
+ msgstr "Текст для кнопки"
865
+
866
+ #: core/fields/gallery.php:25
867
+ msgid "Gallery"
868
+ msgstr "Галерея"
869
+
870
+ #: core/fields/gallery.php:70 core/fields/gallery.php:233
871
+ msgid "Alternate Text"
872
+ msgstr "Альтернативний текст"
873
+
874
+ #: core/fields/gallery.php:74 core/fields/gallery.php:237
875
+ msgid "Caption"
876
+ msgstr "Підпис"
877
+
878
+ #: core/fields/gallery.php:78 core/fields/gallery.php:241
879
+ msgid "Description"
880
+ msgstr "Опис"
881
+
882
+ #: core/fields/gallery.php:117 core/fields/image.php:243
883
+ msgid "Preview Size"
884
+ msgstr "Розмір мініатюр"
885
+
886
+ #: core/fields/gallery.php:118
887
+ msgid "Thumbnail is advised"
888
+ msgstr ""
889
+
890
+ #: core/fields/gallery.php:179
891
+ msgid "Image Updated"
892
+ msgstr "Зображення оновлено"
893
+
894
+ #: core/fields/gallery.php:262 core/fields/gallery.php:669
895
+ #: core/fields/image.php:193
896
+ msgid "Add Image"
897
+ msgstr "Додати зображення"
898
+
899
+ #: core/fields/gallery.php:263
900
+ msgid "Grid"
901
+ msgstr "Плитка"
902
+
903
+ #: core/fields/gallery.php:264
904
+ msgid "List"
905
+ msgstr "Список"
906
+
907
+ #: core/fields/gallery.php:266 core/fields/image.php:429
908
+ msgid "No images selected"
909
+ msgstr ""
910
+
911
+ #: core/fields/gallery.php:266
912
+ msgid "1 image selected"
913
+ msgstr ""
914
+
915
+ #: core/fields/gallery.php:266
916
+ msgid "{count} images selected"
917
+ msgstr ""
918
+
919
+ #: core/fields/gallery.php:591
920
+ msgid "Added"
921
+ msgstr "Додано"
922
+
923
+ #: core/fields/gallery.php:611
924
+ msgid "Image already exists in gallery"
925
+ msgstr ""
926
+
927
+ #: core/fields/gallery.php:617
928
+ msgid "Image Added"
929
+ msgstr "Зображення додано"
930
+
931
+ #: core/fields/gallery.php:672 core/fields/image.php:557
932
+ msgid "Update Image"
933
+ msgstr "Оновити зображення"
934
+
935
+ #: core/fields/image.php:21
936
+ msgid "Image"
937
+ msgstr "Зображення"
938
+
939
+ #: core/fields/image.php:49
940
+ msgid "Image Updated."
941
+ msgstr "Зображення оновлено."
942
+
943
+ #: core/fields/image.php:193
944
+ msgid "No image selected"
945
+ msgstr "Зображення не обрано"
946
+
947
+ #: core/fields/image.php:233
948
+ msgid "Image Object"
949
+ msgstr ""
950
+
951
+ #: core/fields/image.php:234
952
+ msgid "Image URL"
953
+ msgstr ""
954
+
955
+ #: core/fields/image.php:235
956
+ msgid "Image ID"
957
+ msgstr ""
958
+
959
+ #: core/fields/image.php:525
960
+ msgid "Add selected Images"
961
+ msgstr "Додати обрані зображення"
962
+
963
+ #: core/fields/image.php:554
964
+ msgid "Select Image"
965
+ msgstr "Обрати зображення"
966
+
967
+ #: core/fields/number.php:21
968
+ msgid "Number"
969
+ msgstr ""
970
+
971
+ #: core/fields/page_link.php:21
972
+ msgid "Page Link"
973
+ msgstr ""
974
+
975
+ #: core/fields/page_link.php:70 core/fields/post_object.php:217
976
+ #: core/fields/relationship.php:386 core/views/meta_box_location.php:48
977
+ msgid "Post Type"
978
+ msgstr "Тип матеріалу"
979
+
980
+ #: core/fields/page_link.php:98 core/fields/post_object.php:268
981
+ #: core/fields/select.php:204
982
+ msgid "Allow Null?"
983
+ msgstr ""
984
+
985
+ #: core/fields/page_link.php:107 core/fields/page_link.php:126
986
+ #: core/fields/post_object.php:277 core/fields/post_object.php:296
987
+ #: core/fields/select.php:213 core/fields/select.php:232
988
+ #: core/fields/wysiwyg.php:124 core/fields/wysiwyg.php:145
989
+ #: core/views/meta_box_fields.php:172
990
+ msgid "Yes"
991
+ msgstr "Так"
992
+
993
+ #: core/fields/page_link.php:108 core/fields/page_link.php:127
994
+ #: core/fields/post_object.php:278 core/fields/post_object.php:297
995
+ #: core/fields/select.php:214 core/fields/select.php:233
996
+ #: core/fields/wysiwyg.php:125 core/fields/wysiwyg.php:146
997
+ #: core/views/meta_box_fields.php:173
998
+ msgid "No"
999
+ msgstr "Ні"
1000
+
1001
+ #: core/fields/page_link.php:117 core/fields/post_object.php:287
1002
+ #: core/fields/select.php:223
1003
+ msgid "Select multiple values?"
1004
+ msgstr "Дозволити множинний вибір?"
1005
+
1006
+ #: core/fields/post_object.php:21
1007
+ msgid "Post Object"
1008
+ msgstr ""
1009
+
1010
+ #: core/fields/post_object.php:245 core/fields/relationship.php:415
1011
+ msgid "Filter from Taxonomy"
1012
+ msgstr ""
1013
+
1014
+ #: core/fields/radio.php:21
1015
+ msgid "Radio Button"
1016
+ msgstr ""
1017
+
1018
+ #: core/fields/radio.php:154
1019
+ msgid "Vertical"
1020
+ msgstr "Вертикально"
1021
+
1022
+ #: core/fields/radio.php:155
1023
+ msgid "Horizontal"
1024
+ msgstr "Горизонтально"
1025
+
1026
+ #: core/fields/relationship.php:21
1027
+ msgid "Relationship"
1028
+ msgstr ""
1029
+
1030
+ #: core/fields/relationship.php:288
1031
+ msgid "Search"
1032
+ msgstr "Пошук"
1033
+
1034
+ #: core/fields/relationship.php:438
1035
+ msgid "Maximum posts"
1036
+ msgstr ""
1037
+
1038
+ #: core/fields/repeater.php:21
1039
+ msgid "Repeater"
1040
+ msgstr ""
1041
+
1042
+ #: core/fields/repeater.php:66 core/fields/repeater.php:289
1043
+ msgid "Add Row"
1044
+ msgstr "Додати рядок"
1045
+
1046
+ #: core/fields/repeater.php:319
1047
+ msgid "Repeater Fields"
1048
+ msgstr ""
1049
+
1050
+ #: core/fields/repeater.php:420 core/views/meta_box_fields.php:151
1051
+ msgid "Field Instructions"
1052
+ msgstr "Опис поля"
1053
+
1054
+ #: core/fields/repeater.php:440
1055
+ msgid "Column Width"
1056
+ msgstr "Ширина колонки"
1057
+
1058
+ #: core/fields/repeater.php:441
1059
+ msgid "Leave blank for auto"
1060
+ msgstr ""
1061
+
1062
+ #: core/fields/repeater.php:495
1063
+ msgid "Minimum Rows"
1064
+ msgstr "Мінімум рядків"
1065
+
1066
+ #: core/fields/repeater.php:509
1067
+ msgid "Maximum Rows"
1068
+ msgstr "Максимум рядків"
1069
+
1070
+ #: core/fields/repeater.php:533
1071
+ msgid "Table (default)"
1072
+ msgstr "Таблиця (за замовчуванням)"
1073
+
1074
+ #: core/fields/select.php:21
1075
+ msgid "Select"
1076
+ msgstr ""
1077
+
1078
+ #: core/fields/text.php:21
1079
+ msgid "Text"
1080
+ msgstr "Текст"
1081
+
1082
+ #: core/fields/text.php:79 core/fields/textarea.php:76
1083
+ msgid "Formatting"
1084
+ msgstr "Форматування"
1085
+
1086
+ #: core/fields/text.php:80
1087
+ msgid "Define how to render html tags"
1088
+ msgstr "Оберіть спосіб обробки теґів html"
1089
+
1090
+ #: core/fields/text.php:89 core/fields/textarea.php:86
1091
+ msgid "None"
1092
+ msgstr ""
1093
+
1094
+ #: core/fields/text.php:90 core/fields/textarea.php:88
1095
+ msgid "HTML"
1096
+ msgstr ""
1097
+
1098
+ #: core/fields/textarea.php:21
1099
+ msgid "Text Area"
1100
+ msgstr "Багаторядкове текстове поле"
1101
+
1102
+ #: core/fields/textarea.php:77
1103
+ msgid "Define how to render html tags / new lines"
1104
+ msgstr "Оберіть спосіб обробки теґів html та переносу рядків"
1105
+
1106
+ #: core/fields/textarea.php:87
1107
+ msgid "auto &lt;br /&gt;"
1108
+ msgstr "автоматичне перенесення рядків (додається теґ &lt;br&gt;)"
1109
+
1110
+ #: core/fields/true_false.php:21
1111
+ msgid "True / False"
1112
+ msgstr "Так / Ні"
1113
+
1114
+ #: core/fields/true_false.php:68
1115
+ msgid "Message"
1116
+ msgstr "Повідомлення"
1117
+
1118
+ #: core/fields/true_false.php:69
1119
+ msgid "eg. Show extra content"
1120
+ msgstr ""
1121
+
1122
+ #: core/fields/wysiwyg.php:21
1123
+ msgid "Wysiwyg Editor"
1124
+ msgstr "Візуальний редактор"
1125
+
1126
+ #: core/fields/wysiwyg.php:95
1127
+ msgid "Toolbar"
1128
+ msgstr ""
1129
+
1130
+ #: core/fields/wysiwyg.php:106 core/views/meta_box_location.php:47
1131
+ msgid "Basic"
1132
+ msgstr "Загальне"
1133
+
1134
+ #: core/fields/wysiwyg.php:114
1135
+ msgid "Show Media Upload Buttons?"
1136
+ msgstr "Показувати кнопки завантаження файлів?"
1137
+
1138
+ #: core/fields/wysiwyg.php:133
1139
+ msgid "Run filter \"the_content\"?"
1140
+ msgstr "Застосовувати фільтр «the_content»?"
1141
+
1142
+ #: core/fields/wysiwyg.php:134
1143
+ msgid "Enable this filter to use shortcodes within the WYSIWYG field"
1144
+ msgstr ""
1145
+
1146
+ #: core/fields/wysiwyg.php:135
1147
+ msgid ""
1148
+ "Disable this filter if you encounter recursive template problems with "
1149
+ "plugins / themes"
1150
+ msgstr ""
1151
+
1152
+ #: core/views/meta_box_fields.php:26
1153
+ msgid "new_field"
1154
+ msgstr ""
1155
+
1156
+ #: core/views/meta_box_fields.php:47
1157
+ msgid "Move to trash. Are you sure?"
1158
+ msgstr "Перемістити в кошик. Ви впевнені?"
1159
+
1160
+ #: core/views/meta_box_fields.php:64
1161
+ #, fuzzy
1162
+ msgid "Field Key"
1163
+ msgstr "Тип поля"
1164
+
1165
+ #: core/views/meta_box_fields.php:74
1166
+ msgid ""
1167
+ "No fields. Click the <strong>+ Add Field</strong> button to create your "
1168
+ "first field."
1169
+ msgstr ""
1170
+ "Ще немає полів. Для створення полів натисніть <strong>+ Додати поле</strong>."
1171
+
1172
+ #: core/views/meta_box_fields.php:152
1173
+ msgid "Instructions for authors. Shown when submitting data"
1174
+ msgstr "Напишіть короткий опис для поля"
1175
+
1176
+ #: core/views/meta_box_fields.php:164
1177
+ msgid "Required?"
1178
+ msgstr "Обов’язкове?"
1179
+
1180
+ #: core/views/meta_box_fields.php:204
1181
+ msgid "+ Add Field"
1182
+ msgstr "+ Додати поле"
1183
+
1184
+ #: core/views/meta_box_location.php:35
1185
+ msgid "Rules"
1186
+ msgstr "Правила"
1187
+
1188
+ #: core/views/meta_box_location.php:36
1189
+ msgid ""
1190
+ "Create a set of rules to determine which edit screens will use these "
1191
+ "advanced custom fields"
1192
+ msgstr ""
1193
+ "Створіть набір правил, щоб визначити де використовувати ці додаткові поля"
1194
+
1195
+ #: core/views/meta_box_location.php:49
1196
+ msgid "Logged in User Type"
1197
+ msgstr "Роль залоґованого користувача"
1198
+
1199
+ #: core/views/meta_box_location.php:51
1200
+ msgid "Page Specific"
1201
+ msgstr "Сторінки"
1202
+
1203
+ #: core/views/meta_box_location.php:52
1204
+ msgid "Page"
1205
+ msgstr "Сторінка"
1206
+
1207
+ #: core/views/meta_box_location.php:53
1208
+ msgid "Page Type"
1209
+ msgstr "Тип сторінки"
1210
+
1211
+ #: core/views/meta_box_location.php:54
1212
+ msgid "Page Parent"
1213
+ msgstr "Батьківська сторінка"
1214
+
1215
+ #: core/views/meta_box_location.php:55
1216
+ msgid "Page Template"
1217
+ msgstr "Шаблон сторінки"
1218
+
1219
+ #: core/views/meta_box_location.php:57
1220
+ msgid "Post Specific"
1221
+ msgstr "Публікації"
1222
+
1223
+ #: core/views/meta_box_location.php:58
1224
+ msgid "Post"
1225
+ msgstr "Публікація"
1226
+
1227
+ #: core/views/meta_box_location.php:59
1228
+ msgid "Post Category"
1229
+ msgstr "Категорія"
1230
+
1231
+ #: core/views/meta_box_location.php:60
1232
+ msgid "Post Format"
1233
+ msgstr "Формат"
1234
+
1235
+ #: core/views/meta_box_location.php:61
1236
+ msgid "Post Taxonomy"
1237
+ msgstr "Таксономія"
1238
+
1239
+ #: core/views/meta_box_location.php:63
1240
+ msgid "Other"
1241
+ msgstr "Інше"
1242
+
1243
+ #: core/views/meta_box_location.php:64
1244
+ msgid "Taxonomy (Add / Edit)"
1245
+ msgstr "Тип таксономії (Додати / Редагувати)"
1246
+
1247
+ #: core/views/meta_box_location.php:65
1248
+ msgid "User (Add / Edit)"
1249
+ msgstr "Роль користувача (Додати / Редагувати)"
1250
+
1251
+ #: core/views/meta_box_location.php:66
1252
+ msgid "Media (Edit)"
1253
+ msgstr "Медіафайл (Редагувати)"
1254
+
1255
+ #: core/views/meta_box_location.php:96
1256
+ msgid "is equal to"
1257
+ msgstr "дорівнює"
1258
+
1259
+ #: core/views/meta_box_location.php:97
1260
+ msgid "is not equal to"
1261
+ msgstr "не дорівнює"
1262
+
1263
+ #: core/views/meta_box_location.php:121
1264
+ msgid "match"
1265
+ msgstr "має співпадати"
1266
+
1267
+ #: core/views/meta_box_location.php:127
1268
+ msgid "all"
1269
+ msgstr "все"
1270
+
1271
+ #: core/views/meta_box_location.php:128
1272
+ msgid "any"
1273
+ msgstr "будь що"
1274
+
1275
+ #: core/views/meta_box_location.php:131
1276
+ msgid "of the above"
1277
+ msgstr "з вищевказаних умов"
1278
+
1279
+ #: core/views/meta_box_location.php:144
1280
+ msgid "Unlock options add-on with an activation code"
1281
+ msgstr ""
1282
+
1283
+ #: core/views/meta_box_options.php:23
1284
+ msgid "Order No."
1285
+ msgstr "Порядок розташування"
1286
+
1287
+ #: core/views/meta_box_options.php:24
1288
+ #, fuzzy
1289
+ msgid "Field groups are created in order <br />from lowest to highest"
1290
+ msgstr "Чим менше число — тим вище розташування"
1291
+
1292
+ #: core/views/meta_box_options.php:40
1293
+ msgid "Position"
1294
+ msgstr "Розташування"
1295
+
1296
+ #: core/views/meta_box_options.php:60
1297
+ msgid "Style"
1298
+ msgstr "Стиль"
1299
+
1300
+ #: core/views/meta_box_options.php:80
1301
+ msgid "Hide on screen"
1302
+ msgstr "Ховати на екрані"
1303
+
1304
+ #: core/views/meta_box_options.php:81
1305
+ msgid "<b>Select</b> items to <b>hide</b> them from the edit screen"
1306
+ msgstr "<b>Оберіть</b> що <b>ховати</b> з екрану редагування/створення"
1307
+
1308
+ #: core/views/meta_box_options.php:82
1309
+ msgid ""
1310
+ "If multiple field groups appear on an edit screen, the first field group's "
1311
+ "options will be used. (the one with the lowest order number)"
1312
+ msgstr ""
1313
+
1314
+ #: core/views/meta_box_options.php:92
1315
+ msgid "Content Editor"
1316
+ msgstr "Редактор матеріалу"
1317
+
1318
+ #: core/views/meta_box_options.php:93
1319
+ msgid "Excerpt"
1320
+ msgstr "Витяг"
1321
+
1322
+ #: core/views/meta_box_options.php:95
1323
+ msgid "Discussion"
1324
+ msgstr ""
1325
+
1326
+ #: core/views/meta_box_options.php:96
1327
+ msgid "Comments"
1328
+ msgstr "Коментарі"
1329
+
1330
+ #: core/views/meta_box_options.php:97
1331
+ msgid "Revisions"
1332
+ msgstr "Ревізії"
1333
+
1334
+ #: core/views/meta_box_options.php:98
1335
+ msgid "Slug"
1336
+ msgstr ""
1337
+
1338
+ #: core/views/meta_box_options.php:99
1339
+ msgid "Author"
1340
+ msgstr "Автор"
1341
+
1342
+ #: core/views/meta_box_options.php:100
1343
+ msgid "Format"
1344
+ msgstr "Формат"
1345
+
1346
+ #: core/views/meta_box_options.php:101
1347
+ msgid "Featured Image"
1348
+ msgstr "Головне зображення"
1349
+
1350
+ #~ msgid "Add Fields to Edit Screens"
1351
+ #~ msgstr "Додайте поля на сторінку редагування вмісту"
1352
+
1353
+ #~ msgid "Customise the edit page"
1354
+ #~ msgstr "Налаштуйте сторінку створення вмісту"
1355
+
1356
+ #, fuzzy
1357
+ #~ msgid "eg. dd/mm/yy. read more about"
1358
+ #~ msgstr "Напр. dd/mm/yy. read more about"
readme.txt CHANGED
@@ -87,6 +87,25 @@ http://support.advancedcustomfields.com/
87
 
88
  == Changelog ==
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  = 3.5.2 =
91
  * Security update
92
 
87
 
88
  == Changelog ==
89
 
90
+ = 3.5.3.1 =
91
+ * Minor bug fixes for 3.5.3
92
+
93
+ = 3.5.3 =
94
+ * [Updated] Update / overhaul flexible content field UI
95
+ * [Added] Add Show / Hide for flexible content layouts
96
+ * [Added] Add column width for flexible content - http://support.advancedcustomfields.com/discussion/3382/percentage-widths-on-fc-fields
97
+ * [Added] Add instructions for flexible content sub fields
98
+ * [Added] Add new parameter to get_field to allow for no formatting - http://support.advancedcustomfields.com/discussion/3188/update_field-repeater
99
+ * [Fixed] Fix compatibility issue with post type switcher plugin - http://support.advancedcustomfields.com/discussion/3493/field-group-changes-to-post-when-i-save
100
+ * [Added] Add new location rules for "Front Page" "Post Page" - http://support.advancedcustomfields.com/discussion/3485/groups-association-whit-page-slug-instead-of-id
101
+ * [Fixed] Fix flexible content + repeater row limit bug - http://support.advancedcustomfields.com/discussion/3557/repeater-fields-inside-flexible-field-on-backend-not-visible-before-first-savingpublishing
102
+ * [Added] Add filter "acf_load_value" for values - http://support.advancedcustomfields.com/discussion/3725/a-filter-for-get_field
103
+ * [Fixed] Fix choices backslash issue - http://support.advancedcustomfields.com/discussion/3796/backslash-simple-quote-bug-in-radio-button-values-fields
104
+ * [Updated] acf_options_page_title now overrides the menu and title. If your field groups are not showing after update, please re-save them to update the location rules.
105
+ * [Updated] Update location rules to show all post types in page / page_parent / post
106
+ * [Added] Change all "pre_save_field" functions to "acf_save_field" hooks
107
+ * [Improved] Improve general CSS / JS
108
+
109
  = 3.5.2 =
110
  * Security update
111