Smart Custom Fields - Version 1.5.2

Version Description

  • Fixed a wysiwyg field bug.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin Smart Custom Fields
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

classes/fields/class.field-wysiwyg.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Wysiwyg
4
- * Version : 1.1.2
5
  * Author : Takashi Kitajima
6
  * Created : October 7, 2014
7
- * Modified : September 2, 2015
8
  * License : GPLv2
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
@@ -88,7 +88,9 @@ class Smart_Custom_Fields_Field_Wysiwyg extends Smart_Custom_Fields_Field_Base {
88
  }
89
  return sprintf(
90
  '<div class="wp-editor-wrap">
91
- <div class="wp-media-buttons">%s</div>
 
 
92
  <div class="wp-editor-container">
93
  <textarea name="%s" rows="8" class="widefat smart-cf-wp-editor" %s>%s</textarea>
94
  </div>
1
  <?php
2
  /**
3
  * Smart_Custom_Fields_Field_Wysiwyg
4
+ * Version : 1.1.3
5
  * Author : Takashi Kitajima
6
  * Created : October 7, 2014
7
+ * Modified : September 28, 2015
8
  * License : GPLv2
9
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  */
88
  }
89
  return sprintf(
90
  '<div class="wp-editor-wrap">
91
+ <div class="wp-editor-tools hide-if-no-js">
92
+ <div class="wp-media-buttons">%s</div>
93
+ </div>
94
  <div class="wp-editor-container">
95
  <textarea name="%s" rows="8" class="widefat smart-cf-wp-editor" %s>%s</textarea>
96
  </div>
js/editor.js CHANGED
@@ -1,9 +1,9 @@
1
  /**
2
  * editor.js
3
- * Version : 1.2.0
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
- * Modified : September 2, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
@@ -24,11 +24,11 @@ jQuery( function( $ ) {
24
  $( this ).attr( 'id', 'smart-cf-wysiwyg-' + cnt + i );
25
  var editor_id = $( this ).attr( 'id' );
26
  $( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
 
27
  var init;
28
- console.log( tinyMCEPreInit.mceInit.content );
29
- console.log( typeof tinyMCEPreInit.mceInit.content );
30
  if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
31
- init = tinyMCEPreInit.mceInit.content;
 
32
  } else {
33
  init = {
34
  content_css: ['../wp-includes/js/tinymce/skins/wordpress/wp-content.css', '../wp-content/plugins/smart-custom-fields/css/wysiwyg.css'],
@@ -36,11 +36,15 @@ jQuery( function( $ ) {
36
  plugins: "hr,wplink,fullscreen,wordpress,textcolor,paste,charmap",
37
  toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv,fullscreen",
38
  toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code",
39
- convert_urls: false
 
 
 
 
 
40
  };
41
  }
42
- console.log( init );
43
- tinymce.init( init );
44
  tinymce.execCommand( 'mceAddEditor', false, editor_id );
45
  }
46
  } );
1
  /**
2
  * editor.js
3
+ * Version : 1.3.0
4
  * Author : Takashi Kitajima
5
  * Created : September 23, 2014
6
+ * Modified : September 28, 2015
7
  * License : GPLv2
8
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  */
24
  $( this ).attr( 'id', 'smart-cf-wysiwyg-' + cnt + i );
25
  var editor_id = $( this ).attr( 'id' );
26
  $( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
27
+
28
  var init;
 
 
29
  if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
30
+ init = $.extend( true, {}, tinyMCEPreInit.mceInit.content );
31
+ init.selector = '#' + editor_id;
32
  } else {
33
  init = {
34
  content_css: ['../wp-includes/js/tinymce/skins/wordpress/wp-content.css', '../wp-content/plugins/smart-custom-fields/css/wysiwyg.css'],
36
  plugins: "hr,wplink,fullscreen,wordpress,textcolor,paste,charmap",
37
  toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv,fullscreen",
38
  toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code",
39
+ convert_urls: false,
40
+ theme: "modern",
41
+ skin: "lightgray",
42
+ wp_autoresize_on: true,
43
+ wpautop: true,
44
+ selector: '#' + editor_id
45
  };
46
  }
47
+ tinyMCEPreInit.mceInit[editor_id] = init;
 
48
  tinymce.execCommand( 'mceAddEditor', false, editor_id );
49
  }
50
  } );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: inc2734, toro_unit, mimosafa
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
- Tested up to: 4.3.0
7
- Stable tag: 1.5.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -86,6 +86,9 @@ You can send your own language pack to me.
86
 
87
  == Changelog ==
88
 
 
 
 
89
  = 1.5.1 =
90
  * Fixed a relation field bug.
91
 
3
  Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
5
  Requires at least: 3.9
6
+ Tested up to: 4.3.1
7
+ Stable tag: 1.5.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 1.5.2 =
90
+ * Fixed a wysiwyg field bug.
91
+
92
  = 1.5.1 =
93
  * Fixed a relation field bug.
94
 
smart-custom-fields.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
- * Version: 1.5.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
- * Modified: September 3, 2015
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2
3
  * Plugin name: Smart Custom Fields
4
  * Plugin URI: https://github.com/inc2734/smart-custom-fields/
5
  * Description: Smart Custom Fields is a simple plugin that management custom fields.
6
+ * Version: 1.5.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: October 9, 2014
10
+ * Modified: September 28, 2015
11
  * Text Domain: smart-custom-fields
12
  * Domain Path: /languages
13
  * License: GPLv2