TinyMCE Templates - Version 3.4.2

Version Description

Download this release

Release Info

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

Code changes from version 3.4.1 to 3.4.2

Files changed (2) hide show
  1. readme.txt +1 -1
  2. tinymce-templates.php +6 -6
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: miyauchi
3
  Tags: tinymce, Visual Editor, template
4
  Requires at least: 3.5
5
  Tested up to: 3.9
6
- Stable tag: 3.4.1
7
 
8
  TinyMCE Template plugin will enable to use HTML template on WordPress Visual Editor.
9
  You can edit and share this template with WordPress users.
3
  Tags: tinymce, Visual Editor, template
4
  Requires at least: 3.5
5
  Tested up to: 3.9
6
+ Stable tag: 3.4.2
7
 
8
  TinyMCE Template plugin will enable to use HTML template on WordPress Visual Editor.
9
  You can edit and share this template with WordPress users.
tinymce-templates.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: TinyMCE Templates
4
  Plugin URI: http://wpist.me/wp/tinymce-templates/
5
  Description: TinyMCE Templates plugin will enable to use HTML template on WordPress Visual Editor.
6
  Author: Takayuki Miyauchi
7
- Version: 3.4.1
8
  Author URI: http://wpist.me/
9
  Domain Path: /languages
10
  Text Domain: tinymce_templates
@@ -108,7 +108,7 @@ public function register()
108
  add_filter('parse_query', array($this, 'parse_query'));
109
 
110
  global $wp_version;
111
- if (!(version_compare($wp_version, "3.8.2") <= 0)) {
112
  add_filter('wp_mce_translation', array($this, 'wp_mce_translation'));
113
  }
114
 
@@ -227,7 +227,7 @@ public function admin_head(){
227
  }
228
 
229
  global $wp_version;
230
- if (version_compare($wp_version, "3.8.2") <= 0) {
231
  $plugin = $this->base_url.'/mce_plugins/3.5/plugins/template/editor_plugin.js';
232
  } else {
233
  $plugin = $this->base_url.'/mce_plugins/4.0/plugins/template/plugin.min.js';
@@ -239,7 +239,7 @@ public function admin_head(){
239
  $nonce = wp_create_nonce("tinymce_templates");
240
  $url = add_query_arg('nonce', $nonce, $url);
241
 
242
- if (version_compare($wp_version, "3.8.2") <= 0) {
243
  $inits['template_external_list_url'] = $url;
244
  } else {
245
  $inits['templates'] = $url;
@@ -508,14 +508,14 @@ public function wp_ajax()
508
  $name = esc_html(apply_filters('tinymce_template_title', $p->post_title));
509
  $desc = esc_html(apply_filters('tinymce_template_excerpt', $p->post_excerpt));
510
  $url = add_query_arg('template_id', $ID, $url);
511
- if (version_compare($wp_version, "3.8.2") <= 0) {
512
  $arr[] = array($name, $url, $desc);
513
  } else {
514
  $arr[] = array('title' => $name, 'url' => $url, 'description' => $desc);
515
  }
516
  }
517
 
518
- if (version_compare($wp_version, "3.8.2") <= 0) {
519
  echo 'var tinyMCETemplateList = '.json_encode($arr);
520
  } else {
521
  echo json_encode($arr);
4
  Plugin URI: http://wpist.me/wp/tinymce-templates/
5
  Description: TinyMCE Templates plugin will enable to use HTML template on WordPress Visual Editor.
6
  Author: Takayuki Miyauchi
7
+ Version: 3.4.2
8
  Author URI: http://wpist.me/
9
  Domain Path: /languages
10
  Text Domain: tinymce_templates
108
  add_filter('parse_query', array($this, 'parse_query'));
109
 
110
  global $wp_version;
111
+ if (!(version_compare($wp_version, "3.9.0") < 0)) {
112
  add_filter('wp_mce_translation', array($this, 'wp_mce_translation'));
113
  }
114
 
227
  }
228
 
229
  global $wp_version;
230
+ if (version_compare($wp_version, "3.9.0") < 0) {
231
  $plugin = $this->base_url.'/mce_plugins/3.5/plugins/template/editor_plugin.js';
232
  } else {
233
  $plugin = $this->base_url.'/mce_plugins/4.0/plugins/template/plugin.min.js';
239
  $nonce = wp_create_nonce("tinymce_templates");
240
  $url = add_query_arg('nonce', $nonce, $url);
241
 
242
+ if (version_compare($wp_version, "3.9.0") < 0) {
243
  $inits['template_external_list_url'] = $url;
244
  } else {
245
  $inits['templates'] = $url;
508
  $name = esc_html(apply_filters('tinymce_template_title', $p->post_title));
509
  $desc = esc_html(apply_filters('tinymce_template_excerpt', $p->post_excerpt));
510
  $url = add_query_arg('template_id', $ID, $url);
511
+ if (version_compare($wp_version, "3.9.0") < 0) {
512
  $arr[] = array($name, $url, $desc);
513
  } else {
514
  $arr[] = array('title' => $name, 'url' => $url, 'description' => $desc);
515
  }
516
  }
517
 
518
+ if (version_compare($wp_version, "3.9.0") < 0) {
519
  echo 'var tinyMCETemplateList = '.json_encode($arr);
520
  } else {
521
  echo json_encode($arr);