Advanced Custom Fields - Version 3.0.6

Version Description

  • Bug Fix: Location meta box now shows all pages / posts
  • Bug Fix: upgrade and settings url should now work / avoid conflicts with other plugins
Download this release

Release Info

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

Code changes from version 3.0.4 to 3.0.6

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: Customise your edit pages with an assortment of field types: Wysiwyg, Repeater, text, textarea, image, file, select, checkbox post type, page link and more! Hide unwanted metaboxes and assign to any edit page!
6
- Version: 3.0.4
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
@@ -45,7 +45,7 @@ class Acf
45
  $this->dir = plugins_url('',__FILE__);
46
  $this->siteurl = get_bloginfo('url');
47
  $this->wpadminurl = admin_url();
48
- $this->version = '3.0.4';
49
  $this->upgrade_version = '3.0.0'; // this is the latest version which requires an upgrade
50
 
51
 
@@ -60,6 +60,7 @@ class Acf
60
  add_action('init', array($this, 'init'));
61
  add_action('admin_menu', array($this,'admin_menu'));
62
  add_action('admin_head', array($this,'admin_head'));
 
63
  add_action('save_post', array($this, 'save_post'));
64
  add_action('wp_ajax_get_input_metabox_ids', array($this, 'get_input_metabox_ids'));
65
  add_action('wp_ajax_get_input_style', array($this, 'the_input_style'));
@@ -182,8 +183,9 @@ class Acf
182
  function admin_menu() {
183
 
184
  // add acf page to options menu
185
- add_options_page(__("Adv Custom Fields",'acf'), __("Adv Custom Fields",'acf'), 'manage_options', 'edit.php?post_type=acf');
186
- add_options_page(__("ACF Upgrade",'acf'), __("Adv Upgrade",'acf'), 'manage_options', 'acf-upgrade', array($this, 'upgrade'));
 
187
 
188
  }
189
 
@@ -205,18 +207,32 @@ class Acf
205
 
206
  /*--------------------------------------------------------------------------------------
207
  *
208
- * upgrade
209
  *
210
  * @author Elliot Condon
211
  * @since 1.0.0
212
  *
213
  *-------------------------------------------------------------------------------------*/
214
 
