Advanced Custom Fields - Version 1.1.3

Version Description

  • Image Field now uses WP thickbox!
  • File Field now uses WP thickbox!
  • Page Link now supports multiple select
  • All Text has been wrapped in the e() / _() functions to support translations!
  • Small bug fixes / housekeeping
  • Added ACF_WP_Query API function
Download this release

Release Info

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

Code changes from version 1.1.2 to 1.1.3

acf.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Advanced Custom Fields
4
  Plugin URI: http://plugins.elliotcondon.com/advanced-custom-fields/
5
  Description: Completely Customise your edit pages with an assortment of field types: Wysiwyg, text, image, select, checkbox and more! Hide unwanted metaboxes and assign to any edit page!
6
- Version: 1.1.2
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
@@ -33,7 +33,7 @@ class Acf
33
  $this->dir = plugins_url('',__FILE__);
34
  $this->siteurl = get_bloginfo('url');
35
  $this->wpadminurl = admin_url();
36
- $this->version = '1.1.2';
37
 
38
  // set text domain
39
  load_plugin_textdomain('acf', false, $this->path.'/lang' );
@@ -89,7 +89,7 @@ class Acf
89
  $parts = Explode('/', $currentFile);
90
  $currentFile = $parts[count($parts) - 1];
91
 
92
- if($currentFile == 'edit.php')
93
  {
94
  wp_enqueue_script('thickbox');
95
  }
@@ -101,7 +101,7 @@ class Acf
101
  $parts = Explode('/', $currentFile);
102
  $currentFile = $parts[count($parts) - 1];
103
 
104
- if($currentFile == 'edit.php')
105
  {
106
  wp_enqueue_style('thickbox');
107
  }
@@ -174,7 +174,7 @@ class Acf
174
 
175
  // remove acf menu item
176
  global $menu;
177
- $restricted = array('Advanced Custom Fields');
178
  end ($menu);
