TinyMCE Templates - Version 2.3.0

Version Description

Download this release

Release Info

Developer miyauchi
Plugin Icon 128x128 TinyMCE Templates
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.2.0 to 2.3.0

Files changed (2) hide show
  1. readme.txt +5 -1
  2. tinymce-templates.php +5 -2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/jp/cgi-bin/webscr?cmd=_flow&SESSION=vVwWrw6V
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.0
6
  Tested up to: 3.2
7
- Stable tag: 2.2.0
8
 
9
  TinyMCE Template plugin will enable to use HTML template on WordPress Visual Editor.
10
  You can edit and share this template with WordPress users.
@@ -52,6 +52,10 @@ You can send your own language pack to me.
52
  1. Template Admin.
53
  2. Visual Editor.
54
 
 
 
 
 
55
  == Credits ==
56
 
57
  This plug-in is not guaranteed though the user of WordPress can freely use this plug-in free of charge regardless of the purpose.
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.0
6
  Tested up to: 3.2
7
+ Stable tag: 2.3.0
8
 
9
  TinyMCE Template plugin will enable to use HTML template on WordPress Visual Editor.
10
  You can edit and share this template with WordPress users.
52
  1. Template Admin.
53
  2. Visual Editor.
54
 
55
+ == Changelog ==
56
+
57
+ * http://wpist.me/tag/tinymce-templates/
58
+
59
  == Credits ==
60
 
61
  This plug-in is not guaranteed though the user of WordPress can freely use this plug-in free of charge regardless of the purpose.
tinymce-templates.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: TinyMCE Templates
4
  Plugin URI: http://wpist.me/wp/tinymce-templates/
5
  Description: Manage & Add Tiny MCE template.
6
  Author: Takayuki Miyauchi
7
- Version: 2.2.0
8
  Author URI: http://wpist.me/
9
  */
10
 
@@ -184,8 +184,10 @@ public function save_post($id)
184
 
185
  $p = get_post($id);
186
  if ($p->post_type === $this->post_type) {
187
- if (isset($_POST[$this->meta_param])) {
188
  update_post_meta($id, $this->meta_param, 1);
 
 
189
  }
190
  }
191
  }
@@ -328,6 +330,7 @@ public function get_templates(){
328
  'post_type' => $this->post_type,
329
  'orderby' => 'date',
330
  'order' => 'DESC',
 
331
  );
332
  $posts = get_posts($p);
333
  echo 'var tinyMCETemplateList = [';
4
  Plugin URI: http://wpist.me/wp/tinymce-templates/
5
  Description: Manage & Add Tiny MCE template.
6
  Author: Takayuki Miyauchi
7
+ Version: 2.3.0
8
  Author URI: http://wpist.me/
9
  */
10
 
184
 
185
  $p = get_post($id);
186
  if ($p->post_type === $this->post_type) {
187
+ if (isset($_POST[$this->meta_param]) && $_POST[$this->meta_param]) {
188
  update_post_meta($id, $this->meta_param, 1);
189
+ } else {
190
+ delete_post_meta($id, $this->meta_param);
191
  }
192
  }
193
  }
330
  'post_type' => $this->post_type,
331
  'orderby' => 'date',
332
  'order' => 'DESC',
333
+ 'numberposts' => -1,
334
  );
335
  $posts = get_posts($p);
336
  echo 'var tinyMCETemplateList = [';