Advanced Custom Fields - Version 3.0.4

Version Description

  • Bug fix: WYSIWYG is now compatible with WP 3.3 (May have incidentally added support for gravity forms media button! But not 100% sure...)
  • Fix : Taxonomy Location rule now only shows hierarchal taxonomies to improve speed and reduce php memory issues
Download this release

Release Info

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

Code changes from version 3.0.3 to 3.0.4

Files changed (4) hide show
  1. acf.php +3 -2
  2. core/fields/wysiwyg.php +15 -20
  3. css/input.css +3 -1
  4. readme.txt +4 -0
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.3
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.3';
49
  $this->upgrade_version = '3.0.0'; // this is the latest version which requires an upgrade
50
 
51
 
@@ -1520,6 +1520,7 @@ class Acf
1520
  {
1521
  foreach($taxonomies as $taxonomy)
1522
  {
 
1523
  $terms = get_terms($taxonomy, array('hide_empty' => false));
1524
  if($terms)
1525
  {
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
  $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
 
1520
  {
1521
  foreach($taxonomies as $taxonomy)
1522
  {
1523
+ if(!is_taxonomy_hierarchical($taxonomy)) continue;
1524
  $terms = get_terms($taxonomy, array('hide_empty' => false));
1525
  if($terms)
1526
  {
core/fields/wysiwyg.php CHANGED
@@ -45,6 +45,7 @@ class acf_Wysiwyg extends acf_Field
45
  }
46
  else
47
  {
 
48
  wp_tiny_mce();
49
  }
50
 
@@ -301,32 +302,26 @@ class acf_Wysiwyg extends acf_Field
301
  $version = get_bloginfo('version');
302
 
303
  ?>
 
 
 
 
 
 
304
  <div class="acf_wysiwyg wp-editor-wrap" data-toolbar="<?php echo $field['toolbar']; ?>">
305
  <?php if($field['media_upload'] == 'yes'): ?>
306
  <?php if(version_compare($version,'3.2.1') > 0): ?>
307
- <div class="wp-editor-tools" id="wp-content-editor-tools">
308
- <div class="hide-if-no-js wp-media-buttons" id="wp-content-media-buttons">
309
- <a onclick="return false;" title="<?php _e("Add Media"); ?>" id="content-add_media" class="thickbox add_media" href="<?php echo $this->parent->wpadminurl; ?>media-upload.php?post_id=5&amp;TB_iframe=1&amp;width=640&amp;height=526"><?php _e("Upload/Insert"); ?> <img width="15" height="15" src="<?php echo $this->parent->wpadminurl; ?>images/media-button.png?ver=20111005"></a>
310
  </div>
311
- </div>
312
  <?php else: ?>
313
- <div id="editor-toolbar" class="hide-if-no-js">
314
- <div id="media-buttons" class="hide-if-no-js">
315
- <?php _e("Upload/Insert"); ?>
316
- <a title="<?php _e("Add an Image"); ?>" class="thickbox" id="add_image" href="media-upload.php?post_id=1802&amp;type=image&amp;TB_iframe=1&amp;width=640&amp;height=314">
317
- <img onclick="return false;" alt="<?php _e("Add an Image"); ?>" src="<?php echo $this->parent->wpadminurl; ?>images/media-button-image.gif?ver=20100531">
318
- </a>
319
- <a title="<?php _e("Add Video"); ?>" class="thickbox" id="add_video" href="media-upload.php?post_id=1802&amp;type=video&amp;TB_iframe=1&amp;width=640&amp;height=314">
320
- <img onclick="return false;" alt="<?php _e("Add Video"); ?>" src="<?php echo $this->parent->wpadminurl; ?>images/media-button-video.gif?ver=20100531">
321
- </a>
322
- <a title="<?php _e("Add Audio"); ?>" class="thickbox" id="add_audio" href="media-upload.php?post_id=1802&amp;type=audio&amp;TB_iframe=1&amp;width=640&amp;height=314">
323
- <img onclick="return false;" alt="<?php _e("Add Audio"); ?>" src="<?php echo $this->parent->wpadminurl; ?>images/media-button-music.gif?ver=20100531">
324
- </a>
325
- <a title="<?php _e("Add Media"); ?>" class="thickbox" id="add_media" href="media-upload.php?post_id=1802&amp;TB_iframe=1&amp;width=640&amp;height=314">
326
- <img onclick="return false;" alt="<?php _e("Add Media"); ?>" src="<?php echo $this->parent->wpadminurl; ?>images/media-button-other.gif?ver=20100531">
327
- </a>
328
  </div>
329
- </div>
330
  <?php endif; ?>
331
  <?php endif; ?>
332
  <div id="editorcontainer" class="wp-editor-container">
45
  }
46
  else
47
  {
48
+ wp_enqueue_style('editor-buttons');
49
  wp_tiny_mce();
50
  }
51
 
302
  $version = get_bloginfo('version');
303
 
304
  ?>
305
+ <?php if(version_compare($version,'3.2.1') > 0): ?>
306
+
307
+ <?php else: ?>
308
+
309
+ <?php endif; ?>
310
+
311
  <div class="acf_wysiwyg wp-editor-wrap" data-toolbar="<?php echo $field['toolbar']; ?>">
312
  <?php if($field['media_upload'] == 'yes'): ?>
313
  <?php if(version_compare($version,'3.2.1') > 0): ?>
314
+ <div id="wp-content-editor-tools" class="wp-editor-tools">
315
+ <div class="hide-if-no-js wp-media-buttons">
316
+ <?php do_action( 'media_buttons' ); ?>
317
  </div>
318
+ </div>
319
  <?php else: ?>
320
+ <div id="editor-toolbar">
321
+ <div id="media-buttons" class="hide-if-no-js">
322
+ <?php do_action( 'media_buttons' ); ?>
323
+ </div>
 
 
 
 
 
 
 
 
 
 
 
324
  </div>
 
325
  <?php endif; ?>
326
  <?php endif; ?>
327
  <div id="editorcontainer" class="wp-editor-container">
css/input.css CHANGED
@@ -71,7 +71,9 @@
71
  Field: WYSIWYG
72
  ---------------------------------------------------------------------------------------------*/
73
 
74
-
 
 
75
 
76
 
77
 
71
  Field: WYSIWYG
72
  ---------------------------------------------------------------------------------------------*/
73
 
74
+ .acf_wysiwyg .wp_themeSkin table.mceToolbarRow1 {
75
+ margin-top: 2px !important;
76
+ }
77
 
78
 
79
 
readme.txt CHANGED
@@ -94,6 +94,10 @@ http://support.plugins.elliotcondon.com/categories/advanced-custom-fields/
94
 
95
  == Changelog ==
96
 
 
 
 
 
97
  = 3.0.3 =
98
  * New translation: French (thanks to Netactions)
99
  * Support: added support for new wp3.3 editor
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
100
+
101
  = 3.0.3 =
102
  * New translation: French (thanks to Netactions)
103
  * Support: added support for new wp3.3 editor