179
  while (prev($menu)){
180
  $value = explode(' ',$menu[key($menu)][0]);
@@ -235,8 +235,8 @@ class Acf
235
  $array['text'] = new Text();
236
  $array['textarea'] = new Textarea();
237
  $array['wysiwyg'] = new Wysiwyg();
238
- $array['image'] = new Image($this->dir);
239
- $array['file'] = new File($this->dir);
240
  $array['select'] = new Select($this);
241
  $array['checkbox'] = new Checkbox();
242
  $array['true_false'] = new True_false();
@@ -259,7 +259,7 @@ class Acf
259
  {
260
  if(!is_object($this->fields[$field->type]))
261
  {
262
- echo 'error: Field Type does not exist!';
263
  return false;
264
  }
265
 
@@ -277,7 +277,7 @@ class Acf
277
  {
278
  if(!$this->fields[$options['field_type']])
279
  {
280
- echo 'error: Field Type does not exist!';
281
  return false;
282
  }
283
 
3
  Plugin Name: Advanced Custom Fields
4
  Plugin URI: http://plugins.elliotcondon.com/advanced-custom-fields/
5
  Description: Completely Customise your edit pages with an assortment of field types: Wysiwyg, text, image, select, checkbox and more! Hide unwanted metaboxes and assign to any edit page!
6
+ Version: 1.1.3
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
33
  $this->dir = plugins_url('',__FILE__);
34
  $this->siteurl = get_bloginfo('url');
35
  $this->wpadminurl = admin_url();
36
+ $this->version = '1.1.3';
37
 
38
  // set text domain
39
  load_plugin_textdomain('acf', false, $this->path.'/lang' );
89
  $parts = Explode('/', $currentFile);
90
  $currentFile = $parts[count($parts) - 1];
91
 
92
+ if($currentFile == 'edit.php' && $_GET['post_type'] == 'acf')
93
  {
94
  wp_enqueue_script('thickbox');
95
  }
101
  $parts = Explode('/', $currentFile);
102
  $currentFile = $parts[count($parts) - 1];
103
 
104
+ if($currentFile == 'edit.php' && $_GET['post_type'] == 'acf')
105
  {
106
  wp_enqueue_style('thickbox');
107
  }
174
 
175
  // remove acf menu item
176
  global $menu;
177
+ $restricted = array(__('Advanced Custom Fields','acf'));
178
  end ($menu);
179
  while (prev($menu)){
180
  $value = explode(' ',$menu[key($menu)][0]);
235
  $array['text'] = new Text();
236
  $array['textarea'] = new Textarea();
237
  $array['wysiwyg'] = new Wysiwyg();
238
+ $array['image'] = new Image();
239
+ $array['file'] = new File();
240
  $array['select'] = new Select($this);
241
  $array['checkbox'] = new Checkbox();
242
  $array['true_false'] = new True_false();
259
  {
260
  if(!is_object($this->fields[$field->type]))
261
  {
262
+ _e('Error: Field Type does not exist!','acf');
263
  return false;
264
  }
265
 
277
  {
278
  if(!$this->fields[$options['field_type']])
279
  {
280
+ _e('Error: Field Type does not exist!','acf');
281
  return false;
282
  }
283
 
core/api.php CHANGED
@@ -90,6 +90,11 @@ function get_acf($post_id = false)
90
 
91
  foreach($variables as $key => $value)
92
  {
 
 
 
 
 
93
  $object->$key = $value;
94
  }
95
 
@@ -141,4 +146,82 @@ function the_field($field_name, $post_id = false)
141
  echo get_field($field_name, $post_id);
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  ?>
90
 
91
  foreach($variables as $key => $value)
92
  {
93
+ if (empty($key))
94
+ {
95
+ continue;
96
+ }
97
+
98
  $object->$key = $value;
99
  }
100
 
146
  echo get_field($field_name, $post_id);
147
  }
148
 
149
+ /*---------------------------------------------------------------------------------------------
150
+ * ACF_WP_Query
151
+ *
152
+ * @author Elliot Condon
153
+ * @since 1.1.3
154
+ *
155
+ ---------------------------------------------------------------------------------------------*/
156
+ class ACF_WP_Query extends WP_Query
157
+ {
158
+ var $orderby_field;
159
+ var $order;
160
+ var $orderby_type;
161
+
162
+ function __construct($args=array())
163
+ {
164
+ // set default variabls
165
+ $this->orderby_field = '';
166
+ $this->order = 'ASC';
167
+ $this->orderby_type = 'string';
168
+
169
+
170
+ // set order
171
+ if(!empty($args['order']))
172
+ {
173
+ $this->order = $args['order'];
174
+ }
175
+
176
+
177
+ // set value type
178
+ if(!empty($args['orderby_type']))
179
+ {
180
+ $this->orderby_type = $args['orderby_type'];
181
+ }
182
+
183
+
184
+ if(!empty($args['orderby_field']))
185
+ {
186
+ $this->orderby_field = $args['orderby_field'];
187
+
188
+ add_filter('posts_join', array($this, 'posts_join'));
189
+ add_filter('posts_where', array($this, 'posts_where'));
190
+ add_filter('posts_orderby', array($this, 'posts_orderby'));
191
+ }
192
+
193
+ parent::query($args);
194
+ }
195
+
196
+ function posts_join($join)
197
+ {
198
+ $join .= "LEFT JOIN wp_acf_values v ON v.post_id=wp_posts.ID
199
+ LEFT JOIN wp_acf_fields f ON f.id=v.field_id";
200
+
201
+ return $join;
202
+ }
203
+
204
+ function posts_where($where)
205
+ {
206
+ $where .= "AND f.name = '".$this->orderby_field."'";
207
+ return $where;
208
+ }
209
+
210
+ function posts_orderby($orderby)
211
+ {
212
+
213
+ if($this->orderby_type == 'int')
214
+ {
215
+ $orderby = "ABS(v.value) ".$this->order;
216
+ }
217
+ else
218
+ {
219
+ $orderby = "v.value ".$this->order;
220
+ }
221
+
222
+
223
+ return $orderby;
224
+ }
225
+ }
226
+
227
  ?>
core/fields/checkbox.php CHANGED
@@ -8,7 +8,7 @@ class Checkbox
8
  function Checkbox()
9
  {
10
  $this->name = 'checkbox';
11
- $this->title = 'Checkbox';
12
  }
13
 
14
  function html($field)
@@ -67,14 +67,14 @@ class Checkbox
67
  <table class="acf_input">
68
  <tr>
69
  <td class="label">
70
- <label for="">Choices</label>
71
  </td>
72
  <td>
73
  <textarea rows="5" name="acf[fields][<?php echo $key; ?>][options][choices]" id=""><?php echo $options['choices']; ?></textarea>
74
- <p class="description">Enter your choices one per line. eg:<br />
75
  option_1 : Option 1<br />
76
  option_3 : Option 2<br />
77
- option_3 : Option 3</p>
78
  </td>
79
  </tr>
80
  </table>
8
  function Checkbox()
9
  {
10
  $this->name = 'checkbox';
11
+ $this->title = __('Checkbox','acf');
12
  }
13
 
14
  function html($field)
67
  <table class="acf_input">
68
  <tr>
69
  <td class="label">
70
+ <label for=""><?php _e("Choices",'acf');_e("",'acf') ?></label>
71
  </td>
72
  <td>
73
  <textarea rows="5" name="acf[fields][<?php echo $key; ?>][options][choices]" id=""><?php echo $options['choices']; ?></textarea>
74
+ <p class="description"><?php _e("Enter your choices one per line. eg:<br />
75
  option_1 : Option 1<br />
76
  option_3 : Option 2<br />
77
+ option_3 : Option 3",'acf'); ?></p>
78
  </td>
79
  </tr>
80
  </table>
core/fields/date_picker/date_picker.php CHANGED
@@ -9,7 +9,7 @@ class Date_picker
9
  function Date_picker($plugin_dir)
10
  {
11
  $this->name = 'date_picker';
12
- $this->title = 'Date Picker';
13
  $this->plugin_dir = $plugin_dir;
14
  }
15
 
@@ -28,11 +28,11 @@ class Date_picker
28
  <table class="acf_input">
29
  <tr>
30
  <td class="label">
31
- <label for="">Date format</label>
32
  </td>
33
  <td>
34
  <input type="text" name="acf[fields][<?php echo $key; ?>][options][date_format]" id="" value="<?php echo $options['date_format']; ?>" />
35
- <p class="description">eg. dd/mm/yy. read more about <a href="http://docs.jquery.com/UI/Datepicker/formatDate">formatDate</a></p>
36
  </td>
37
  </tr>
38
  </table>
9
  function Date_picker($plugin_dir)
10
  {
11
  $this->name = 'date_picker';
12
+ $this->title = __('Date Picker','acf');
13
  $this->plugin_dir = $plugin_dir;
14
  }
15
 
28
  <table class="acf_input">
29
  <tr>
30
  <td class="label">
31
+ <label for=""><?php _e("Date format",'acf'); ?></label>
32
  </td>
33
  <td>
34
  <input type="text" name="acf[fields][<?php echo $key; ?>][options][date_format]" id="" value="<?php echo $options['date_format']; ?>" />
35
+ <p class="description"><?php _e("eg. dd/mm/yy. read more about",'acf'); ?> <a href="http://docs.jquery.com/UI/Datepicker/formatDate">formatDate</a></p>
36
  </td>
37
  </tr>
38
  </table>
core/fields/file.php CHANGED
@@ -4,37 +4,79 @@ class File
4
  {
5
  var $name;
6
  var $title;
7
- var $plugin_dir;
8
 
9
- function File($plugin_dir)
10
  {
11
  $this->name = 'file';
12
- $this->title = 'File';
13
- $this->plugin_dir = $plugin_dir;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
 
 
16
  function html($field)
17
  {
18
- echo '<div class="acf_file_uploader">';
 
 
19
 
20
  if($field->value != '')
21
  {
22
- echo '<a href="#" class="remove_file"></a>';
23
- echo '<span>'.$field->value.'</span>';
24
- echo '<input type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
25
- echo '<iframe class="hide" src="'.$this->plugin_dir.'/core/upload.php"></iframe>';
26
- }
27
- else
28
- {
29
- echo '<a href="#" class="remove_file hide"></a>';
30
- echo '<input type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
31
- echo '<iframe src="'.$this->plugin_dir.'/core/upload.php"></iframe>';
32
  }
33
-
 
 
 
 
 
34
  echo '</div>';
35
 
36
  }
37
-
38
 
39
  }
40
 
4
  {
5
  var $name;
6
  var $title;
 
7
 
8
+ function File()
9
  {
10
  $this->name = 'file';
11
+ $this->title = __('File','acf');
12
+
13
+ add_action("admin_head-media-upload-popup", array($this, 'popup_head'));
14
+ }
15
+
16
+
17
+ function popup_head()
18
+ {
19
+ if($_GET['acf_type'] == 'file')
20
+ {
21
+ ?>
22
+ <style type="text/css">
23
+ #media-upload-header #sidemenu li#tab-type_url,
24
+ #media-upload-header #sidemenu li#tab-gallery {
25
+ display: none;
26
+ }
27
+
28
+ #media-items tr.url,
29
+ #media-items tr.align,
30
+ #media-items tr.image_alt,
31
+ #media-items tr.image-size,
32
+ #media-items tr.post_excerpt,
33
+ #media-items tr.post_content,
34
+ #media-items tr.image_alt p,
35
+ #media-items table thead input.button,
36
+ #media-items table thead img.imgedit-wait-spin,
37
+ #media-items tr.submit a.wp-post-thumbnail,
38
+ form#filter {
39
+ display: none;
40
+ }
41
+
42
+ .media-item table thead img {
43
+ border: #DFDFDF solid 1px;
44
+ margin-right: 10px;
45
+ }
46
+
47
+ </style>
48
+ <script type="text/javascript">
49
+ (function($){
50
+ $(document).ready(function(){
51
+ $('input[value="Insert into Post"]').attr('value','<?php _e('Select File','acf'); ?>');
52
+ });
53
+ })(jQuery);
54
+ </script>
55
+ <?php
56
+ }
57
  }
58
 
59
+
60
  function html($field)
61
  {
62
+
63
+ $class = "";
64
+ $file = "";
65
 
66
  if($field->value != '')
67
  {
68
+ $file = $field->value;
69
+ $class = " active";
 
 
 
 
 
 
 
 
70
  }
71
+
72
+ echo '<div class="acf_file_uploader'.$class.'">';
73
+ echo '<a href="#" class="remove_file"></a>';
74
+ echo '<p class="file"><span>'.$file.'</span> <input type="button" class="button" value="'.__('Remove File','acf').'" /></p>';
75
+ echo '<input class="value" type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
76
+ echo '<p class="no_file">'.__('No File selected','acf').'. <input type="button" class="button" value="'.__('Add File','acf').'" /></p>';
77
  echo '</div>';
78
 
79
  }
 
80
 
81
  }
82
 
core/fields/image.php CHANGED
@@ -4,37 +4,77 @@ class Image
4
  {
5
  var $name;
6
  var $title;
7
- var $plugin_dir;
8
-
9
- function Image($plugin_dir)
10
  {
11
  $this->name = 'image';
12
- $this->title = 'Image';
13
- $this->plugin_dir = $plugin_dir;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
 
15
 
16
  function html($field)
17
  {
18
- echo '<div class="acf_image_uploader">';
 
19
 
20
  if($field->value != '')
21
  {
22
- echo '<a href="#" class="remove_image"></a>';
23
- echo '<img src="'.$field->value.'"/>';
24
- echo '<input type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
25
- echo '<iframe class="hide" src="'.$this->plugin_dir.'/core/upload.php"></iframe>';
26
- }
27
- else
28
- {
29
- echo '<a href="#" class="remove_image hide"></a>';
30
- echo '<input type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
31
- echo '<iframe src="'.$this->plugin_dir.'/core/upload.php"></iframe>';
32
  }
33
-
 
 
 
 
 
34
  echo '</div>';
35
 
36
  }
37
-
38
 
39
  }
40
 
4
  {
5
  var $name;
6
  var $title;
7
+
8
+ function Image()
 
9
  {
10
  $this->name = 'image';
11
+ $this->title = __('Image','acf');
12
+
13
+ add_action("admin_head-media-upload-popup", array($this, 'popup_head'));
14
+ }
15
+
16
+
17
+ function popup_head()
18
+ {
19
+ if($_GET['acf_type'] == 'image')
20
+ {
21
+ ?>
22
+ <style type="text/css">
23
+ #media-upload-header #sidemenu li#tab-type_url,
24
+ #media-upload-header #sidemenu li#tab-gallery {
25
+ display: none;
26
+ }
27
+
28
+ #media-items tr.url,
29
+ #media-items tr.align,
30
+ #media-items tr.image_alt,
31
+ #media-items tr.image-size,
32
+ #media-items tr.post_excerpt,
33
+ #media-items tr.post_content,
34
+ #media-items tr.image_alt p,
35
+ #media-items table thead input.button,
36
+ #media-items table thead img.imgedit-wait-spin,
37
+ #media-items tr.submit a.wp-post-thumbnail,
38
+ form#filter {
39
+ display: none;
40
+ }
41
+
42
+ .media-item table thead img {
43
+ border: #DFDFDF solid 1px;
44
+ margin-right: 10px;
45
+ }
46
+
47
+ </style>
48
+ <script type="text/javascript">
49
+ (function($){
50
+ $(document).ready(function(){
51
+ $('input.button[value="Insert into Post"]').attr('value','<?php _e('Select Image','acf'); ?>');
52
+ });
53
+ })(jQuery);
54
+ </script>
55
+ <?php
56
+ }
57
  }
58
+
59
 
60
  function html($field)
61
  {
62
+
63
+ $class = "";
64
 
65
  if($field->value != '')
66
  {
67
+ $class = " active";
 
 
 
 
 
 
 
 
 
68
  }
69
+
70
+ echo '<div class="acf_image_uploader'.$class.'">';
71
+ echo '<a href="#" class="remove_image"></a>';
72
+ echo '<img src="'.$field->value.'" alt=""/>';
73
+ echo '<input class="value" type="hidden" name="'.$field->input_name.'" value="'.$field->value.'" />';
74
+ echo '<p>'.__('No image selected','acf').'. <input type="button" class="button" value="'.__('Add Image','acf').'" /></p>';
75
  echo '</div>';
76
 
77
  }
 
78
 
79
  }
80
 
core/fields/page_link.php CHANGED
@@ -10,7 +10,7 @@ class Page_link
10
  function Page_link($parent)
11
  {
12
  $this->name = 'page_link';
13
- $this->title = 'Page Link';
14
  $this->parent = $parent;
15
  }
16
 
@@ -45,39 +45,76 @@ class Page_link
45
  }
46
 
47
 
48
- $posts = get_posts(array(
49
- 'numberposts' => -1,
50
- 'post_type' => $post_types,
51
- 'orderby' => 'title',
52
- 'order' => 'ASC'
53
- ));
54
-
55
- $choices = array();
56
- if($posts)
57
  {
58
- foreach($posts as $post)
59
- {
60
- $title = get_the_title($post->ID);
61
-
62
- if(strlen($title) > 33)
63
- {
64
- $title = substr($title,0,30).'...';
65
- }
66
-
67
- $choices[$post->ID] = $title.' ('.get_post_type($post->ID).')';
68
- }
69
  }
70
  else
71
  {
72
- $choices[] = null;
 
 
73
  }
74
 
75
- $field->options['choices'] = $choices;
76
 
77
 
78
- // change type to select and make it!
79
- $field->type = 'select';
80
- $this->parent->create_field($field);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
 
83
 
@@ -96,7 +133,7 @@ class Page_link
96
  <table class="acf_input">
97
  <tr>
98
  <td class="label">
99
- <label for="">Post Type</label>
100
  </td>
101
  <td>
102
  <?php
@@ -121,8 +158,25 @@ class Page_link
121
  $this->parent->create_field($temp_field);
122
 
123
  ?>
124
- <p class="description">Filter posts by selecting a post type<br />
125
- * unselecting all is the same as selecting all</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  </td>
127
  </tr>
128
  </table>
@@ -166,14 +220,49 @@ class Page_link
166
  * - this is called from api.php
167
  *
168
  * @author Elliot Condon
169
- * @since 1.1
170
  *
171
  ---------------------------------------------------------------------------------------------*/
172
  function format_value_for_api($value)
173
  {
174
- $value = get_permalink($value);
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  return $value;
176
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
 
179
  }
10
  function Page_link($parent)
11
  {
12
  $this->name = 'page_link';
13
+ $this->title = __('Page Link','acf');
14
  $this->parent = $parent;
15
  }
16
 
45
  }
46
 
47
 
48
+ // start select
49
+ if($field->options['multiple'] == '1')
 
 
 
 
 
 
 
50
  {
51
+ $name_extra = '[]';
52
+ echo '<select id="'.$field->input_id.'" class="'.$field->input_class.'" name="'.$field->input_name.$name_extra.'" multiple="multiple" size="5" >';
 
 
 
 
 
 
 
 
 
53
  }
54
  else
55
  {
56
+ echo '<select id="'.$field->input_id.'" class="'.$field->input_class.'" name="'.$field->input_name.'" >';
57
+ // add top option
58
+ echo '<option value="null">- '.__("Select Option",'acf').' -</option>';
59
  }
60
 
 
61
 
62
 
63
+ foreach($post_types as $post_type)
64
+ {
65
+ // get posts
66
+ $posts = get_posts(array(
67
+ 'numberposts' => -1,
68
+ 'post_type' => $post_type,
69
+ 'orderby' => 'title',
70
+ 'order' => 'ASC'
71
+ ));
72
+
73
+
74
+ // if posts, make a group for them
75
+ if($posts)
76
+ {
77
+ echo '<optgroup label="'.$post_type.'">';
78
+
79
+ foreach($posts as $post)
80
+ {
81
+ $key = $post->ID;
82
+ $value = get_the_title($post->ID);
83
+ $selected = '';
84
+
85
+
86
+ if(is_array($field->value))
87
+ {
88
+ // 2. If the value is an array (multiple select), loop through values and check if it is selected
89
+ if(in_array($key, $field->value))
90
+ {
91
+ $selected = 'selected="selected"';
92
+ }
93
+ }
94
+ else
95
+ {
96
+ // 3. this is not a multiple select, just check normaly
97
+ if($key == $field->value)
98
+ {
99
+ $selected = 'selected="selected"';
100
+ }
101
+ }
102
+
103
+
104
+ echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
105
+
106
+
107
+ }
108
+
109
+ echo '</optgroup>';
110
+
111
+ }// endif
112
+
113
+ }// endforeach
114
+
115
+
116
+ echo '</select>';
117
+
118
  }
119
 
120
 
133
  <table class="acf_input">
134
  <tr>
135
  <td class="label">
136
+ <label for=""><?php _e("Post Type",'acf'); ?></label>
137
  </td>
138
  <td>
139
  <?php
158
  $this->parent->create_field($temp_field);
159
 
160
  ?>
161
+ <p class="description"><?php _e("Filter posts by selecting a post type<br />
162
+ Tip: deselect all post types to show all post type's posts",'acf'); ?></p>
163
+ </td>
164
+ </tr>
165
+ <tr>
166
+ <td class="label">
167
+ <label><?php _e("Multiple?",'acf'); ?></label>
168
+ </td>
169
+ <td>
170
+ <?php
171
+ $temp_field = new stdClass();
172
+ $temp_field->type = 'true_false';
173
+ $temp_field->input_name = 'acf[fields]['.$key.'][options][multiple]';
174
+ $temp_field->input_class = '';
175
+ $temp_field->input_id = 'acf[fields]['.$key.'][options][multiple]';
176
+ $temp_field->value = $options['multiple'];
177
+ $temp_field->options = array('message' => 'Select multiple values');
178
+ $this->parent->create_field($temp_field);
179
+ ?>
180
  </td>
181
  </tr>
182
  </table>
220
  * - this is called from api.php
221
  *
222
  * @author Elliot Condon
223
+ * @since 1.1.3
224
  *
225
  ---------------------------------------------------------------------------------------------*/
226
  function format_value_for_api($value)
227
  {
228
+ $value = $this->format_value_for_input($value);
229
+
230
+ if(is_array($value))
231
+ {
232
+ foreach($value as $k => $v)
233
+ {
234
+ $value[$k] = get_permalink($v);
235
+ }
236
+ }
237
+ else
238
+ {
239
+ $value = get_permalink($value);
240
+ }
241
+
242
  return $value;
243
  }
244
+
245
+
246
+ /*---------------------------------------------------------------------------------------------
247
+ * Format Value for input
248
+ * - this is called from api.php
249
+ *
250
+ * @author Elliot Condon
251
+ * @since 1.1.3
252
+ *
253
+ ---------------------------------------------------------------------------------------------*/
254
+ function format_value_for_input($value)
255
+ {
256
+ if(is_array(unserialize($value)))
257
+ {
258
+ return(unserialize($value));
259
+ }
260
+ else
261
+ {
262
+ return $value;
263
+ }
264
+ }
265
+
266
 
267
 
268
  }
core/fields/post_object.php CHANGED
@@ -9,7 +9,7 @@ class Post_object
9
  function Post_object($parent)
10
  {
11
  $this->name = 'post_object';
12
- $this->title = 'Post Object';
13
  $this->parent = $parent;
14
  }
15
 
@@ -34,41 +34,74 @@ class Post_object
34
  }