215
- function upgrade()
216
  {
217
  include('core/admin/upgrade.php');
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  /*--------------------------------------------------------------------------------------
222
  *
@@ -244,7 +260,14 @@ class Acf
244
  *-------------------------------------------------------------------------------------*/
245
 
246
  function admin_print_scripts() {
247
-
 
 
 
 
 
 
 
248
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
249
  {
250
  if($GLOBALS['post_type'] == 'acf')
@@ -265,6 +288,12 @@ class Acf
265
 
266
  function admin_print_styles() {
267
 
 
 
 
 
 
 
268
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
269
  {
270
  if($GLOBALS['post_type'] == 'acf')
@@ -299,13 +328,17 @@ class Acf
299
  global $post;
300
 
301
  // hide upgrade page from nav
302
- echo '<style type="text/css"> #menu-settings a[href="options-general.php?page=acf-upgrade"]{ display:none; }</style>';
 
 
 
 
303
 
304
 
305
  // only add to edit pages
306
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
307
  {
308
-
309
  if($GLOBALS['post_type'] == 'acf')
310
  {
311
  echo '<script type="text/javascript" src="'.$this->dir.'/js/fields.js" ></script>';
@@ -391,15 +424,15 @@ class Acf
391
  function admin_footer()
392
  {
393
  // acf edit list
394
- if($GLOBALS['pagenow'] == 'edit.php' && $GLOBALS['post_type'] == 'acf')
395
  {
396
- include('core/admin/meta_box_acf.php');
397
  }
398
 
399
  // input meta boxes
400
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')) && $GLOBALS['post_type'] != 'acf')
401
  {
402
- wp_preload_dialogs( array( 'plugins' => 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus' ) );
403
  ?>
404
  <script type="text/javascript">
405
  (function($){
@@ -701,6 +734,27 @@ class Acf
701
  }
702
 
703
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
704
  /*--------------------------------------------------------------------------------------
705
  *
706
  * get_value
3
  Plugin Name: Advanced Custom Fields
4
  Plugin URI: http://plugins.elliotcondon.com/advanced-custom-fields/
5
  Description: Customise your edit pages with an assortment of field types: Wysiwyg, Repeater, text, textarea, image, file, select, checkbox post type, page link and more! Hide unwanted metaboxes and assign to any edit page!
6
+ Version: 3.0.6
7
  Author: Elliot Condon
8
  Author URI: http://www.elliotcondon.com/
9
  License: GPL
45
  $this->dir = plugins_url('',__FILE__);
46
  $this->siteurl = get_bloginfo('url');
47
  $this->wpadminurl = admin_url();
48
+ $this->version = '3.0.6';
49
  $this->upgrade_version = '3.0.0'; // this is the latest version which requires an upgrade
50
 
51
 
60
  add_action('init', array($this, 'init'));
61
  add_action('admin_menu', array($this,'admin_menu'));
62
  add_action('admin_head', array($this,'admin_head'));
63
+ add_filter('name_save_pre', array($this, 'save_name'));
64
  add_action('save_post', array($this, 'save_post'));
65
  add_action('wp_ajax_get_input_metabox_ids', array($this, 'get_input_metabox_ids'));
66
  add_action('wp_ajax_get_input_style', array($this, 'the_input_style'));
183
  function admin_menu() {
184
 
185
  // add acf page to options menu
186
+ add_menu_page(__("Custom Fields",'acf'), __("Custom Fields",'acf'), 'manage_options', 'edit.php?post_type=acf');
187
+ add_submenu_page('edit.php?post_type=acf', __('Settings','wp3i'), __('Settings','wp3i'), 'manage_options','acf-settings',array($this,'admin_page_settings'));
188
+ add_submenu_page('edit.php?post_type=acf', __('Upgrade','wp3i'), __('Upgrade','wp3i'), 'manage_options','acf-upgrade',array($this,'admin_page_upgrade'));
189
 
190
  }
191
 
207
 
208
  /*--------------------------------------------------------------------------------------
209
  *
210
+ * admin_page_upgrade
211
  *
212
  * @author Elliot Condon
213
  * @since 1.0.0
214
  *
215
  *-------------------------------------------------------------------------------------*/
216
 
217
+ function admin_page_upgrade()
218
  {
219
  include('core/admin/upgrade.php');
220
  }
221
 
222
+ /*--------------------------------------------------------------------------------------
223
+ *
224
+ * admin_page_settings
225
+ *
226
+ * @author Elliot Condon
227
+ * @since 3.0.5
228
+ *
229
+ *-------------------------------------------------------------------------------------*/
230
+
231
+ function admin_page_settings()
232
+ {
233
+ include('core/admin/page_settings.php');
234
+ }
235
+
236
 
237
  /*--------------------------------------------------------------------------------------
238
  *
260
  *-------------------------------------------------------------------------------------*/
261
 
262
  function admin_print_scripts() {
263
+
264
+ // thickbox
265
+ if($GLOBALS['pagenow'] == 'edit.php' && isset($GLOBALS['post_type']) && $GLOBALS['post_type'] == 'acf')
266
+ {
267
+ wp_enqueue_script( 'jquery' );
268
+ wp_enqueue_script( 'thickbox' );
269
+ }
270
+
271
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
272
  {
273
  if($GLOBALS['post_type'] == 'acf')
288
 
289
  function admin_print_styles() {
290
 
291
+ // thickbox
292
+ if($GLOBALS['pagenow'] == 'edit.php' && isset($GLOBALS['post_type']) && $GLOBALS['post_type'] == 'acf')
293
+ {
294
+ wp_enqueue_style( 'thickbox' );
295
+ }
296
+
297
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
298
  {
299
  if($GLOBALS['post_type'] == 'acf')
328
  global $post;
329
 
330
  // hide upgrade page from nav
331
+ echo '<style type="text/css">
332
+ #toplevel_page_edit-post_type-acf a[href="edit.php?post_type=acf&page=acf-upgrade"]{ display:none; }
333
+ #toplevel_page_edit-post_type-acf .wp-menu-image { background: url("../wp-admin/images/menu.png") no-repeat scroll 0 -33px transparent; }
334
+ #toplevel_page_edit-post_type-acf .wp-menu-image img { display:none; }
335
+ </style>';
336
 
337
 
338
  // only add to edit pages
339
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')))
340
  {
341
+ // edit field
342
  if($GLOBALS['post_type'] == 'acf')
343
  {
344
  echo '<script type="text/javascript" src="'.$this->dir.'/js/fields.js" ></script>';
424
  function admin_footer()
425
  {
426
  // acf edit list
427
+ if($GLOBALS['pagenow'] == 'edit.php' && isset($GLOBALS['post_type']) && $GLOBALS['post_type'] == 'acf')
428
  {
429
+ include('core/admin/page_acf.php');
430
  }
431
 
432
  // input meta boxes
433
  if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php')) && $GLOBALS['post_type'] != 'acf')
434
  {
435
+ //wp_preload_dialogs( array( 'plugins' => 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus' ) );
436
  ?>
437
  <script type="text/javascript">
438
  (function($){
734
  }
735
 
736
 
737
+ /*--------------------------------------------------------------------------------------
738
+ *
739
+ * save_name
740
+ * - this function intercepts the acf post obejct and adds an "acf_" to the start of
741
+ * it's name to stop conflicts between acf's and page's urls
742
+ *
743
+ * @author Elliot Condon
744
+ * @since 1.0.0
745
+ *
746
+ *-------------------------------------------------------------------------------------*/
747
+
748
+ function save_name($name)
749
+ {
750
+ if (isset($_POST['post_type']) && $_POST['post_type'] == 'acf')
751
+ {
752
+ $name = 'acf_' . sanitize_title_with_dashes($_POST['post_title']);
753
+ }
754
+ return $name;
755
+ }
756
+
757
+
758
  /*--------------------------------------------------------------------------------------
759
  *
760
  * get_value
core/actions/init.php CHANGED
@@ -1,16 +1,24 @@
1
  <?php
2
 
3
- // setup fields
 
 
 
 
4
  $this->setup_fields();
5
 
6
- // upgrade
 
 
 
 
 
7
  $version = get_option('acf_version', false);
8
-
9
  if($version)
10
  {
11
  if(version_compare($version,$this->upgrade_version) < 0)
12
  {
13
- $this->admin_message('<p>Advanced Custom Fields v' . $this->version . ' requires a database upgrade. Please <a href="http://codex.wordpress.org/Backing_Up_Your_Database">backup your database</a> then click <a href="' . admin_url() . 'options-general.php?page=acf-upgrade" class="button">Upgrade Database</a></p>');
14
 
15
  }
16
  }
@@ -19,7 +27,11 @@ else
19
  update_option('acf_version', $this->version );
20
  }
21
 
22
- // deactivate field
 
 
 
 
23
  if(isset($_POST['acf_field_deactivate']))
24
  {
25
  // vars
@@ -47,9 +59,12 @@ if(isset($_POST['acf_field_deactivate']))
47
  $this->admin_message($message);
48
  }
49
 
50
-
51
- // activate field
52
- if(isset($_POST['acf_field_activate']) && isset($_POST['key']))
 
 
 
53
  {
54
  // vars
55
  $message = "";
@@ -84,9 +99,12 @@ if(isset($_POST['acf_field_activate']) && isset($_POST['key']))
84
  }
85
  }
86
 
87
- // create acf post type
 
 
 
88
  $labels = array(
89
- 'name' => __( 'Advanced&nbsp;Custom&nbsp;Fields', 'acf' ),
90
  'singular_name' => __( 'Advanced Custom Fields', 'acf' ),
91
  'add_new' => __( 'Add New' , 'acf' ),
92
  'add_new_item' => __( 'Add New Field Group' , 'acf' ),
@@ -113,7 +131,12 @@ register_post_type('acf', array(
113
  'show_in_menu' => false,
114
  ));
115
 
116
- // set custom columns for acf post type
 
 
 
 
 
117
  function acf_columns_filter($columns)
118
  {
119
  $columns = array(
@@ -123,5 +146,4 @@ function acf_columns_filter($columns)
123
  return $columns;
124
  }
125
 
126
- add_filter("manage_edit-acf_columns", "acf_columns_filter");
127
  ?>
1
  <?php
2
 
3
+ /*
4
+ * Settup Fields
5
+ * this function will create an array of field objects, including custom registered field types
6
+ */
7
+
8
  $this->setup_fields();
9
 
10
+ /*
11
+ * Upgrade
12
+ * test the current acf version against the version in the main file
13
+ * If this is a newer version, show the upgrade database message
14
+ */
15
+
16
  $version = get_option('acf_version', false);
 
17
  if($version)
18
  {
19
  if(version_compare($version,$this->upgrade_version) < 0)
20
  {
21
+ $this->admin_message('<p>Advanced Custom Fields v' . $this->version . ' requires a database upgrade. Please <a href="http://codex.wordpress.org/Backing_Up_Your_Database">backup your database</a> then click <a href="' . admin_url() . 'edit.php?post_type=acf&page=acf-upgrade" class="button">Upgrade Database</a></p>');
22
 
23
  }
24
  }
27
  update_option('acf_version', $this->version );
28
  }
29
 
30
+ /*
31
+ * Deactivate add-on
32
+ * called from page_settings, this code will deactivate an add-on
33
+ */
34
+
35
  if(isset($_POST['acf_field_deactivate']))
36
  {
37
  // vars
59
  $this->admin_message($message);
60
  }
61
 
62
+ /*
63
+ * Actviate add-on
64
+ * called from page_settings, this code will activate an add-on
65
+ */
66
+
67
+ if(isset($_POST['acf_field_activate']) && isset($_POST['key']))
68
  {
69
  // vars
70
  $message = "";
99
  }
100
  }
101
 
102
+ /*
103
+ * Create ACF Post Type
104
+ */
105
+
106
  $labels = array(
107
+ 'name' => __( 'Field&nbsp;Groups', 'acf' ),
108
  'singular_name' => __( 'Advanced Custom Fields', 'acf' ),
109
  'add_new' => __( 'Add New' , 'acf' ),
110
  'add_new_item' => __( 'Add New Field Group' , 'acf' ),
131
  'show_in_menu' => false,
132
  ));
133
 
134
+ /*
135
+ * Set Custom Columns
136
+ * for the acf edit field groups page
137
+ */
138
+
139
+ add_filter("manage_edit-acf_columns", "acf_columns_filter");
140
  function acf_columns_filter($columns)
141
  {
142
  $columns = array(
146
  return $columns;
147
  }
148
 
 
149
  ?>
core/actions/save_fields.php CHANGED
@@ -3,7 +3,6 @@
3
  // strip slashes
4
  $_POST = array_map('stripslashes_deep', $_POST);
5
 
6
-
7
  // save fields
8
  $fields = $_POST['fields'];
9
 
3
  // strip slashes
4
  $_POST = array_map('stripslashes_deep', $_POST);
5
 
 
6
  // save fields
7
  $fields = $_POST['fields'];
8
 
core/admin/meta_box_acf.php DELETED
@@ -1,218 +0,0 @@
1
- <link rel="stylesheet" type="text/css" href="<?php echo $this->dir ?>/css/acf.css" />
2
- <script type="text/javascript" src="<?php echo $this->dir ?>/js/acf.js" ></script>
3
- <?php
4
- /*--------------------------------------------------------------------------------------
5
- *
6
- * Screen Meta Content
7
- *
8
- *-------------------------------------------------------------------------------------*/
9
- ?>
10
- <div id="screen-meta-activate-acf-wrap" class="screen-meta-wrap hidden acf">
11
- <div class="screen-meta-content">
12
-
13
- <h5><?php _e("Unlock Special Fields.",'acf'); ?></h5>
14
- <p><?php _e("Special Fields can be unlocked by purchasing a license key. Each key can be used on multiple sites.",'acf'); ?> <a href="http://plugins.elliotcondon.com/shop/"><?php _e("Visit the Plugin Store",'acf'); ?></a></p>
15
- <table class="acf_activate widefat">
16
- <thead>
17
- <tr>
18
- <th><?php _e("Field Type",'acf'); ?></th>
19
- <th><?php _e("Status",'acf'); ?></th>
20
- <th><?php _e("Activation Code",'acf'); ?></th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
- <!-- Repeater Field -->
25
- <tr>
26
- <td><?php _e("Repeater Field",'acf'); ?></td>
27
- <td><?php echo $this->is_field_unlocked('repeater') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
28
- <td>
29
- <form action="" method="post">
30
- <?php if($this->is_field_unlocked('repeater')){
31
- echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('repeater'),-4) .'</span>';
32
- echo '<input type="hidden" name="acf_field_deactivate" value="repeater" />';
33
- echo '<input type="submit" class="button" value="Deactivate" />';
34
- }
35
- else
36
- {
37
- echo '<input type="text" name="key" value="" />';
38
- echo '<input type="hidden" name="acf_field_activate" value="repeater" />';
39
- echo '<input type="submit" class="button" value="Activate" />';
40
- } ?>
41
- </form>
42
- </td>
43
- </tr>
44
- <!-- Flexible Field -->
45
- <?php /*<tr>
46
- <td><?php _e("Flexible Content Field",'acf'); ?></td>
47
- <td><?php echo $this->is_field_unlocked('flexible_content') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
48
- <td>
49
- <form action="" method="post">
50
- <?php if($this->is_field_unlocked('flexible_content')){
51
- echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('flexible_content'),-4) .'</span>';
52
- echo '<input type="hidden" name="acf_field_deactivate" value="flexible_content" />';
53
- echo '<input type="submit" class="button" value="Deactivate" />';
54
- }
55
- else
56
- {
57
- echo '<input type="text" name="key" value="" />';
58
- echo '<input type="hidden" name="acf_field_activate" value="flexible_content" />';
59
- echo '<input type="submit" class="button" value="Activate" />';
60
- } ?>
61
- </form>
62
- </td>
63
- </tr>*/ ?>
64
- <!-- Options Page -->
65
- <tr>
66
- <td><?php _e("Options Page",'acf'); ?></td>
67
- <td><?php echo $this->is_field_unlocked('options_page') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
68
- <td>
69
- <form action="" method="post">
70
- <?php if($this->is_field_unlocked('options_page')){
71
- echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('options_page'),-4) .'</span>';
72
- echo '<input type="hidden" name="acf_field_deactivate" value="options_page" />';
73
- echo '<input type="submit" class="button" value="Deactivate" />';
74
- }
75
- else
76
- {
77
- echo '<input type="text" name="key" value="" />';
78
- echo '<input type="hidden" name="acf_field_activate" value="options_page" />';
79
- echo '<input type="submit" class="button" value="Activate" />';
80
- } ?>
81
- </form>
82
- </td>
83
- </tr>
84
- </tbody>
85
- </table>
86
- </div>
87
- </div>
88
- <div id="screen-meta-export-acf-wrap" class="screen-meta-wrap hidden acf">
89
- <div class="screen-meta-content">
90
-
91
- <form id="acf-screen-meta-form-1" method="post" action="<?php echo $this->dir; ?>/core/actions/export.php">
92
-
93
- <h5><?php _e("Export",'acf'); ?></h5>
94
- <p><?php _e("ACF will create a .xml export file which is compatible with the native WP import plugin.",'acf'); ?></p>
95
-
96
- <table class="acf_activate widefat">
97
- <thead>
98
- <tr>
99
- <th><?php _e("Select which ACF groups to export",'acf'); ?></th>
100
- </tr>
101
- </thead>
102
- <tbody>
103
- <tr>
104
- <td>
105
- <?php
106
-
107
- $acfs = get_pages(array(
108
- 'numberposts' => -1,
109
- 'post_type' => 'acf',
110
- 'sort_column' => 'menu_order',
111
- 'order' => 'ASC',
112
- ));
113
-
114
- // blank array to hold acfs
115
- $acf_posts = array();
116
-
117
- if($acfs)
118
- {
119
- foreach($acfs as $acf)
120
- {
121
- $acf_posts[$acf->ID] = $acf->post_title;
122
- }
123
- }
124
-
125
- $this->create_field(array(
126
- 'type' => 'select',
127
- 'name' => 'acf_posts',
128
- 'value' => '',
129
- 'choices' => $acf_posts,
130
- 'multiple' => '1',
131
- ));
132
-
133
- ?>
134
- <input type="submit" class="button" name="acf_export" value="<?php _e("Export",'acf'); ?>" />
135
- </td>
136
- </tr>
137
- </tbody>
138
- </table>
139
- </form>
140
-
141
- <form id="acf-screen-meta-form-2">
142
- <h5><?php _e("Import",'acf'); ?></h5>
143
- <p><?php _e("Have an ACF export file? Import it here. Please note that v2 and v3 .xml files are not compatible.",'acf'); ?></p>
144
-
145
- <table class="acf_activate widefat">
146
- <thead>
147
- <tr>
148
- <th><?php _e("Import your .xml file",'acf'); ?></th>
149
- </tr>
150
- </thead>
151
- <tbody>
152
- <tr>
153
- <td>
154
- <ol>
155
- <li>Navigate to the <a href="<?php echo admin_url(); ?>import.php">Import Tool</a> and select WordPress</li>
156
- <li>Install WP import plugin if prompted</li>
157
- <li>Upload and import your exported .xml file</li>
158
- <li>Select your user and ignore Import Attachments</li>
159
- <li>That's it! Happy WordPressing</li>
160
- </ol>
161
- </td>
162
- </tr>
163
- </tbody>
164
- </table>
165
- </form>
166
-
167
- <div class="clear"></div>
168
- </div>
169
- </div>
170
- <?php
171
- /*--------------------------------------------------------------------------------------
172
- *
173
- * Screen Meta Toggle Tabs
174
- *
175
- *-------------------------------------------------------------------------------------*/
176
- ?>
177
- <div id="screen-meta-activate-acf-link-wrap" class="hide-if-no-js screen-meta-toggle acf">
178
- <a href="#screen-meta-activate-acf" id="screen-meta-activate-acf-link" class="show-settings"><?php _e("Unlock Fields",'acf'); ?></a>
179
- </div>
180
- <div id="screen-meta-export-acf-link-wrap" class="hide-if-no-js screen-meta-toggle acf">
181
- <a href="#screen-meta-export-acf" id="screen-meta-export-acf-link" class="show-settings"><?php _e("Import / Export",'acf'); ?></a>
182
- </div>
183
- <?php
184
- /*--------------------------------------------------------------------------------------
185
- *
186
- * Layout
187
- *
188
- *-------------------------------------------------------------------------------------*/
189
- ?>
190
- <div class="acf_col_right hidden metabox-holder" id="poststuff" >
191
-
192
- <div class="postbox">
193
- <div class="handlediv"><br></div>
194
- <h3 class="hndle"><span><?php _e("Advanced Custom Fields v",'acf'); ?><?php echo $this->version; ?></span></h3>
195
- <div class="inside">
196
- <div class="field">
197
- <h4><?php _e("Changelog",'acf'); ?></h4>
198
- <p><?php _e("See what's new in",'acf'); ?> <a class="thickbox" href="<?php bloginfo('url'); ?>/wp-admin/plugin-install.php?tab=plugin-information&plugin=advanced-custom-fields&section=changelog&TB_iframe=true&width=640&height=559">v<?php echo $this->version; ?></a>
199
- </div>
200
- <div class="field">
201
- <h4><?php _e("Resources",'acf'); ?></h4>
202
- <p><?php _e("Watch tutorials, read documentation, learn the API code and find some tips &amp; tricks for your next web project.",'acf'); ?><br />
203
- <a href="http://plugins.elliotcondon.com/advanced-custom-fields/"><?php _e("View the plugins website",'acf'); ?></a></p>
204
- </div>
205
- <!-- <div class="field">
206
- <h4><?php _e("Support",'acf'); ?></h4>
207
- <p><?php _e("Join the growing community over at the support forum to share ideas, report bugs and keep up to date with ACF",'acf'); ?><br />
208
- <a href="http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/"><?php _e("View the Support Forum",'acf'); ?></a></p>
209
- </div> -->
210
- <div class="field">
211
- <h4><?php _e("Developed by",'acf'); ?> Elliot Condon</h4>
212
- <p><a href="http://wordpress.org/extend/plugins/advanced-custom-fields/"><?php _e("Vote for ACF",'acf'); ?></a> | <a href="http://twitter.com/elliotcondon"><?php _e("Twitter",'acf'); ?></a> | <a href="http://blog.elliotcondon.com"><?php _e("Blog",'acf'); ?></a></p>
213
- </div>
214
-
215
-
216
- </div>
217
- </div>
218
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/admin/meta_box_fields.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
-
 
 
 
 
 
3
  // vars
4
  global $post;
5
  $fields_names = array();
1
  <?php
2
+ /**
3
+ * Meta Box: Fields
4
+ *
5
+ * This file creates the HTML for a list of fields within a Field Group
6
+ */
7
+
8
  // vars
9
  global $post;
10
  $fields_names = array();
core/admin/meta_box_input.php CHANGED
@@ -17,7 +17,7 @@ $post_id = $post ? $post->ID : 999999999;
17
  if($fields)
18
  {
19
  echo '<input type="hidden" name="save_input" value="true" />';
20
- echo '<div class="options" data-layout="' . $options['layout'] . '" data-show="' . $show . '"></div>';
21
  foreach($fields as $field)
22
  {
23
  // if they didn't select a type, skip this field
17
  if($fields)
18
  {
19
  echo '<input type="hidden" name="save_input" value="true" />';
20
+ echo '<div class="options" data-layout="' . $options['layout'] . '" data-show="' . $show . '" style="display:none"></div>';
21
  foreach($fields as $field)
22
  {
23
  // if they didn't select a type, skip this field
core/admin/meta_box_location.php CHANGED
@@ -243,17 +243,12 @@ if(empty($location['rules']))
243
  </div>
244
  <div rel="user_type">
245
  <?php
246
-
247
  $this->create_field(array(
248
  'type' => 'select',
249
  'name' => 'location[rules]['.$k.'][value]',
250
  'value' => $rule['value'],
251
- 'choices' => array(
252
- 'administrator' => 'Administrator',
253
- 'editor' => 'Editor',
254
- 'author' => 'Author',
255
- 'contributor' => 'contributor'
256
- )
257
  ));
258
 
259
  ?>
243
  </div>
244
  <div rel="user_type">
245
  <?php
246
+ global $wp_roles;
247
  $this->create_field(array(
248
  'type' => 'select',
249
  'name' => 'location[rules]['.$k.'][value]',
250
  'value' => $rule['value'],
251
+ 'choices' => $roles = $wp_roles->get_names()
 
 
 
 
 
252
  ));
253
 
254
  ?>
core/admin/page_acf.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Meta Box ACF
4
+ *
5
+ * This file creates the extra HTML for the main ACF admin page (Field Groups)
6
+ */
7
+ ?>
8
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->dir ?>/css/global.css" />
9
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->dir ?>/css/acf.css" />
10
+ <div id="acf-col-right" class="hidden">
11
+
12
+ <div class="wp-box">
13
+ <div class="inner">
14
+ <h3 class="h2"><?php _e("Advanced Custom Fields",'acf'); ?> <span>v<?php echo $this->version; ?></span></h3>
15
+
16
+ <h3><?php _e("Changelog",'acf'); ?></h3>
17
+ <p><?php _e("See what's new in",'acf'); ?> <a class="thickbox" href="<?php bloginfo('url'); ?>/wp-admin/plugin-install.php?tab=plugin-information&plugin=advanced-custom-fields&section=changelog&TB_iframe=true&width=640&height=559">v<?php echo $this->version; ?></a>
18
+
19
+ <h3><?php _e("Resources",'acf'); ?></h3>
20
+ <p><?php _e("Read documentation, learn the functions and find some tips &amp; tricks for your next web project.",'acf'); ?><br />
21
+ <a href="http://plugins.elliotcondon.com/advanced-custom-fields/"><?php _e("View the plugins website",'acf'); ?></a></p>
22
+
23
+ </div>
24
+ <div class="footer">
25
+ <ul class="left hl">
26
+ <li><?php _e("Created by",'acf'); ?> Elliot Condon</li>
27
+ </ul>
28
+ <ul class="right hl">
29
+ <li><a href="http://wordpress.org/extend/plugins/advanced-custom-fields/"><?php _e("Vote",'acf'); ?></a></li>
30
+ <li><a href="http://twitter.com/elliotcondon"><?php _e("Follow",'acf'); ?></a></li>
31
+ </ul>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ <script type="text/javascript">
36
+ (function($){
37
+
38
+ $('#screen-meta-links').remove();
39
+ $('#wpbody .wrap').wrapInner('<div id="acf-col-left" />');
40
+ $('#wpbody .wrap').wrapInner('<div id="acf-cols" />');
41
+ $('#acf-col-right').removeClass('hidden').prependTo('#acf-cols');
42
+
43
+ })(jQuery);
44
+ </script>
core/admin/page_settings.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Page: Settings
4
+ *
5
+ * This file creates the HTML for the ACF admin page (Settings)
6
+ * On this page you can:
7
+ * - Activate / deactivate keys
8
+ * - Export acf objects
9
+ * - Update ACF global settings
10
+ */
11
+
12
+ ?>
13
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->dir ?>/css/global.css" />
14
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->dir ?>/css/acf.css" />
15
+
16
+ <!-- Wrap -->
17
+ <div class="wrap">
18
+ <form method="post">
19
+
20
+ <div class="icon32" id="icon-acf"><br></div>
21
+ <h2 style="margin: 0 0 25px;"><?php _e("Advanced Custom Fields Settings",'acf'); ?></h2>
22
+
23
+ <!-- Settings -->
24
+ <div class="wp-box">
25
+ <div class="inner">
26
+ <h2><?php _e("Activate Add-ons.",'acf'); ?></h2>
27
+ <table class="acf_activate widefat">
28
+ <thead>
29
+ <tr>
30
+ <th><?php _e("Field Type",'acf'); ?></th>
31
+ <th><?php _e("Status",'acf'); ?></th>
32
+ <th><?php _e("Activation Code",'acf'); ?></th>
33
+ </tr>
34
+ </thead>
35
+ <tbody>
36
+ <!-- Repeater Field -->
37
+ <tr>
38
+ <td><?php _e("Repeater Field",'acf'); ?></td>
39
+ <td><?php echo $this->is_field_unlocked('repeater') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
40
+ <td>
41
+ <form action="" method="post">
42
+ <?php if($this->is_field_unlocked('repeater')){
43
+ echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('repeater'),-4) .'</span>';
44
+ echo '<input type="hidden" name="acf_field_deactivate" value="repeater" />';
45
+ echo '<input type="submit" class="button" value="Deactivate" />';
46
+ }
47
+ else
48
+ {
49
+ echo '<input type="text" name="key" value="" />';
50
+ echo '<input type="hidden" name="acf_field_activate" value="repeater" />';
51
+ echo '<input type="submit" class="button" value="Activate" />';
52
+ } ?>
53
+ </form>
54
+ </td>
55
+ </tr>
56
+ <!-- Flexible Field -->
57
+ <?php /*<tr>
58
+ <td><?php _e("Flexible Content Field",'acf'); ?></td>
59
+ <td><?php echo $this->is_field_unlocked('flexible_content') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
60
+ <td>
61
+ <form action="" method="post">
62
+ <?php if($this->is_field_unlocked('flexible_content')){
63
+ echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('flexible_content'),-4) .'</span>';
64
+ echo '<input type="hidden" name="acf_field_deactivate" value="flexible_content" />';
65
+ echo '<input type="submit" class="button" value="Deactivate" />';
66
+ }
67
+ else
68
+ {
69
+ echo '<input type="text" name="key" value="" />';
70
+ echo '<input type="hidden" name="acf_field_activate" value="flexible_content" />';
71
+ echo '<input type="submit" class="button" value="Activate" />';
72
+ } ?>
73
+ </form>
74
+ </td>
75
+ </tr>*/ ?>
76
+ <!-- Options Page -->
77
+ <tr>
78
+ <td><?php _e("Options Page",'acf'); ?></td>
79
+ <td><?php echo $this->is_field_unlocked('options_page') ? __("Active",'acf') : __("Inactive",'acf'); ?></td>
80
+ <td>
81
+ <form action="" method="post">
82
+ <?php if($this->is_field_unlocked('options_page')){
83
+ echo '<span class="activation_code">XXXX-XXXX-XXXX-'.substr($this->get_license_key('options_page'),-4) .'</span>';
84
+ echo '<input type="hidden" name="acf_field_deactivate" value="options_page" />';
85
+ echo '<input type="submit" class="button" value="Deactivate" />';
86
+ }
87
+ else
88
+ {
89
+ echo '<input type="text" name="key" value="" />';
90
+ echo '<input type="hidden" name="acf_field_activate" value="options_page" />';
91
+ echo '<input type="submit" class="button" value="Activate" />';
92
+ } ?>
93
+ </form>
94
+ </td>
95
+ </tr>
96
+ </tbody>
97
+ </table>
98
+ </div>
99
+ <div class="footer">
100
+ <ul class="hl left">
101
+ <li><?php _e("Add-ons can be unlocked by purchasing a license key. Each key can be used on multiple sites.",'acf'); ?> <a href="http://plugins.elliotcondon.com/shop/"><?php _e("Visit the Plugin Store",'acf'); ?></a></li>
102
+ </ul>
103
+ <ul class="hl right">
104
+ <li></li>
105
+ </ul>
106
+ </div>
107
+ </div>
108
+ <!-- Settings -->
109
+
110
+ <br />
111
+ <br />
112
+ <br />
113
+
114
+ <!-- Export / Import -->
115
+ <form method="post" action="<?php echo $this->dir; ?>/core/actions/export.php">
116
+ <div class="wp-box">
117
+ <div class="wp-box-half left">
118
+ <div class="inner">
119
+ <h2><?php _e("Export Field Groups",'acf'); ?></h2>
120
+
121
+ <?php
122
+ $acfs = get_pages(array(
123
+ 'numberposts' => -1,
124
+ 'post_type' => 'acf',
125
+ 'sort_column' => 'menu_order',
126
+ 'order' => 'ASC',
127
+ ));
128
+
129
+ // blank array to hold acfs
130
+ $acf_posts = array();
131
+
132
+ if($acfs)
133
+ {
134
+ foreach($acfs as $acf)
135
+ {
136
+ $acf_posts[$acf->ID] = $acf->post_title;
137
+ }
138
+ }
139
+
140
+ $this->create_field(array(
141
+ 'type' => 'select',
142
+ 'name' => 'acf_posts',
143
+ 'value' => '',
144
+ 'choices' => $acf_posts,
145
+ 'multiple' => '1',
146
+ ));
147
+ ?>
148
+
149
+ </div>
150
+ <div class="footer">
151
+ <ul class="hl left">
152
+ <li><?php _e("ACF will create a .xml export file which is compatible with the native WP import plugin.",'acf'); ?></li>
153
+ </ul>
154
+ <ul class="hl right">
155
+ <li><input type="submit" class="button-primary" name="acf_export" value="<?php _e("Export",'acf'); ?>" /></li>
156
+ </ul>
157
+ </div>
158
+ </div>
159
+ <div class="wp-box-half right">
160
+ <div class="inner">
161
+ <h2><?php _e("Import Field Groups",'acf'); ?></h2>
162
+ <ol>
163
+ <li><?php _e("Navigate to the",'acf'); ?> <a href="<?php echo admin_url(); ?>import.php"><?php _e("Import Tool",'acf'); ?></a> <?php _e("and select WordPress",'acf'); ?></li>
164
+ <li><?php _e("Install WP import plugin if prompted",'acf'); ?></li>
165
+ <li><?php _e("Upload and import your exported .xml file",'acf'); ?></li>
166
+ <li><?php _e("Select your user and ignore Import Attachments",'acf'); ?></li>
167
+ <li><?php _e("That's it! Happy WordPressing",'acf'); ?></li>
168
+ </ol>
169
+ </div>
170
+ </div>
171
+ <div class="clear"></div>
172
+ </div>
173
+ </form>
174
+ <!-- / Export / Import -->
175
+
176
+ <?php /*
177
+ <br />
178
+ <br />
179
+ <br />
180
+
181
+ <!-- Settings -->
182
+ <div class="wp-box">
183
+ <div class="inner">
184
+ <h2>Settings</h2>
185
+ </div>
186
+ <div class="footer">
187
+ <ul class="hl left">
188
+ <li></li>
189
+ </ul>
190
+ <ul class="hl right">
191
+ <li><input type="submit" value="Update" class="button-primary" /></li>
192
+ </ul>
193
+ </div>
194
+ </div>
195
+ <!-- Settings -->
196
+ */ ?>
197
+
198
+ </form>
199
+ </div>
200
+ <!-- / Wrap -->
core/fields/date_picker/jquery.ui.datepicker.js CHANGED
File without changes
core/fields/date_picker/style.date_picker.css CHANGED
File without changes
core/fields/wysiwyg.php CHANGED
@@ -45,7 +45,6 @@ class acf_Wysiwyg extends acf_Field
45
  }
46
  else
47
  {
48
- wp_enqueue_style('editor-buttons');
49
  wp_tiny_mce();
50
  }
51
 
@@ -84,6 +83,7 @@ class acf_Wysiwyg extends acf_Field
84
  function admin_print_styles()
85
  {
86
  wp_enqueue_style(array(
 
87
  'thickbox',
88
  ));
89
  }
45
  }
46
  else
47
  {
 
48
  wp_tiny_mce();
49
  }
50
 
83
  function admin_print_styles()
84
  {
85
  wp_enqueue_style(array(
86
+ 'editor-buttons',
87
  'thickbox',
88
  ));
89
  }
core/options_page.php CHANGED
@@ -220,7 +220,7 @@ class Options_page
220
  *-------------------------------------------------------------------------------------*/
221
  function admin_footer()
222
  {
223
- wp_preload_dialogs( array( 'plugins' => 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus' ) );
224
  }
225
 
226
 
220
  *-------------------------------------------------------------------------------------*/
221
  function admin_footer()
222
  {
223
+ //wp_preload_dialogs( array( 'plugins' => 'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus' ) );
224
  }
225
 
226
 
css/acf.css CHANGED
@@ -1,102 +1,53 @@
1
  /*--------------------------------------------------------------------------------------------
2
- Screen Extra
3
- --------------------------------------------------------------------------------------------*/
4
- #icon-options-general {
 
 
5
  background: url(../images/acf-icon-32.png) 0 0 no-repeat !important;
6
  }
7
 
8
- .acf_cols {position: relative; overflow: hidden; clear: both;}
9
- .acf_col_left {margin-right: 300px;}
10
- .acf_col_left .tablenav {display: none;}
11
- .acf_col_left p.search-box {display: none;}
12
- .acf_col_left form {overflow: hidden; position: relative; clear: left;}
13
-
14
-
15
- .acf_col_right {
16
- float: right;
17
- width: 281px;
18
- padding-top: 86px !important;
19
- }
20
 
21
- #poststuff.acf_col_right .inside {
22
- margin: 0;
23
- padding: 0;
24
- }
25
 
26
- .postbox h3.hndle {
27
- cursor: default;
28
- position: relative;
29
  }
30
 
31
- .postbox h3.hndle a.button {
32
- height: 13px;
33
- line-height: 12px;
34
- position: absolute;
35
- right: 6px;
36
- top: 4px;
37
  }
38
 
39
- #poststuff.acf_col_right .inside .field {
40
- border-bottom: #DFDFDF solid 1px;
41
- border-top: #FFFFFF solid 1px;
42
- padding: 6px 10px;
43
  }
44
 
45
- #poststuff.acf_col_right .inside h4,
46
- #poststuff.acf_col_right .inside p {
47
- margin: 3px 0;
48
- padding: 0;
49
  }
50
 
51
- /*--------------------------------------------------------------------------------------------
52
- Unlock Fields
53
- --------------------------------------------------------------------------------------------*/
54
- #screen-meta-links .screen-meta-toggle.acf {
55
- float: right;
56
- background: none repeat scroll 0 0 #F9F9F9;
57
- border-radius: 0 0 3px 3px;
58
- float: right;
59
- font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
60
- height: 22px;
61
- margin: 0 6px 0 0;
62
- position: relative;
63
- border: #DFDFDF solid 1px;
64
- border-top: 0 none;
65
- padding: 0 3px;
66
-
67
  }
68
 
69
- #screen-meta-links .acf a.show-settings {
70
- padding: 0 16px;
71
- border-top: 0 none;
72
- color: #21759B;
73
- padding: 0 20px 0 10px;
74
- text-shadow: #fff 0 1px 0;
75
- }
76
 
77
- #screen-meta-links .acf.screen-meta-active {
78
- margin-top: -1px;
 
 
 
 
 
79
  }
80
 
81
- .screen-meta-wrap h5 {
82
- margin: 8px 0 3px;
83
- font-size: 13px;
84
  }
85
- .screen-meta-wrap {
86
- background-color: #F9F9F9;
87
- border: #DFDFDF solid 1px;
88
- border-top: 0 none;
89
- margin: 0 20px 0 0;
90
- padding: 8px 12px 12px;
91
- border-radius: 0 0 4px 4px;
92
- }
93
-
94
 
95
 
96
- .screen-meta-wrap p {
97
- margin-top: 0px;
98
- }
99
-
100
  table.acf_activate {
101
  border: #DFDFDF solid 1px;
102
  border-collapse:separate;
@@ -120,8 +71,6 @@ table.acf_activate tr.field_save {
120
 
121
  table.acf_activate tr td,
122
  table.acf_activate tr th {
123
- border-bottom: #DFDFDF solid 1px;
124
- border-right: #DFDFDF solid 1px;
125
  padding: 8px;
126
  }
127
 
1
  /*--------------------------------------------------------------------------------------------
2
+ *
3
+ * ACF manage field groups
4
+ *
5
+ *--------------------------------------------------------------------------------------------*/
6
+ #icon-edit {
7
  background: url(../images/acf-icon-32.png) 0 0 no-repeat !important;
8
  }
9
 
10
+ #toplevel_page_edit-post_type-acf .wp-menu-image { background: url("../../../../wp-admin/images/menu.png") no-repeat scroll 0 -1px transparent; }
 
 
 
 
 
 
 
 
 
 
 
11
 
 
 
 
 
12
 
13
+ #acf-cols {
14
+ position: relative; clear: both;
 
15
  }
16
 
17
+ #acf-col-left {
18
+ margin-right: 300px;
 
 
 
 
19
  }
20
 
21
+ #acf-col-left .tablenav,
22
+ #acf-col-left p.search-box {
23
+ display: none;
 
24
  }
25
 
26
+ #acf-col-left form {
27
+ overflow: hidden; position: relative; clear: left;
 
 
28
  }
29
 
30
+ #acf-col-right {
31
+ float: right;
32
+ width: 281px;
33
+ padding-top: 86px !important;
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
 
 
 
 
 
 
 
 
36
 
37
+ h3.h2 {
38
+ font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;
39
+ font-size: 23px;
40
+ line-height: 29px;
41
+ padding: 9px 15px 4px 0;
42
+ margin: 0;
43
+ font-weight: normal;
44
  }
45
 
46
+ h3.h2 span {
47
+ color: #ccc;
 
48
  }
 
 
 
 
 
 
 
 
 
49
 
50
 
 
 
 
 
51
  table.acf_activate {
52
  border: #DFDFDF solid 1px;
53
  border-collapse:separate;
71
 
72
  table.acf_activate tr td,
73
  table.acf_activate tr th {
 
 
74
  padding: 8px;
75
  }
76
 
css/fields.css CHANGED
@@ -5,6 +5,8 @@
5
  background: url(../images/acf-icon-32.png) 0 0 no-repeat !important;
6
  }
7
 
 
 
8
  #message p a {
9
  display: none;
10
  }
@@ -327,7 +329,6 @@ table.acf_input tr td .acf tr td {
327
 
328
  .field_form table.acf_input {
329
  border: #98b6cb solid 1px;
330
- -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px;
331
  position: relative;
332
  overflow: hidden;
333
  }
5
  background: url(../images/acf-icon-32.png) 0 0 no-repeat !important;
6
  }
7
 
8
+ #toplevel_page_edit-post_type-acf .wp-menu-image { background: url("../../../../wp-admin/images/menu.png") no-repeat scroll 0 -1px transparent; }
9
+
10
  #message p a {
11
  display: none;
12
  }
329
 
330
  .field_form table.acf_input {
331
  border: #98b6cb solid 1px;
 
332
  position: relative;
333
  overflow: hidden;
334
  }
css/global.css CHANGED
@@ -1,3 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*---------------------------------------------------------------------------------------------
2
  Table
3
  ---------------------------------------------------------------------------------------------*/
@@ -74,6 +174,7 @@ ul.radio_list {
74
  overflow: hidden;
75
  display: block;
76
  padding: 3px 0;
 
77
  }
78
 
79
  ul.radio_list input[type="radio"] {
1
+ /*--------------------------------------------------------------------------------------------
2
+ *
3
+ * Global
4
+ *
5
+ *--------------------------------------------------------------------------------------------*/
6
+
7
+ .hl {
8
+ display: block;
9
+ list-style: none outside none;
10
+ margin: 0;
11
+ overflow: hidden;
12
+ padding: 0;
13
+ position: relative;
14
+ }
15
+
16
+ .hl li {
17
+ display: block;
18
+ float: left;
19
+ margin: 0;
20
+ padding: 0;
21
+ }
22
+
23
+ #icon-acf {
24
+ background: url(../images/acf-icon-32.png) 0 0 no-repeat !important;
25
+ }
26
+
27
+ /*--------------------------------------------------------------------------------------------
28
+ *
29
+ * WP Box
30
+ *
31
+ *--------------------------------------------------------------------------------------------*/
32
+
33
+ .wp-box {
34
+ background: none repeat scroll 0 0 #FFFFFF;
35
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
36
+ position: relative;
37
+ }
38
+ .wp-box .inner {
39
+ padding: 10px;
40
+ }
41
+ .wp-box .footer {
42
+ background: none repeat scroll 0 0 #F5F5F5;
43
+ border-top: 1px solid #E1E1E1;
44
+ overflow: hidden;
45
+ padding: 10px;
46
+ position: relative;
47
+ }
48
+ .wp-box .footer ul.left {
49
+ float: left;
50
+ }
51
+ .wp-box .footer ul li {
52
+ margin: 0;
53
+ padding: 0;
54
+ }
55
+ .wp-box .footer ul.left li {
56
+ margin-right: 10px;
57
+ }
58
+ .wp-box .footer ul.right {
59
+ float: right;
60
+ }
61
+ .wp-box .footer ul.right li {
62
+ margin-left: 10px;
63
+ }
64
+
65
+ .wp-box h2 {
66
+ margin: 0 0 .5em;
67
+ }
68
+
69
+ .wp-box h3 {
70
+ margin: 1.5em 0 0;
71
+ }
72
+
73
+ .wp-box p {
74
+ margin-top: 0.5em;
75
+ }
76
+
77
+ .wp-box-half.left {
78
+ width: 50%;
79
+ float: left;
80
+ }
81
+
82
+ .wp-box-half.right {
83
+ width: 50%;
84
+ height: 100%;
85
+ right: 0;
86
+ position: absolute;
87
+ background: none repeat scroll 0 0 #F9F9F9;
88
+ border-left: 1px solid #E1E1E1;
89
+ }
90
+
91
+ .wp-box-half.right .inner {
92
+
93
+ }
94
+
95
+ .wp-box select {
96
+ width: 99%;
97
+ height: auto !important;
98
+ }
99
+
100
+
101
  /*---------------------------------------------------------------------------------------------
102
  Table
103
  ---------------------------------------------------------------------------------------------*/
174
  overflow: hidden;
175
  display: block;
176
  padding: 3px 0;
177
+ margin: 0;
178
  }
179
 
180
  ul.radio_list input[type="radio"] {
images/backgrounds.png CHANGED
Binary file
js/acf.js CHANGED
@@ -1,57 +0,0 @@
1
- (function($){
2
-
3
- $.fn.exists = function()
4
- {
5
- return jQuery(this).length>0;
6
- };
7
-
8
- $(document).ready(function(){
9
-
10
- // add new buttons to screen meta
11
- $('#contextual-help-link-wrap').each(function(){
12
- $(this).hide();
13
- });
14
- $('.screen-meta-toggle.acf').each(function(){
15
- $('#screen-meta-links').append($(this));
16
- });
17
-
18
- $('.screen-meta-wrap.acf').each(function() {
19
- $('#screen-meta-links').before($(this));
20
- });
21
-
22
- $('#screen-meta-links a.show-settings').unbind('click').click(function() {
23
-
24
- var a = $(this);
25
- var div = a.parent();
26
-
27
- $(a.attr('href')+'-wrap').slideToggle('fast', function() {
28
- if (div.hasClass('screen-meta-active')) {
29
- div.removeClass('screen-meta-active');
30
- //a.css({'background-position':'right top'}).removeClass('screen-meta-shown');
31
- div.siblings().css('visibility', 'visible');
32
- }
33
- else {
34
- div.addClass('screen-meta-active');
35
- div.siblings().css('visibility', 'hidden');
36
- //a.css({'background-position':'right bottom'}).addClass('screen-meta-shown').parent().css('visibility', 'visible');
37
- }
38
- });
39
- return false;
40
- });
41
-
42
-
43
- $('.acf_col_right').each(function(){
44
-
45
- $('.wrap').wrapInner('<div class="acf_col_left" />');
46
- $('.wrap').wrapInner('<div class="acf_cols" />');
47
- $(this).removeClass('hidden').prependTo('.acf_cols');
48
-
49
- });
50
-
51
- // add active to Settings Menu
52
- $('#adminmenu #menu-settings').addClass('current wp-menu-open');
53
-
54
-
55
- });
56
-
57
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/fields.js CHANGED
@@ -407,7 +407,7 @@
407
 
408
 
409
  // add active to Settings Menu
410
- $('#adminmenu #menu-settings').removeClass('wp-not-current-submenu').addClass('current wp-menu-open wp-has-current-submenu');
411
 
412
  // setup fields
413
  setup_fields();
407
 
408
 
409
  // add active to Settings Menu
410
+ //$('#adminmenu #menu-settings').removeClass('wp-not-current-submenu').addClass('current wp-menu-open wp-has-current-submenu');
411
 
412
  // setup fields
413
  setup_fields();
readme.txt CHANGED
@@ -94,6 +94,17 @@ http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
 
 
 
 
 
 
97
  = 3.0.4 =
98
  * Bug fix: WYSIWYG is now compatible with WP 3.3 (May have incidentally added support for gravity forms media button! But not 100% sure...)
99
  * Fix : Taxonomy Location rule now only shows hierarchal taxonomies to improve speed and reduce php memory issues
94
 
95
  == Changelog ==
96
 
97
+ = 3.0.6 =
98
+ * Bug Fix: Location meta box now shows all pages / posts
99
+ * Bug Fix: upgrade and settings url should now work / avoid conflicts with other plugins
100
+
101
+ = 3.0.5 =
102
+ * Support: use wp native functions to add all user roles to location metabox
103
+ * Update: gave acf a css update + new menu structure
104
+ * Bug fix: fixed a few issues with wysiwyg js/css in wp3.3
105
+ * Bug fix: fixed page_name conflicting with normal pages / posts by adding a "acf_" to the page_name on save / update
106
+ * Performance: location metabox - limited taxonomies to hierarchial only.
107
+
108
  = 3.0.4 =
109
  * Bug fix: WYSIWYG is now compatible with WP 3.3 (May have incidentally added support for gravity forms media button! But not 100% sure...)
110
  * Fix : Taxonomy Location rule now only shows hierarchal taxonomies to improve speed and reduce php memory issues