TinyMCE Templates - Version 3.3.0

Version Description

  • Fixed under the WordPtess 3.8.
Download this release

Release Info

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

Code changes from version 3.2.0 to 3.3.0

img/amimoto.png ADDED
Binary file
img/paypal.png DELETED
Binary file
mce_plugins/plugins/template/img/icon.png ADDED
Binary file
readme.txt CHANGED
@@ -1,10 +1,9 @@
1
  === TinyMCE Templates ===
2
  Contributors: miyauchi
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CTUKCMFHF79K2
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.5
6
- Tested up to: 3.7
7
- Stable tag: 3.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.
@@ -60,8 +59,15 @@ You can send your own language pack to me.
60
  4. Copy to new template from Admin Bar.
61
 
62
  == Changelog ==
63
- * 3.2.0 - Tested up to 3.7
64
- * 3.0.0 - WordPress 3.5 fix
 
 
 
 
 
 
 
65
  * [2.9.0](http://wpist.me/2012/06/14/tinymce-templates-2-9-0/)
66
  * [2.8.0](http://wpist.me/2012/05/24/tinymce-templates-2-8-0/)
67
  * [2.7.0](http://wpist.me/2012/05/19/tinymce-templates-2-7-0/)
1
  === TinyMCE Templates ===
2
  Contributors: miyauchi
 
3
  Tags: tinymce, Visual Editor, template
4
  Requires at least: 3.5
5
+ Tested up to: 3.8
6
+ Stable tag: 3.3.0
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.
59
  4. Copy to new template from Admin Bar.
60
 
61
  == Changelog ==
62
+ = 3.3.0 =
63
+ * [Fixed under the WordPtess 3.8.](https://github.com/miya0001/tinymce-templates/compare/3.2.0...3.3.0)
64
+
65
+ = 3.2.0 =
66
+ * Tested up to 3.7
67
+
68
+ = 3.0.0 =
69
+ * WordPress 3.5 fix
70
+
71
  * [2.9.0](http://wpist.me/2012/06/14/tinymce-templates-2-9-0/)
72
  * [2.8.0](http://wpist.me/2012/05/24/tinymce-templates-2-8-0/)
73
  * [2.7.0](http://wpist.me/2012/05/19/tinymce-templates-2-7-0/)
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
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.2.0
8
  Author URI: http://wpist.me/
9
  Domain Path: /languages
10
  Text Domain: tinymce_templates
@@ -34,7 +34,8 @@ THE SOFTWARE.
34
 
35
  require_once(dirname(__FILE__).'/includes/mceplugins.class.php');
36
 
37
- new tinymceTemplates();
 
38
 
39
  class tinymceTemplates {
40
 
@@ -91,7 +92,7 @@ private $translators = array(
91
  ),
92
  );
93
 
94
- function __construct()
95
  {
96
  $this->base_url = plugins_url(dirname(plugin_basename(__FILE__)));
97
  register_activation_hook(__FILE__, array(&$this, 'activation'));
@@ -188,11 +189,11 @@ public function plugins_loaded()
188
 
189
  private function fixed_role_issue()
190
  {
191
- global $wp_roles;
192
- $roles = array('administrator', 'editor');
193
- foreach ($roles as $r) {
194
- $wp_roles->add_cap($r, "edit_others_posts");
195
- }
196
  }
197
 
198
  public function mce_css($css)
@@ -228,6 +229,13 @@ public function admin_head(){
228
  $inits
229
  );
230
 
 
 
 
 
 
 
 
231
  if (get_post_type() === $this->post_type) {
232
  if (get_option("tinymce_templates_db_version") != $this->db_version) {
233
  $this->activation();
@@ -344,22 +352,21 @@ public function addMetaBox()
344
 
345
  add_meta_box(
346
  'tinymce_templates-donate',
347
- __('Donate', 'tinymce_templates'),
348
- array(&$this, 'donateMetaBox'),
349
  $this->post_type,
350
  'side',
351
  'low'
352
  );
353
  }
354
 
355
- public function donateMetaBox($post, $box)
356
  {
357
  echo '<p>';
358
- echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CU8N3N2Q9DA8U">';
359
- echo '<img src="'.$this->base_url.'/img/paypal.png">';
360
  echo '</a>';
361
  echo '</p>';
362
- echo '<p>'.__('It is hard to continue development and support for WordPress plugins without contributions from users like you.', 'tinymce_templates').'</p>';
363
  }
364
 
365
  public function translatorsMetaBox($post, $box)
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.3.0
8
  Author URI: http://wpist.me/
9
  Domain Path: /languages
10
  Text Domain: tinymce_templates
34
 
35
  require_once(dirname(__FILE__).'/includes/mceplugins.class.php');
36
 
37
+ $tinymce_templates = new tinymceTemplates();
38
+ $tinymce_templates->register();
39
 
40
  class tinymceTemplates {
41
 
92
  ),
93
  );
94
 
95
+ public function register()
96
  {
97
  $this->base_url = plugins_url(dirname(plugin_basename(__FILE__)));
98
  register_activation_hook(__FILE__, array(&$this, 'activation'));
189
 
190
  private function fixed_role_issue()
191
  {
192
+ global $wp_roles;
193
+ $roles = array('administrator', 'editor');
194
+ foreach ($roles as $r) {
195
+ $wp_roles->add_cap($r, "edit_others_posts");
196
+ }
197
  }
198
 
199
  public function mce_css($css)
229
  $inits
230
  );
231
 
232
+ echo '<style type="text/css">';
233
+ printf(
234
+ 'span.mceIcon.mce_template{background-image: url(%s) !important; background-position: center center !important;background-repeat: no-repeat;}',
235
+ plugins_url('mce_plugins/plugins/template/img/icon.png', __FILE__)
236
+ );
237
+ echo '</style>';
238
+
239
  if (get_post_type() === $this->post_type) {
240
  if (get_option("tinymce_templates_db_version") != $this->db_version) {
241
  $this->activation();
352
 
353
  add_meta_box(
354
  'tinymce_templates-donate',
355
+ 'High Performance WordPress Hosting',
356
+ array(&$this, 'amimoto_metabox'),
357
  $this->post_type,
358
  'side',
359
  'low'
360
  );
361
  }
362
 
363
+ public function amimoto_metabox($post, $box)
364
  {
365
  echo '<p>';
366
+ echo '<a href="http://megumi-cloud.com/">';
367
+ echo '<img src="'.$this->base_url.'/img/amimoto.png" style="display: block;margin: 0 auto;max-width: 100%;">';
368
  echo '</a>';
369
  echo '</p>';
 
370
  }
371
 
372
  public function translatorsMetaBox($post, $box)