35
  }
36
 
37
-
38
- $posts = get_posts(array(
39
- 'numberposts' => -1,
40
- 'post_type' => $post_types,
41
- 'orderby' => 'title',
42
- 'order' => 'ASC'
43
- ));
44
 
45
- $choices = array();
46
- if($posts)
47
  {
48
- foreach($posts as $post)
49
- {
50
- $title = get_the_title($post->ID);
51
-
52
- if(strlen($title) > 33)
53
- {
54
- $title = substr($title,0,30).'...';
55
- }
56
-
57
- $choices[$post->ID] = $title.' ('.get_post_type($post->ID).')';
58
- }
59
  }
60
  else
61
  {
62
- $choices[] = null;
 
 
63
  }
64
 
65
 
66
- $field->options['choices'] = $choices;
67
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- // change type to select and make it!
70
- $field->type = 'select';
71
- $this->parent->create_field($field);
72
  }
73
 
74
 
@@ -87,7 +120,7 @@ class Post_object
87
  <table class="acf_input">
88
  <tr>
89
  <td class="label">
90
- <label for="">Post Type</label>
91
  </td>
92
  <td>
93
  <?php
@@ -112,13 +145,13 @@ class Post_object
112
  $this->parent->create_field($temp_field);
113
 
114
  ?>
115
- <p class="description">Filter posts by selecting a post type<br />
116
- * unselecting all is the same as selecting all</p>
117
  </td>
118
  </tr>
119
  <tr>
120
  <td class="label">
121
- <label>Multiple?</label>
122
  </td>
123
  <td>
124
  <?php
9
  function Post_object($parent)
10
  {
11
  $this->name = 'post_object';
12
+ $this->title = __("Post Object",'acf');
13
  $this->parent = $parent;
14
  }
15
 
34
  }
35
  }
36
 
 
 
 
 
 
 
 
37
 
38
+ // start select
39
+ if($field->options['multiple'] == '1')
40
  {
41
+ $name_extra = '[]';
42
+ echo '<select id="'.$field->input_id.'" class="'.$field->input_class.'" name="'.$field->input_name.$name_extra.'" multiple="multiple" size="5" >';
 
 
 
 
 
 
 
 
 
43
  }
44
  else
45
  {
46
+ echo '<select id="'.$field->input_id.'" class="'.$field->input_class.'" name="'.$field->input_name.'" >';
47
+ // add top option
48
+ echo '<option value="null">- '.__("Select Option",'acf').' -</option>';
49
  }
50
 
51
 
52
+ foreach($post_types as $post_type)
53
+ {
54
+ // get posts
55
+ $posts = get_posts(array(
56
+ 'numberposts' => -1,
57
+ 'post_type' => $post_type,
58
+ 'orderby' => 'title',
59
+ 'order' => 'ASC'
60
+ ));
61
+
62
+
63
+ // if posts, make a group for them
64
+ if($posts)
65
+ {
66
+ echo '<optgroup label="'.$post_type.'">';
67
+
68
+ foreach($posts as $post)
69
+ {
70
+ $key = $post->ID;
71
+ $value = get_the_title($post->ID);
72
+ $selected = '';
73
+
74
+
75
+ if(is_array($field->value))
76
+ {
77
+ // 2. If the value is an array (multiple select), loop through values and check if it is selected
78
+ if(in_array($key, $field->value))
79
+ {
80
+ $selected = 'selected="selected"';
81
+ }
82
+ }
83
+ else
84
+ {
85
+ // 3. this is not a multiple select, just check normaly
86
+ if($key == $field->value)
87
+ {
88
+ $selected = 'selected="selected"';
89
+ }
90
+ }
91
+
92
+
93
+ echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
94
+
95
+
96
+ }
97
+
98
+ echo '</optgroup>';
99
+
100
+ }// endif
101
+ }// endforeach
102
 
103
+
104
+ echo '</select>';
 
105
  }
106
 
107
 
120
  <table class="acf_input">
121
  <tr>
122
  <td class="label">
123
+ <label for=""><?php _e("Post Type",'acf'); ?></label>
124
  </td>
125
  <td>
126
  <?php
145
  $this->parent->create_field($temp_field);
146
 
147
  ?>
148
+ <p class="description"><?php _e("Filter posts by selecting a post type<br />
149
+ * unselecting all is the same as selecting all",'acf'); ?></p>
150
  </td>
151
  </tr>
152
  <tr>
153
  <td class="label">
154
+ <label><?php _e("Multiple?",'acf'); ?></label>
155
  </td>
156
  <td>
157
  <?php
core/fields/select.php CHANGED
@@ -9,7 +9,7 @@ class Select
9
  function Select($parent)
10
  {
11
  $this->name = 'select';
12
- $this->title = 'Select';
13
  $this->parent = $parent;
14
  }
15
 
@@ -32,9 +32,6 @@ class Select
32
  }
