TinyMCE Templates - Version 1.5.0

Version Description

Download this release

Release Info

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

Code changes from version 1.4.1 to 1.5.0

includes/MceTemplatesAdmin.class.php CHANGED
@@ -100,6 +100,7 @@ class MceTemplatesAdmin{
100
  public function addView()
101
  {
102
  global $current_user;
 
103
 
104
  if (isset($_POST['save']) && $_POST['save']) {
105
  if ($this->validate() && $this->save()) {
@@ -162,7 +163,9 @@ class MceTemplatesAdmin{
162
  // new line by ANDREA BERSI
163
  echo "<div id='poststuff'>";
164
  echo "<div id=\"postdivrich\" class=\"postarea\">";
165
- wp_tiny_mce();
 
 
166
  the_editor($html, "content", "desc", true, 3);
167
  echo "</div><!--end #postdivrich-->";
168
  echo "</div><!--end #poststuff-->";
100
  public function addView()
101
  {
102
  global $current_user;
103
+ global $wp_version;
104
 
105
  if (isset($_POST['save']) && $_POST['save']) {
106
  if ($this->validate() && $this->save()) {
163
  // new line by ANDREA BERSI
164
  echo "<div id='poststuff'>";
165
  echo "<div id=\"postdivrich\" class=\"postarea\">";
166
+ if (version_compare($wp_version, '3.2', '<')) {
167
+ wp_tiny_mce();
168
+ }
169
  the_editor($html, "content", "desc", true, 3);
170
  echo "</div><!--end #postdivrich-->";
171
  echo "</div><!--end #poststuff-->";
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: miyauchi
3
  Donate link: https://www.paypal.com/jp/cgi-bin/webscr?cmd=_flow&SESSION=vVwWrw6VVHF22np9_GU0-V40_AQGlVgFMJBcwaUbLfZPzirnfNd92OY6dV0&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b0819838956b846fa597911f234fb937456ea7
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.0
6
- Tested up to: 3.1
7
- Stable tag: 1.4.1
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.
3
  Donate link: https://www.paypal.com/jp/cgi-bin/webscr?cmd=_flow&SESSION=vVwWrw6VVHF22np9_GU0-V40_AQGlVgFMJBcwaUbLfZPzirnfNd92OY6dV0&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b0819838956b846fa597911f234fb937456ea7
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.0
6
+ Tested up to: 3.2
7
+ Stable tag: 1.5.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.
tinymce_templates.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: TinyMCE Templates
4
  Plugin URI: http://firegoby.theta.ne.jp/wp/tinymce_templates
5
  Description: Manage & Add Tiny MCE template.
6
  Author: Takayuki Miyauchi
7
- Version: 1.4.1
8
  Author URI: http://firegoby.theta.ne.jp/
9
  */
10
 
@@ -52,6 +52,7 @@ function __construct()
52
 
53
  public function admin_head()
54
  {
 
55
  wp_admin_css();
56
  do_action("admin_print_styles-post-php");
57
  do_action('admin_print_styles');
@@ -60,6 +61,16 @@ public function admin_head()
60
  printf($html, $dir);
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
63
  public function activation()
64
  {
65
  global $wpdb;
@@ -140,11 +151,14 @@ public function loadAdmin()
140
  }
141
 
142
  public function admin_scripts() {
 
143
  wp_enqueue_script('jquery-ui-tabs');
144
  wp_enqueue_script('editor');
145
  add_thickbox();
146
  wp_enqueue_script('media-upload');
147
- add_action('admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30);
 
 
148
  }
149
 
150
  public function adminPage()
4
  Plugin URI: http://firegoby.theta.ne.jp/wp/tinymce_templates
5
  Description: Manage & Add Tiny MCE template.
6
  Author: Takayuki Miyauchi
7
+ Version: 1.5.0
8
  Author URI: http://firegoby.theta.ne.jp/
9
  */
10
 
52
 
53
  public function admin_head()
54
  {
55
+ add_filter('tiny_mce_before_init', array(&$this, 'tiny_mce_before_init'), 999);
56
  wp_admin_css();
57
  do_action("admin_print_styles-post-php");
58
  do_action('admin_print_styles');
61
  printf($html, $dir);
62
  }
63
 
64
+ public function tiny_mce_before_init($init)
65
+ {
66
+ $init['plugins'] = str_replace(
67
+ array('wpfullscreen',',,'),
68
+ array('', ','),
69
+ $init['plugins']
70
+ );
71
+ return $init;
72
+ }
73
+
74
  public function activation()
75
  {
76
  global $wpdb;
151
  }
152
 
153
  public function admin_scripts() {
154
+ global $wp_version;
155
  wp_enqueue_script('jquery-ui-tabs');
156
  wp_enqueue_script('editor');
157
  add_thickbox();
158
  wp_enqueue_script('media-upload');
159
+ if (version_compare($wp_version, '3.2', '<')) {
160
+ add_action('admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30);
161
+ }
162
  }
163
 
164
  public function adminPage()