Custom Field Template - Version 2.3.3

Version Description

  • Bugfix: tinyMCE editor.
Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon 128x128 Custom Field Template
Version 2.3.3
Comparing to
See all releases

Code changes from version 2.3.2 to 2.3.3

Files changed (2) hide show
  1. custom-field-template.php +5 -4
  2. readme.txt +4 -1
custom-field-template.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wpgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
  Author URI: http://wpgogo.com/
8
- Version: 2.3.2
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
@@ -2179,8 +2179,9 @@ jQuery(this).addClass("closed");
2179
  $load_tinyMCE = 'var ed = new tinyMCE.Editor("'. $textarea_id . '", tinyMCEPreInit.mceInit["content"]); ed.render();';
2180
  $editorcontainer_class = ' class="wp-editor-container"';
2181
  else :
2182
- $load_tinyMCE = "tinyMCE.init({'convert_urls': false, 'relative_urls': false, 'remove_script_host': false});";
2183
- $load_tinyMCE .= 'tinyMCE.execCommand('."'mceAddEditor'".', true, "'. $textarea_id . '");';
 
2184
  $editorcontainer_class = ' class="wp-editor-container"';
2185
  endif;
2186
  if ( !empty($options['custom_field_template_use_wpautop']) ) :
@@ -2277,7 +2278,7 @@ jQuery(this).addClass("closed");
2277
  elseif ( substr($wp_version, 0, 3) < '3.9' ) :
2278
  $load_tinyMCE = 'var ed = new tinyMCE.Editor(original_id, tinyMCEPreInit.mceInit[\'content\']); ed.render(); var ed = new tinyMCE.Editor(new_id, tinyMCEPreInit.mceInit[\'content\']); ed.render();';
2279
  else :
2280
- $load_tinyMCE = 'tinyMCE.execCommand('."'mceAddEditor'".', true, original_id);tinyMCE.execCommand('."'mceAddEditor'".', true, new_id);';
2281
  endif;
2282
 
2283
  $addfield .= '<a href="#clear" onclick="var original_id; var new_id; jQuery(this).parent().parent().parent().find('."'textarea'".').each(function(){original_id = jQuery(this).attr('."'id'".');'.$load_htmlEditor1.'tinyMCE.execCommand(' . "'mceRemoveControl'" . ',true,jQuery(this).attr('."'id'".'));});var clone = jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent()); clone.find('."'textarea'".').val('."''".');if(original_id.match(/([0-9])$/)) {var matchval = RegExp.$1;re = new RegExp(matchval, '."'ig'".');clone.html(clone.html().replace(re, parseInt(matchval)+1)); new_id = original_id.replace(/([0-9])$/, parseInt(matchval)+1);}if ( tinyMCE.get(jQuery(this).attr('."original_id".')) ) {'.$load_tinyMCE.'}jQuery(this).parent().css('."'visibility','hidden'".');'.$load_htmlEditor2.'jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
  Author URI: http://wpgogo.com/
8
+ Version: 2.3.3
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
2179
  $load_tinyMCE = 'var ed = new tinyMCE.Editor("'. $textarea_id . '", tinyMCEPreInit.mceInit["content"]); ed.render();';
2180
  $editorcontainer_class = ' class="wp-editor-container"';
2181
  else :
2182
+ $load_tinyMCE = '';
2183
+ if ( wp_default_editor() == 'html' ) $load_tinyMCE .= 'tinyMCE.init({"convert_urls": false, "relative_urls": false, "remove_script_host": false});';
2184
+ $load_tinyMCE .= 'tinyMCE.execCommand('."'mceAddEditor'".', false, "'. $textarea_id . '");';
2185
  $editorcontainer_class = ' class="wp-editor-container"';
2186
  endif;
2187
  if ( !empty($options['custom_field_template_use_wpautop']) ) :
2278
  elseif ( substr($wp_version, 0, 3) < '3.9' ) :
2279
  $load_tinyMCE = 'var ed = new tinyMCE.Editor(original_id, tinyMCEPreInit.mceInit[\'content\']); ed.render(); var ed = new tinyMCE.Editor(new_id, tinyMCEPreInit.mceInit[\'content\']); ed.render();';
2280
  else :
2281
+ $load_tinyMCE = 'tinyMCE.execCommand('."'mceAddEditor'".', false, original_id);tinyMCE.execCommand('."'mceAddEditor'".', false, new_id);';
2282
  endif;
2283
 
2284
  $addfield .= '<a href="#clear" onclick="var original_id; var new_id; jQuery(this).parent().parent().parent().find('."'textarea'".').each(function(){original_id = jQuery(this).attr('."'id'".');'.$load_htmlEditor1.'tinyMCE.execCommand(' . "'mceRemoveControl'" . ',true,jQuery(this).attr('."'id'".'));});var clone = jQuery(this).parent().parent().parent().clone().insertAfter(jQuery(this).parent().parent().parent()); clone.find('."'textarea'".').val('."''".');if(original_id.match(/([0-9])$/)) {var matchval = RegExp.$1;re = new RegExp(matchval, '."'ig'".');clone.html(clone.html().replace(re, parseInt(matchval)+1)); new_id = original_id.replace(/([0-9])$/, parseInt(matchval)+1);}if ( tinyMCE.get(jQuery(this).attr('."original_id".')) ) {'.$load_tinyMCE.'}jQuery(this).parent().css('."'visibility','hidden'".');'.$load_htmlEditor2.'jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wpgogo.com/development/custom-field-template.html
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type
5
  Requires at least: 2.1
6
  Tested up to: 4.2
7
- Stable tag: 2.3.2
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
@@ -112,6 +112,9 @@ See the default template and modify it.
112
 
113
  == Changelog ==
114
 
 
 
 
115
  = 2.3.2 =
116
  * Auto hook option for the excerpt.
117
  * Bugfix: relative path for images from the tinymce editor.
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type
5
  Requires at least: 2.1
6
  Tested up to: 4.2
7
+ Stable tag: 2.3.3
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
112
 
113
  == Changelog ==
114
 
115
+ = 2.3.3 =
116
+ * Bugfix: tinyMCE editor.
117
+
118
  = 2.3.2 =
119
  * Auto hook option for the excerpt.
120
  * Bugfix: relative path for images from the tinymce editor.