33
 
34
 
35
-
36
-
37
-
38
  // loop through values and add them as options
39
  foreach($field->options['choices'] as $key => $value)
40
  {
@@ -63,10 +60,6 @@ class Select
63
  echo '</select>';
64
  }
65
 
66
- function has_options()
67
- {
68
- return true;
69
- }
70
 
71
  function options_html($key, $options)
72
  {
@@ -84,19 +77,19 @@ class Select
84
  <table class="acf_input">
85
  <tr>
86
  <td class="label">
87
- <label for="">Choices</label>
88
  </td>
89
  <td>
90
  <textarea rows="5" name="acf[fields][<?php echo $key; ?>][options][choices]" id=""><?php echo $options['choices']; ?></textarea>
91
- <p class="description">Enter your choices one per line. eg:<br />
92
  option_1 : Option 1<br />
93
  option_3 : Option 2<br />
94
- option_3 : Option 3</p>
95
  </td>
96
  </tr>
97
  <tr>
98
  <td class="label">
99
- <label>Multiple?</label>
100
  </td>
101
  <td>
102
  <?php
9
  function Select($parent)
10
  {
11
  $this->name = 'select';
12
+ $this->title = __("Select",'acf');
13
  $this->parent = $parent;
14
  }
15
 
32
  }
33
 
34
 
 
 
 
35
  // loop through values and add them as options
36
  foreach($field->options['choices'] as $key => $value)
37
  {
60
  echo '</select>';
61
  }
62
 
 
 
 
 
63
 
64
  function options_html($key, $options)
65
  {
77
  <table class="acf_input">
78
  <tr>
79
  <td class="label">
80
+ <label for=""><?php _e("Choices",'acf'); ?></label>
81
  </td>
82
  <td>
83
  <textarea rows="5" name="acf[fields][<?php echo $key; ?>][options][choices]" id=""><?php echo $options['choices']; ?></textarea>
84
+ <p class="description"><?php _e("Enter your choices one per line. eg:<br />
85
  option_1 : Option 1<br />
86
  option_3 : Option 2<br />
87
+ option_3 : Option 3",'acf'); ?></p>
88
  </td>
89
  </tr>
90
  <tr>
91
  <td class="label">
92
+ <label><?php _e("Multiple?",'acf'); ?></label>
93
  </td>
94
  <td>
95
  <?php
core/fields/text.php CHANGED
@@ -8,7 +8,7 @@ class Text
8
  function Text()
9
  {
10
  $this->name = 'text';
11
- $this->title = 'Text';
12
  }
13
 
14
  function html($field)
8
  function Text()
9
  {
10
  $this->name = 'text';
11
+ $this->title = __("Text",'acf');
12
  }
13
 
14
  function html($field)
core/fields/textarea.php CHANGED
@@ -8,7 +8,7 @@ class Textarea
8
  function Textarea()
9
  {
10
  $this->name = 'textarea';
11
- $this->title = 'Text Area';
12
  }
13
 
14
  function html($field)
8
  function Textarea()
9
  {
10
  $this->name = 'textarea';
11
+ $this->title = __("Text Area",'acf');
12
  }
13
 
14
  function html($field)
core/fields/true_false.php CHANGED
@@ -8,7 +8,7 @@ class True_false
8
  function True_false()
9
  {
10
  $this->name = 'true_false';
11
- $this->title = 'True / False';
12
  }
13
 
14
  function html($field)
@@ -16,7 +16,7 @@ class True_false
16
  // set default message
17
  if(empty($field->options['message']))
18
  {
19
- $field->options['message'] = 'True';
20
  }
21
 
22
  // set choices
@@ -57,11 +57,11 @@ class True_false
57
  <table class="acf_input">
58
  <tr>
59
  <td class="label">
60
- <label for="acf[fields][<?php echo $key; ?>][options][message]">Message</label>
61
  </td>
62
  <td>
63
  <input type="text" name="acf[fields][<?php echo $key; ?>][options][message]" id="acf[fields][<?php echo $key; ?>][options][message]" value="<?php echo $options['message']; ?>" />
64
- <p class="description">eg. Show extra content</a></p>
65
  </td>
66
  </tr>
67
  </table>
8
  function True_false()
9
  {
10
  $this->name = 'true_false';
11
+ $this->title = __("True / False",'acf');
12
  }
13
 
14
  function html($field)
16
  // set default message
17
  if(empty($field->options['message']))
18
  {
19
+ $field->options['message'] = __("True",'acf');
20
  }
21
 
22
  // set choices
57
  <table class="acf_input">
58
  <tr>
59
  <td class="label">
60
+ <label for="acf[fields][<?php echo $key; ?>][options][message]"><?php _e("Message",'acf'); ?></label>
61
  </td>
62
  <td>
63
  <input type="text" name="acf[fields][<?php echo $key; ?>][options][message]" id="acf[fields][<?php echo $key; ?>][options][message]" value="<?php echo $options['message']; ?>" />
64
+ <p class="description"><?php _e("eg. Show extra content",'acf'); ?></a></p>
65
  </td>
66
  </tr>
67
  </table>
core/fields/wysiwyg.php CHANGED
@@ -8,7 +8,7 @@ class Wysiwyg
8
  function Wysiwyg()
9
  {
10
  $this->name = 'wysiwyg';
11
- $this->title = 'Wysiwyg Editor';
12
  }
13
 
14
  function html($field)
8
  function Wysiwyg()
9
  {
10
  $this->name = 'wysiwyg';
11
+ $this->title = __("Wysiwyg Editor",'acf');
12
  }
13
 
14
  function html($field)
core/fields_meta_box.php CHANGED
@@ -23,9 +23,9 @@
23
  <table class="acf">
24
  <tr>
25
  <th class="order"><!-- Order --></th>
26
- <th class="label">Label<br /><span>Shown on the edit page (eg. Hero Image)</span></th>
27
- <th class="name">Name<br /><span>Used as variable name (eg. hero_image)</span></th>
28
- <th class="type">Field Type<br /><span>Type of field</span></th>
29
  <th class="blank"></th>
30
  <th class="remove"><!-- Remove --></th>
31
  </tr>
@@ -99,5 +99,5 @@
99
 
100
  <div class="table_footer">
101
  <div class="order_message"></div>
102
- <a href="javascript:;" id="add_field" class="button-primary">+ Add Field</a>
103
  </div>
23
  <table class="acf">
24
  <tr>
25
  <th class="order"><!-- Order --></th>
26
+ <th class="label"><?php _e('Label','acf'); ?><br /><span><?php _e('Shown on the edit page (eg. Hero Image)','acf'); ?></span></th>
27
+ <th class="name"><?php _e('Name','acf'); ?><br /><span><?php _e('Used as variable name (eg. hero_image)','acf'); ?></span></th>
28
+ <th class="type"><?php _e('Field Type','acf'); ?><br /><span><?php _e('Type of field','acf'); ?></span></th>
29
  <th class="blank"></th>
30
  <th class="remove"><!-- Remove --></th>
31
  </tr>
99
 
100
  <div class="table_footer">
101
  <div class="order_message"></div>
102
+ <a href="javascript:;" id="add_field" class="button-primary"><?php _e('+ Add Field','acf'); ?></a>
103
  </div>
core/info_meta_box.php CHANGED
@@ -2,8 +2,8 @@
2
 
3
  <div class="postbox">
4
  <div title="Click to toggle" class="handlediv"><br></div>
5
- <h3 class="hndle"><span>Advanced Custom Fields v<?php echo $this->version; ?></span>
6
- <a class="thickbox button" href="http://localhost:8888/acf/wp-admin/plugin-install.php?tab=plugin-information&amp;plugin=advanced-custom-fields&amp;section=changelog&amp;TB_iframe=true&amp;width=640&amp;height=570">see what's new</a>
7
  </h3>
8
  <div class="inside">
9
  <table cellpadding="0" cellspacing="0" class="author">
@@ -12,7 +12,7 @@
12
  <img src="<?php echo $this->dir ?>/images/resources.png" />
13
  </td>
14
  <td>
15
- Help / Code. <a href="http://plugins.elliotcondon.com/advanced-custom-fields/">Visit the Plugin Website</a>
16
  </td>
17
  </tr>
18
  </table>
@@ -22,7 +22,7 @@
22
  <img src="<?php echo $this->dir ?>/images/need_help.png" />
23
  </td>
24
  <td>
25
- Need Help? <a href="http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/">Visit the Support Forum</a>
26
  </td>
27
  </tr>
28
  </table>
@@ -35,7 +35,7 @@
35
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
36
  <input type="hidden" name="cmd" value="_s-xclick">
37
  <input type="hidden" name="hosted_button_id" value="4C9N2WFW6B9QL">
38
- <span>Help fund future development</span><input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_AU/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
39
  <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_AU/i/scr/pixel.gif" width="1" height="1">
40
  </form>
41
  <!-- Help fund future development <a href="http://www.elliotcondon.com">Donate here</a> -->
@@ -48,7 +48,7 @@
48
  <img src="<?php echo $this->dir ?>/images/elliot_condon.png" />
49
  </td>
50
  <td>
51
- Created by <a href="http://www.elliotcondon.com">Elliot Condon</a>
52
  </td>
53
  </tr>
54
  </table>
2
 
3
  <div class="postbox">
4
  <div title="Click to toggle" class="handlediv"><br></div>
5
+ <h3 class="hndle"><span><?php _e("Advanced Custom Fields v",'acf'); ?><?php echo $this->version; ?></span>
6
+ <a class="thickbox button" href="http://localhost:8888/acf/wp-admin/plugin-install.php?tab=plugin-information&amp;plugin=advanced-custom-fields&amp;section=changelog&amp;TB_iframe=true&amp;width=640&amp;height=570"><?php _e("see what's new",'acf'); ?></a>
7
  </h3>
8
  <div class="inside">
9
  <table cellpadding="0" cellspacing="0" class="author">
12
  <img src="<?php echo $this->dir ?>/images/resources.png" />
13
  </td>
14
  <td>
15
+ <?php _e("User Guide + Code Examples",'acf'); ?> <a href="http://plugins.elliotcondon.com/advanced-custom-fields/"><?php _e("Visit the Plugin Website",'acf'); ?></a>
16
  </td>
17
  </tr>
18
  </table>
22
  <img src="<?php echo $this->dir ?>/images/need_help.png" />
23
  </td>
24
  <td>
25
+ <?php _e("Need Help?",'acf'); ?> <a href="http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/"><?php _e("Visit the Support Forum",'acf'); ?></a>
26
  </td>
27
  </tr>
28
  </table>
35
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
36
  <input type="hidden" name="cmd" value="_s-xclick">
37
  <input type="hidden" name="hosted_button_id" value="4C9N2WFW6B9QL">
38
+ <span><?php _e("Help fund future development",'acf'); ?></span><input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_AU/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
39
  <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_AU/i/scr/pixel.gif" width="1" height="1">
40
  </form>
41
  <!-- Help fund future development <a href="http://www.elliotcondon.com">Donate here</a> -->
48
  <img src="<?php echo $this->dir ?>/images/elliot_condon.png" />
49
  </td>
50
  <td>
51
+ <?php _e("Created by",'acf'); ?> <a href="http://www.elliotcondon.com">Elliot Condon</a>
52
  </td>
53
  </tr>
54
  </table>
core/location_meta_box.php CHANGED
@@ -13,12 +13,12 @@
13
 
14
  <div class="help_box_mask">
15
  <div class="help_box">
16
- <h4>Enter values in the fields below to add this ACF to an edit screen</h4>
17
  <ul>
18
- <li>The values you enter bellow will be used to match against edit screens.</li>
19
- <li>If any of the values match the edit screen, this ACF will be used </li>
20
- <li>Blank fields will be ignored</li>
21
- <li>Use the override to remove all previous ACF's form an edit screen. This is useful for creating an ACF for all normal pages, and then creating a custom ACF for a home page (page title = 'Home'). Please note that the home page ACF needs a higher page order to remove ACF's before it.</li>
22
  </ul>
23
  </div>
24
  </div>
@@ -29,7 +29,7 @@
29
  <table class="acf_input" id="acf_location">
30
  <tr>
31
  <td class="label">
32
- <label for="post_type">Post Type's</label>
33
  </td>
34
  <td>
35
  <?php
@@ -59,14 +59,14 @@
59
  $this->create_field($temp_field);
60
 
61
  ?>
62
- <p class="description">Selecting a post type here will add this ACF to all edit screens of that post type.<br />(if your custom post type does not appear, make sure it is publicly query-able)<br /><br />
63
  Tip: Unselect post types and use the options below to customise your ACF location!<br />
64
- (command+click)</p>
65
  </td>
66
  </tr>
67
  <tr>
68
  <td class="label">
69
- <label for="page_title">Page Title's</label>
70
  </td>
71
  <td>
72
  <?php
@@ -81,12 +81,12 @@
81
  $this->create_field($temp_field);
82
 
83
  ?>
84
- <p class="description">eg. Home, About Us</p>
85
  </td>
86
  </tr>
87
  <tr>
88
  <td class="label">
89
- <label for="page_slug">Page Slug's</label>
90
  </td>
91
  <td>
92
  <?php
@@ -101,12 +101,12 @@
101
  $this->create_field($temp_field);
102
 
103
  ?>
104
- <p class="description">eg. home, about-us</p>
105
  </td>
106
  </tr>
107
  <tr>
108
  <td class="label">
109
- <label for="post_id">Post ID's</label>
110
  </td>
111
  <td>
112
  <?php
@@ -121,12 +121,12 @@
121
  $this->create_field($temp_field);
122
 
123
  ?>
124
- <p class="description">eg. 1, 2, 3</p>
125
  </td>
126
  </tr>
127
  <tr>
128
  <td class="label">
129
- <label for="template_name">Page Template's</label>
130
  </td>
131
  <td>
132
  <?php
@@ -141,12 +141,12 @@
141
  $this->create_field($temp_field);
142
 
143
  ?>
144
- <p class="description">eg. home_page.php</p>
145
  </td>
146
  </tr>
147
  <tr>
148
  <td class="label">
149
- <label for="page_parent">Page Parent ID's</label>
150
  </td>
151
  <td>
152
  <?php
@@ -161,12 +161,12 @@
161
  $this->create_field($temp_field);
162
 
163
  ?>
164
- <p class="description">eg. 1, 2, 3</p>
165
  </td>
166
  </tr>
167
  <tr>
168
  <td class="label">
169
- <label for="page_parent">Overrides</label>
170
  </td>
171
  <td>
172
  <?php
@@ -183,7 +183,7 @@
183
  $this->create_field($temp_field);
184
 
185
  ?>
186
- <p class="description">Tick this box to remove all other ACF's <br />(from the edit screen where this ACF appears)</p>
187
  </td>
188
  </tr>
189
  </table>
13
 
14
  <div class="help_box_mask">
15
  <div class="help_box">
16
+ <h4><?php _e("Enter values in the fields below to add this ACF to an edit screen",'acf'); ?></h4>
17
  <ul>
18
+ <li><?php _e("The values you enter bellow will be used to match against edit screens",'acf'); ?></li>
19
+ <li><?php _e("If any of the values match the edit screen, this ACF will be used",'acf'); ?></li>
20
+ <li><?php _e("Blank fields will be ignored",'acf'); ?></li>
21
+ <li><?php _e("Use the override to remove all previous ACF's form an edit screen. This is useful for creating an ACF for all normal pages, and then creating a custom ACF for a home page (page title = 'Home'). Please note that the home page ACF needs a higher page order to remove ACF's before it",'acf'); ?></li>
22
  </ul>
23
  </div>
24
  </div>
29
  <table class="acf_input" id="acf_location">
30
  <tr>
31
  <td class="label">
32
+ <label for="post_type"><?php _e("Post Type's",'acf'); ?></label>
33
  </td>
34
  <td>
35
  <?php
59
  $this->create_field($temp_field);
60
 
61
  ?>
62
+ <p class="description"><?php _e("Selecting a post type here will add this ACF to all edit screens of that post type.<br />(if your custom post type does not appear, make sure it is publicly query-able)<br /><br />
63
  Tip: Unselect post types and use the options below to customise your ACF location!<br />
64
+ (command+click)",'acf'); ?></p>
65
  </td>
66
  </tr>
67
  <tr>
68
  <td class="label">
69
+ <label for="page_title"><?php _e("Page Title's",'acf'); ?></label>
70
  </td>
71
  <td>
72
  <?php
81
  $this->create_field($temp_field);
82
 
83
  ?>
84
+ <p class="description"><?php _e("eg. Home, About Us",'acf'); ?></p>
85
  </td>
86
  </tr>
87
  <tr>
88
  <td class="label">
89
+ <label for="page_slug"><?php _e("Page Slug's",'acf'); ?></label>
90
  </td>
91
  <td>
92
  <?php
101
  $this->create_field($temp_field);
102
 
103
  ?>
104
+ <p class="description"><?php _e("eg. home, about-us",'acf'); ?></p>
105
  </td>
106
  </tr>
107
  <tr>
108
  <td class="label">
109
+ <label for="post_id"><?php _e("Post ID's",'acf'); ?></label>
110
  </td>
111
  <td>
112
  <?php
121
  $this->create_field($temp_field);
122
 
123
  ?>
124
+ <p class="description"><?php _e("eg. 1, 2, 3",'acf'); ?></p>
125
  </td>
126
  </tr>
127
  <tr>
128
  <td class="label">
129
+ <label for="template_name"><?php _e("Page Template's",'acf'); ?></label>
130
  </td>
131
  <td>
132
  <?php
141
  $this->create_field($temp_field);
142
 
143
  ?>
144
+ <p class="description"><?php _e("eg. home_page.php",'acf'); ?></p>
145
  </td>
146
  </tr>
147
  <tr>
148
  <td class="label">
149
+ <label for="page_parent"><?php _e("Page Parent ID's",'acf'); ?></label>
150
  </td>
151
  <td>
152
  <?php
161
  $this->create_field($temp_field);
162
 
163
  ?>
164
+ <p class="description"><?php _e("eg. 1, 2, 3",'acf'); ?></p>
165
  </td>
166
  </tr>
167
  <tr>
168
  <td class="label">
169
+ <label for="page_parent"><?php _e("Overrides",'acf'); ?></label>
170
  </td>
171
  <td>
172
  <?php
183
  $this->create_field($temp_field);
184
 
185
  ?>
186
+ <p class="description"><?php _e("Tick this box to remove all other ACF's <br />(from the edit screen where this ACF appears)",'acf'); ?></p>
187
  </td>
188
  </tr>
189
  </table>
core/options_meta_box.php CHANGED
@@ -15,7 +15,7 @@
15
  <table class="acf_input" id="acf_options">
16
  <tr>
17
  <td class="label">
18
- <label for="post_type">Show on page</label>
19
  </td>
20
  <td>
21
  <?php
@@ -40,13 +40,13 @@
40
 
41
  ?>
42
 
43
- <p class="description">Select the metaboxes you wish to keep on your edit screen.<br />
44
- Tip: This is useful to customise the edit screen</p>
45
  </td>
46
  </tr>
47
  <tr>
48
  <td class="label">
49
- <label for="post_type">Filter Users</label>
50
  </td>
51
  <td>
52
  <?php
@@ -69,8 +69,8 @@
69
  $this->create_field($temp_field);
70
 
71
  ?>
72
- <p class="description">Select user types to give them access to this ACF<br />
73
- Tip: If no user types are selected, all user's will have access to this ACF</p>
74
  </td>
75
  </tr>
76
 
15
  <table class="acf_input" id="acf_options">
16
  <tr>
17
  <td class="label">
18
+ <label for="post_type"><?php _e("Show on page",'acf'); ?></label>
19
  </td>
20
  <td>
21
  <?php
40
 
41
  ?>
42
 
43
+ <p class="description"><?php _e("Select the metaboxes you wish to keep on your edit screen.<br />
44
+ Tip: This is useful to customise the edit screen",'acf'); ?></p>
45
  </td>
46
  </tr>
47
  <tr>
48
  <td class="label">
49
+ <label for="post_type"><?php _e("Filter Users",'acf'); ?></label>
50
  </td>
51
  <td>
52
  <?php
69
  $this->create_field($temp_field);
70
 
71
  ?>
72
+ <p class="description"><?php _e("Select user types to give them access to this ACF<br />
73
+ Tip: If no user types are selected, all user's will have access to this ACF",'acf'); ?></p>
74
  </td>
75
  </tr>
76
 
core/update.php CHANGED
@@ -270,5 +270,5 @@ if(version_compare($version,'1.1.0') < 0)
270
 
271
 
272
  // update to latest acf version
273
- update_option('acf_version','1.1.2');
274
  ?>
270
 
271
 
272
  // update to latest acf version
273
+ update_option('acf_version','1.1.3');
274
  ?>
core/upload.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- if(isset($_POST['acf_post']))
4
- {
5
- if($_FILES['acf_image']['name'] == '')
6
- {
7
- //echo '<div class="result">0</div>';
8
- }
9
- else
10
- {
11
- require_once('../../../../wp-load.php');
12
- require_once('../../../../wp-admin/admin.php');
13
-
14
- $override = array('test_form' => false);
15
- $file = wp_handle_upload( $_FILES['acf_image'], $override );
16
- //echo '<div class="result">'.$file['url'].'</div>';
17
- }
18
- }
19
-
20
- ?>
21
- <!DOCTYPE html>
22
- <html lang="en">
23
- <head>
24
-
25
- <meta charset="utf-8" />
26
- <title>Upload</title>
27
-
28
- <style type="text/css">
29
- body {
30
- padding: 0;
31
- margin: 0;
32
- }
33
-
34
- .result {display: none;}
35
-
36
- form {
37
- display: block;
38
- position: relative;
39
- overflow: hidden;
40
- padding: 2px;
41
- float: left;
42
- }
43
-
44
- </style>
45
-
46
- </head>
47
- <body>
48
-
49
- <?php
50
- if(isset($_POST['acf_post']) && $_FILES['acf_image']['name'] == '')
51
- {
52
- echo '<div class="result">0</div>';
53
- }
54
-
55
- if(!empty($file))
56
- {
57
- echo '<div class="result">'.$file['url'].'</div>';
58
- }
59
- ?>
60
-
61
- <form id="acf_upload" method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" name="acf_upload" enctype="multipart/form-data">
62
-
63
- <input type="hidden" name="acf_post" value="true" />
64
- <input type="file" name="acf_image" id="acf_image" />
65
- <input type="submit" class="button" value="Upload" />
66
-
67
- </form>
68
-
69
- </body>
70
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/style.input.css CHANGED
@@ -1,9 +1,21 @@
1
  .postbox#acf_input {
2
- border: #DFDFDF solid 0px;
3
  overflow: hidden;
4
  background: transparent;
5
  }
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  .postbox#acf_input h3.hndle{
8
  display: none;
9
  }
@@ -36,31 +48,13 @@ table.acf_input > tbody > tr > td > select {
36
  min-width: 250px;
37
  }
38
 
39
- /* image upload */
 
 
40
  .acf_image_uploader {
41
  position: relative;
42
  }
43
 
44
- .acf_image_uploader iframe {
45
- display: block;
46
- overflow: hidden;
47
- height: 40px;
48
- min-width: 330px;
49
- float: left;
50
- }
51
-
52
- .acf_image_uploader .loading {
53
- float: left;
54
- height: 16px;
55
- width: 16px;
56
- margin: 3px 0 0;
57
- background: url(../images/loading.gif) 50% 50% no-repeat;
58
- }
59
-
60
- .acf_image_uploader iframe.hide {
61
- display: none;
62
- }
63
-
64
  .acf_image_uploader a.remove_image {
65
  width: 16px;
66
  height: 16px;
@@ -73,14 +67,10 @@ table.acf_input > tbody > tr > td > select {
73
  display: none;
74
  }
75
 
76
- .acf_image_uploader:hover a.remove_image {
77
  display: block;
78
  }
79
 
80
- .acf_image_uploader:hover a.remove_image.hide {
81
- display: none;
82
- }
83
-
84
  .acf_image_uploader a.remove_image:hover {
85
  background-position: 0% 100%;
86
  }
@@ -92,58 +82,46 @@ table.acf_input > tbody > tr > td > select {
92
  padding: 3px;
93
  background: #FFF;
94
  border: #d8d8d8 solid 1px;
 
95
  }
96
 
97
- /* File upload */
98
- .acf_file_uploader {
99
- position: relative;
100
  }
101
 
102
- .acf_file_uploader iframe {
103
  display: block;
104
- overflow: hidden;
105
- height: 40px;
106
- min-width: 330px
107
- float: left;
108
  }
109
 
110
- .acf_file_uploader .loading {
111
- float: left;
112
- height: 16px;
113
- width: 16px;
114
- margin: 3px 0 0;
115
- background: url(../images/loading.gif) 50% 50% no-repeat;
116
  }
117
 
118
- .acf_file_uploader iframe.hide {
119
- display: none;
 
 
 
120
  }
121
 
122
- .acf_file_uploader a.remove_file {
123
- width: 16px;
124
- height: 16px;
125
- background: url(../images/button_remove.png) 0 0 no-repeat;
126
- position: absolute;
127
- top:0;
128
- left: 0;
129
- cursor: pointer;
130
- margin: -3px 0 0 -3px;
131
  display: none;
132
  }
133
 
134
- .acf_file_uploader:hover a.remove_file {
135
  display: block;
136
  }
137
 
138
- .acf_file_uploader:hover a.remove_file.hide {
139
- display: none;
140
  }
141
 
142
- .acf_file_uploader a.remove_file:hover {
143
- background-position: 0% 100%;
144
  }
145
 
146
 
 
147
  table.acf_input {
148
  border: 0 none;
149
  border-top: 1px solid #eaeaea;
@@ -167,9 +145,7 @@ table.acf_input > tbody > tr > td > label {
167
  padding: 0 0 8px;
168
  text-shadow: 0 1px 0 #FFFFFF;
169
  }
170
- table.acf_input > tbody > tr:last-child > td {
171
- border-bottom: 1px solid #eaeaea;
172
- }
173
 
174
  table.acf_input > tbody > tr > td > label {
175
  width: auto;
@@ -289,4 +265,12 @@ a.remove_field:hover {
289
 
290
  #wpcontent select[multiple] {
291
  height: auto;
 
 
 
 
 
 
 
 
292
  }
1
  .postbox#acf_input {
2
+ border: #EAEAEA solid 1px;
3
  overflow: hidden;
4
  background: transparent;
5
  }
6
 
7
+ table.acf_input {
8
+ border: 0 none !important;
9
+ }
10
+
11
+ table.acf_input > tbody > tr:first-child > td {
12
+ border-top: 0 none;
13
+ }
14
+
15
+ table.acf_input > tbody > tr:last-child > td {
16
+ border-bottom: 0 none;
17
+ }
18
+
19
  .postbox#acf_input h3.hndle{
20
  display: none;
21
  }
48
  min-width: 250px;
49
  }
50
 
51
+ /*---------------------------------------------------------------------------------------------
52
+ Image Upload
53
+ ---------------------------------------------------------------------------------------------*/
54
  .acf_image_uploader {
55
  position: relative;
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  .acf_image_uploader a.remove_image {
59
  width: 16px;
60
  height: 16px;
67
  display: none;
68
  }
69
 
70
+ .acf_image_uploader.active:hover a.remove_image {
71
  display: block;
72
  }
73
 
 
 
 
 
74
  .acf_image_uploader a.remove_image:hover {
75
  background-position: 0% 100%;
76
  }
82
  padding: 3px;
83
  background: #FFF;
84
  border: #d8d8d8 solid 1px;
85
+ display: none;
86
  }
87
 
88
+ .acf_image_uploader.active img {
89
+ display: block;
 
90
  }
91
 
92
+ .acf_image_uploader p {
93
  display: block;
 
 
 
 
94
  }
95
 
96
+ .acf_image_uploader.active p {
97
+ display: none;
 
 
 
 
98
  }
99
 
100
+ /*---------------------------------------------------------------------------------------------
101
+ File Upload
102
+ ---------------------------------------------------------------------------------------------*/
103
+ .acf_file_uploader {
104
+ position: relative;
105
  }
106
 
107
+ .acf_file_uploader p.file {
 
 
 
 
 
 
 
 
108
  display: none;
109
  }
110
 
111
+ .acf_file_uploader p.no_file {
112
  display: block;
113
  }
114
 
115
+ .acf_file_uploader.active p.file {
116
+ display: block;
117
  }
118
 
119
+ .acf_file_uploader.active p.no_file {
120
+ display: none;
121
  }
122
 
123
 
124
+
125
  table.acf_input {
126
  border: 0 none;
127
  border-top: 1px solid #eaeaea;
145
  padding: 0 0 8px;
146
  text-shadow: 0 1px 0 #FFFFFF;
147
  }
148
+
 
 
149
 
150
  table.acf_input > tbody > tr > td > label {
151
  width: auto;
265
 
266
  #wpcontent select[multiple] {
267
  height: auto;
268
+ }
269
+
270
+ #wpcontent select optgroup {
271
+ padding: 0 2px
272
+ }
273
+
274
+ #wpcontent select optgroup option {
275
+ padding-left: 6px;
276
  }
js/functions.input.js CHANGED
@@ -5,8 +5,7 @@
5
 
6
  // vars
7
  var wysiwyg_count = 0;
8
-
9
- // add code to tinymce
10
 
11
 
12
  /*-------------------------------------------
@@ -95,151 +94,102 @@
95
  $.fn.make_acf_image = function(){
96
 
97
  var div = $(this);
98
- var iframe = div.find('iframe');
99
-
100
-
101
- // can only add functions to the iframe if its loaded
102
- iframe.load(function(){
103
-
104
- iframe.contents().find('form').unbind('submit').submit(function(){
105
-
106
- // if value is empty, return faslse and stop it from uploading!
107
- if(iframe.contents().find('input[type="file"]').val() == '')
108
- {
109
- alert('No Image chosen');
110
- return false;
111
- }
112
-
113
- // set up load event
114
- iframe.unbind("load").load(function(){
115
-
116
- var result = $(this).contents().find('body .result').html();
117
-
118
- if(result == null)
119
- {
120
- //alert('null');
121
- }
122
- else if(result == '0')
123
- {
124
- //alert('0');
125
- //window.history.back();
126
- }
127
- else
128
- {
129
- //alert(result);
130
- div.children('input[type=hidden]').attr('value',result);
131
-
132
- div.append('<img src="'+result+'" width="100" height="100" />');
133
- div.find('img').hide().load(function(){
134
- $(this).fadeIn(500);
135
- div.children('a.remove_image').removeClass('hide');
136
- });
137
- //iframe.history.back();
138
- div.find('iframe').addClass('hide');
139
- }
140
-
141
- div.find('.loading').remove();
142
-
143
- });
144
-
145
- // send image
146
- //iframe.contents().find('form').submit();
147
-
148
- // add loading div
149
- div.append('<div class="loading"></div>');
150
-
151
- return true;
152
- });
153
- // end form.submit
154
 
155
- div.find('a.remove_image').unbind('click').click(function()
156
- {
157
- div.find('input[type=hidden]').val('');
158
- div.find('img').remove();
159
- div.find('iframe').removeClass('hide');
160
- $(this).addClass('hide');
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  return false;
163
  });
164
- // end a.remove_image.click
165
 
166
- }).trigger('load');
167
- // end iframe.load
 
168
 
 
 
 
 
 
 
 
 
169
  }
170
 
 
171
  /*-------------------------------------------
172
  File Upload
173
  -------------------------------------------*/
174
  $.fn.make_acf_file = function(){
 
175
  var div = $(this);
176
- var iframe = div.find('iframe');
177
-
178
- // can only add functions to the iframe if its loaded
179
- iframe.load(function(){
180
-
181
- iframe.contents().find('form').unbind('submit').submit(function(){
182
-
183
- // if value is empty, return faslse and stop it from uploading!
184
- if(iframe.contents().find('input[type="file"]').val() == '')
185
- {
186
- alert('No File chosen');
187
- return false;
188
- }
189
 
190
- // set up load event
191
- iframe.unbind("load").load(function(){
192
-
193
- var result = $(this).contents().find('body .result').html();
194
-
195
- if(result == null)
196
- {
197
- //alert('null');
198
- }
199
- else if(result == '0')
200
- {
201
- //alert('0');
202
- //window.history.back();
203
- }
204
- else
205
- {
206
- //alert(result);
207
- div.children('input[type=hidden]').attr('value',result);
208
-
209
- div.append('<span>'+result+'</span>');
210
- div.children('a.remove_file').removeClass('hide');
211
-
212
- //iframe.history.back();
213
- div.find('iframe').addClass('hide');
214
- }
215
-
216
- div.find('.loading').remove();
217
-
218
- });
219
-
220
- // send image
221
- //iframe.contents().find('form').submit();
222
-
223
- // add loading div
224
- div.append('<div class="loading"></div>');
225
-
226
- return true;
227
- });
228
 
229
- div.find('a.remove_file').unbind('click').click(function()
230
- {
231
- div.find('input[type=hidden]').val('');
232
- div.find('span').remove();
233
- div.find('iframe').removeClass('hide');
234
- $(this).addClass('hide');
235
 
 
 
 
 
236
  return false;
237
  });
238
- // end a.remove_file.click
239
 
240
- }).trigger('load');
241
- // end iframe.load
 
 
 
 
 
 
 
 
 
 
 
242
  }
 
 
243
 
244
  /*-------------------------------------------
245
  Repeaters
@@ -450,6 +400,7 @@
450
  -------------------------------------------*/
451
  $(document).ready(function(){
452
 
 
453
  var div = $('.postbox#acf_input');
454
 
455
  tinyMCE.settings.theme_advanced_buttons1 += ",|,add_image,add_video,add_audio,add_media";
5
 
6
  // vars
7
  var wysiwyg_count = 0;
8
+ var post_id = 0;
 
9
 
10
 
11
  /*-------------------------------------------
94
  $.fn.make_acf_image = function(){
95
 
96
  var div = $(this);
97
+ var orig_send_to_editor = window.send_to_editor;
98
+
99
+ div.find('input.button').click(function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
 
 
 
 
 
 
101
 
102
+ // show the thickbox
103
+ tb_show('Add Image to field', 'media-upload.php?post_id='+post_id+'&type=image&acf_type=image&TB_iframe=1');
104
+
105
+
106
+ // new window.send_to_editor function
107
+ window.send_to_editor = function(html){
108
+ var new_div = $('<div>'+html+'</div>');
109
+ var img_src = new_div.find('a').attr('href');
110
+
111
+ div.find('input.value').val(img_src);
112
+ div.find('img').attr('src',img_src);
113
+ div.addClass('active');
114
+ tb_remove();
115
+
116
+ window.send_to_editor = orig_send_to_editor;
117
+ }
118
+
119
+
120
+ // Thickbox close needs to reset window.send_to_editor
121
+ $('#TB_overlay, a#TB_closeWindowButton').unbind('click').click(function(){
122
+ window.send_to_editor = orig_send_to_editor;
123
+ tb_remove();
124
  return false;
125
  });
 
126
 
127
+
128
+ return false;
129
+ });
130
 
131
+
132
+ div.find('a.remove_image').unbind('click').click(function()
133
+ {
134
+ div.find('input.value').val('');
135
+ div.removeClass('active');
136
+
137
+ return false;
138
+ });
139
  }
140
 
141
+
142
  /*-------------------------------------------
143
  File Upload
144
  -------------------------------------------*/
145
  $.fn.make_acf_file = function(){
146
+
147
  var div = $(this);
148
+ var orig_send_to_editor = window.send_to_editor;
149
+
150
+ div.find('p.no_file input.button').click(function(){
151
+
152
+ // show the thickbox
153
+ tb_show('Add File to field', 'media-upload.php?post_id='+post_id+'&type=file&acf_type=file&TB_iframe=1');
154
+
155
+
156
+ // new window.send_to_editor function
157
+ window.send_to_editor = function(html) {
158
+ var new_div = $('<div>'+html+'</div>');
159
+ var file_src = new_div.find('a').attr('href');
 
160
 
161
+ div.find('input.value').val(file_src);
162
+ div.find('p.file span').html(file_src);
163
+ div.addClass('active');
164
+ tb_remove();
165
+
166
+ window.send_to_editor = orig_send_to_editor;
167
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
 
 
 
 
 
 
169
 
170
+ // Thickbox close needs to reset window.send_to_editor
171
+ $('#TB_overlay, a#TB_closeWindowButton').unbind('click').click(function(){
172
+ window.send_to_editor = orig_send_to_editor;
173
+ tb_remove();
174
  return false;
175
  });
 
176
 
177
+
178
+ return false;
179
+ });
180
+
181
+
182
+
183
+ div.find('p.file input.button').unbind('click').click(function()
184
+ {
185
+ div.find('input.value').val('');
186
+ div.removeClass('active');
187
+
188
+ return false;
189
+ });
190
  }
191
+
192
+
193
 
194
  /*-------------------------------------------
195
  Repeaters
400
  -------------------------------------------*/
401
  $(document).ready(function(){
402
 
403
+ post_id = $('form#post input#post_ID').val();
404
  var div = $('.postbox#acf_input');
405
 
406
  tinyMCE.settings.theme_advanced_buttons1 += ",|,add_image,add_video,add_audio,add_media";
lang/advanced-custom-fields.pot ADDED
@@ -0,0 +1,355 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2010
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/advanced-custom-fields\n"
7
+ "POT-Creation-Date: 2011-04-26 07:11:21+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: acf.php:173
16
+ msgid "Adv Custom Fields"
17
+ msgstr ""
18
+
19
+ #: acf.php:177 core/acf_post_type.php:4
20
+ msgid "Advanced&nbsp;Custom&nbsp;Fields"
21
+ msgstr ""
22
+
23
+ #: acf.php:262 acf.php:280
24
+ msgid "Error: Field Type does not exist!"
25
+ msgstr ""
26
+
27
+ #: core/info_meta_box.php:5
28
+ msgid "Advanced Custom Fields v"
29
+ msgstr ""
30
+
31
+ #: core/info_meta_box.php:6
32
+ msgid "see what's new"
33
+ msgstr ""
34
+
35
+ #: core/info_meta_box.php:15
36
+ msgid "User Guide + Code Examples"
37
+ msgstr ""
38
+
39
+ #: core/info_meta_box.php:15
40
+ msgid "Visit the Plugin Website"
41
+ msgstr ""
42
+
43
+ #: core/info_meta_box.php:25
44
+ msgid "Need Help?"
45
+ msgstr ""
46
+
47
+ #: core/info_meta_box.php:25
48
+ msgid "Visit the Support Forum"
49
+ msgstr ""
50
+
51
+ #: core/info_meta_box.php:38
52
+ msgid "Help fund future development"
53
+ msgstr ""
54
+
55
+ #: core/info_meta_box.php:51
56
+ msgid "Created by"
57
+ msgstr ""
58
+
59
+ #: core/fields_meta_box.php:26
60
+ msgid "Label"
61
+ msgstr ""
62
+
63
+ #: core/fields_meta_box.php:26
64
+ msgid "Shown on the edit page (eg. Hero Image)"
65
+ msgstr ""
66
+
67
+ #: core/fields_meta_box.php:27
68
+ msgid "Name"
69
+ msgstr ""
70
+
71
+ #: core/fields_meta_box.php:27
72
+ msgid "Used as variable name (eg. hero_image)"
73
+ msgstr ""
74
+
75
+ #: core/fields_meta_box.php:28
76
+ msgid "Field Type"
77
+ msgstr ""
78
+
79
+ #: core/fields_meta_box.php:28
80
+ msgid "Type of field"
81
+ msgstr ""
82
+
83
+ #: core/fields_meta_box.php:102
84
+ msgid "+ Add Field"
85
+ msgstr ""
86
+
87
+ #: core/options_meta_box.php:18
88
+ msgid "Show on page"
89
+ msgstr ""
90
+
91
+ #: core/options_meta_box.php:43
92
+ msgid ""
93
+ "Select the metaboxes you wish to keep on your edit screen.<br />\n"
94
+ "\t\t\tTip: This is useful to customise the edit screen"
95
+ msgstr ""
96
+
97
+ #: core/options_meta_box.php:49
98
+ msgid "Filter Users"
99
+ msgstr ""
100
+
101
+ #: core/options_meta_box.php:72
102
+ msgid ""
103
+ "Select user types to give them access to this ACF<br />\n"
104
+ "\t\t\tTip: If no user types are selected, all user's will have access to "
105
+ "this ACF"
106
+ msgstr ""
107
+
108
+ #: core/acf_post_type.php:5
109
+ msgid "Advanced Custom Fields"
110
+ msgstr ""
111
+
112
+ #: core/acf_post_type.php:6
113
+ msgid "Search Advanced Custom Fields"
114
+ msgstr ""
115
+
116
+ #: core/acf_post_type.php:7
117
+ msgid "All Advanced Custom Fields"
118
+ msgstr ""
119
+
120
+ #: core/acf_post_type.php:8
121
+ msgid "Parent Advanced Custom Fields"
122
+ msgstr ""
123
+
124
+ #: core/acf_post_type.php:9
125
+ msgid "Parent Advanced Custom Fields:"
126
+ msgstr ""
127
+
128
+ #: core/acf_post_type.php:10
129
+ msgid "Edit Advanced Custom Fields"
130
+ msgstr ""
131
+
132
+ #: core/acf_post_type.php:11
133
+ msgid "Update Advanced Custom Fields"
134
+ msgstr ""
135
+
136
+ #: core/acf_post_type.php:12
137
+ msgid "Add New Advanced Custom Fields"
138
+ msgstr ""
139
+
140
+ #: core/acf_post_type.php:13
141
+ msgid "New Advanced Custom Fields Name"
142
+ msgstr ""
143
+
144
+ #: core/location_meta_box.php:16
145
+ msgid "Enter values in the fields below to add this ACF to an edit screen"
146
+ msgstr ""
147
+
148
+ #: core/location_meta_box.php:18
149
+ msgid "The values you enter bellow will be used to match against edit screens"
150
+ msgstr ""
151
+
152
+ #: core/location_meta_box.php:19
153
+ msgid "If any of the values match the edit screen, this ACF will be used"
154
+ msgstr ""
155
+
156
+ #: core/location_meta_box.php:20
157
+ msgid "Blank fields will be ignored"
158
+ msgstr ""
159
+
160
+ #: core/location_meta_box.php:21
161
+ msgid ""
162
+ "Use the override to remove all previous ACF's form an edit screen. This is "
163
+ "useful for creating an ACF for all normal pages, and then creating a custom "
164
+ "ACF for a home page (page title = 'Home'). Please note that the home page "
165
+ "ACF needs a higher page order to remove ACF's before it"
166
+ msgstr ""
167
+
168
+ #: core/location_meta_box.php:32
169
+ msgid "Post Type's"
170
+ msgstr ""
171
+
172
+ #: core/location_meta_box.php:62
173
+ msgid ""
174
+ "Selecting a post type here will add this ACF to all edit screens of that "
175
+ "post type.<br />(if your custom post type does not appear, make sure it is "
176
+ "publicly query-able)<br /><br />\n"
177
+ "\t\t\tTip: Unselect post types and use the options below to customise your "
178
+ "ACF location!<br />\n"
179
+ "\t\t\t(command+click)"
180
+ msgstr ""
181
+
182
+ #: core/location_meta_box.php:69
183
+ msgid "Page Title's"
184
+ msgstr ""
185
+
186
+ #: core/location_meta_box.php:84
187
+ msgid "eg. Home, About Us"
188
+ msgstr ""
189
+
190
+ #: core/location_meta_box.php:89
191
+ msgid "Page Slug's"
192
+ msgstr ""
193
+
194
+ #: core/location_meta_box.php:104
195
+ msgid "eg. home, about-us"
196
+ msgstr ""
197
+
198
+ #: core/location_meta_box.php:109
199
+ msgid "Post ID's"
200
+ msgstr ""
201
+
202
+ #: core/location_meta_box.php:124 core/location_meta_box.php:164
203
+ msgid "eg. 1, 2, 3"
204
+ msgstr ""
205
+
206
+ #: core/location_meta_box.php:129
207
+ msgid "Page Template's"
208
+ msgstr ""
209
+
210
+ #: core/location_meta_box.php:144
211
+ msgid "eg. home_page.php"
212
+ msgstr ""
213
+
214
+ #: core/location_meta_box.php:149
215
+ msgid "Page Parent ID's"
216
+ msgstr ""
217
+
218
+ #: core/location_meta_box.php:169
219
+ msgid "Overrides"
220
+ msgstr ""
221
+
222
+ #: core/location_meta_box.php:186
223
+ msgid ""
224
+ "Tick this box to remove all other ACF's <br />(from the edit screen where "
225
+ "this ACF appears)"
226
+ msgstr ""
227
+
228
+ #: core/fields/post_object.php:12
229
+ msgid "Post Object"
230
+ msgstr ""
231
+
232
+ #: core/fields/post_object.php:48 core/fields/page_link.php:58
233
+ msgid "Select Option"
234
+ msgstr ""
235
+
236
+ #: core/fields/post_object.php:123 core/fields/page_link.php:136
237
+ msgid "Post Type"
238
+ msgstr ""
239
+
240
+ #: core/fields/post_object.php:148
241
+ msgid ""
242
+ "Filter posts by selecting a post type<br />\n"
243
+ "\t\t\t\t* unselecting all is the same as selecting all"
244
+ msgstr ""
245
+
246
+ #: core/fields/post_object.php:154 core/fields/select.php:92
247
+ #: core/fields/page_link.php:167
248
+ msgid "Multiple?"
249
+ msgstr ""
250
+
251
+ #: core/fields/date_picker/date_picker.php:12
252
+ msgid "Date Picker"
253
+ msgstr ""
254
+
255
+ #: core/fields/date_picker/date_picker.php:31
256
+ msgid "Date format"
257
+ msgstr ""
258
+
259
+ #: core/fields/date_picker/date_picker.php:35
260
+ msgid "eg. dd/mm/yy. read more about"
261
+ msgstr ""
262
+
263
+ #: core/fields/text.php:11
264
+ msgid "Text"
265
+ msgstr ""
266
+
267
+ #: core/fields/image.php:11
268
+ msgid "Image"
269
+ msgstr ""
270
+
271
+ #: core/fields/image.php:51
272
+ msgid "Select Image"
273
+ msgstr ""
274
+
275
+ #: core/fields/image.php:74
276
+ msgid "No image selected"
277
+ msgstr ""
278
+
279
+ #: core/fields/image.php:74
280
+ msgid "Add Image"
281
+ msgstr ""
282
+
283
+ #: core/fields/select.php:12
284
+ msgid "Select"
285
+ msgstr ""
286
+
287
+ #: core/fields/select.php:80 core/fields/checkbox.php:70
288
+ msgid "Choices"
289
+ msgstr ""
290
+
291
+ #: core/fields/select.php:84 core/fields/checkbox.php:74
292
+ msgid ""
293
+ "Enter your choices one per line. eg:<br />\n"
294
+ "\t\t\t\toption_1 : Option 1<br />\n"
295
+ "\t\t\t\toption_3 : Option 2<br />\n"
296
+ "\t\t\t\toption_3 : Option 3"
297
+ msgstr ""
298
+
299
+ #: core/fields/true_false.php:11
300
+ msgid "True / False"
301
+ msgstr ""
302
+
303
+ #: core/fields/true_false.php:19
304
+ msgid "True"
305
+ msgstr ""
306
+
307
+ #: core/fields/true_false.php:60
308
+ msgid "Message"
309
+ msgstr ""
310
+
311
+ #: core/fields/true_false.php:64
312
+ msgid "eg. Show extra content"
313
+ msgstr ""
314
+
315
+ #: core/fields/wysiwyg.php:11
316
+ msgid "Wysiwyg Editor"
317
+ msgstr ""
318
+
319
+ #: core/fields/page_link.php:13
320
+ msgid "Page Link"
321
+ msgstr ""
322
+
323
+ #: core/fields/page_link.php:161
324
+ msgid ""
325
+ "Filter posts by selecting a post type<br />\n"
326
+ "\t\t\t\tTip: deselect all post types to show all post type's posts"
327
+ msgstr ""
328
+
329
+ #: core/fields/checkbox.php:11
330
+ msgid "Checkbox"
331
+ msgstr ""
332
+
333
+ #: core/fields/textarea.php:11
334
+ msgid "Text Area"
335
+ msgstr ""
336
+
337
+ #: core/fields/file.php:11
338
+ msgid "File"
339
+ msgstr ""
340
+
341
+ #: core/fields/file.php:51
342
+ msgid "Select File"
343
+ msgstr ""
344
+
345
+ #: core/fields/file.php:74
346
+ msgid "Remove File"
347
+ msgstr ""
348
+
349
+ #: core/fields/file.php:76
350
+ msgid "No File selected"
351
+ msgstr ""
352
+
353
+ #: core/fields/file.php:76
354
+ msgid "Add File"
355
+ msgstr ""
readme.txt CHANGED
@@ -80,6 +80,14 @@ http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
 
83
  = 1.1.2 =
84
  * Fixed WYSIWYG API format issue
85
  * Fixed Page Link API format issue
80
 
81
  == Changelog ==
82
 
83
+ = 1.1.3 =
84
+ * Image Field now uses WP thickbox!
85
+ * File Field now uses WP thickbox!
86
+ * Page Link now supports multiple select
87
+ * All Text has been wrapped in the _e() / __() functions to support translations!
88
+ * Small bug fixes / housekeeping
89
+ * Added ACF_WP_Query API function
90
+
91
  = 1.1.2 =
92
  * Fixed WYSIWYG API format issue
93
  * Fixed Page Link API format issue