TinyMCE Templates - Version 1.6.0

Version Description

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.6.0

includes/TinyMCETemplate.class.php CHANGED
@@ -8,7 +8,7 @@ class TinyMCETemplate{
8
 
9
  function __construct()
10
  {
11
- new AddRewriteRules(
12
  'wp-admin/mce_templates.js$',
13
  'mce_templates',
14
  array(&$this, 'get_templates')
8
 
9
  function __construct()
10
  {
11
+ new WP_AddRewriteRules(
12
  'wp-admin/mce_templates.js$',
13
  'mce_templates',
14
  array(&$this, 'get_templates')
includes/addrewriterules.class.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- /*
3
- Copyright (c) 2010 Takayuki Miyauchi (THETA NETWORKS Co,.Ltd).
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
22
- */
23
-
24
- if (!class_exists('AddRewriteRules')):
25
- class AddRewriteRules{
26
-
27
- private $rule = null;
28
- private $query = null;
29
- private $callback = null;
30
-
31
- function __construct($rule, $query, $callback){
32
- $this->rule = $rule;
33
- $this->query = $query;
34
- $this->callback = $callback;
35
- add_filter('query_vars', array(&$this, 'query_vars'));
36
- add_filter('rewrite_rules_array', array(&$this, 'rewrite_rules_array'));
37
- add_action('init', array(&$this, 'init'));
38
- add_action('wp', array(&$this, 'wp'));
39
- }
40
-
41
- public function init()
42
- {
43
- global $wp_rewrite;
44
- $rules = $wp_rewrite->wp_rewrite_rules();
45
- if (!isset($rules[$this->rule])) {
46
- $wp_rewrite->flush_rules();
47
- }
48
- }
49
-
50
- public function rewrite_rules_array($rules)
51
- {
52
- global $wp_rewrite;
53
- $new_rules[$this->rule] = $wp_rewrite->index . '?'.$this->query.'=1';
54
- $rules = array_merge($new_rules, $rules);
55
- return $rules;
56
- }
57
-
58
- public function query_vars($vars)
59
- {
60
- $vars[] = $this->query;
61
- return $vars;
62
- }
63
-
64
- public function wp()
65
- {
66
- if (get_query_var($this->query)) {
67
- call_user_func($this->callback);
68
- }
69
- }
70
- }
71
- endif;
72
-
73
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-addrewriterules.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('WP_AddRewriteRules')):
4
+ class WP_AddRewriteRules{
5
+ private $rule = null;
6
+ private $query = null;
7
+ private $callback = null;
8
+
9
+ function __construct($rule, $query, $callback)
10
+ {
11
+ $this->rule = $rule;
12
+ $this->query = $query;
13
+ $this->callback = $callback;
14
+ add_filter('query_vars', array(&$this, 'query_vars'));
15
+ add_action(
16
+ 'generate_rewrite_rules',
17
+ array(&$this, 'generate_rewrite_rules')
18
+ );
19
+ add_action('wp', array(&$this, 'wp'));
20
+ }
21
+
22
+ public function generate_rewrite_rules($wp_rewrite)
23
+ {
24
+ $new_rules[$this->rule] = $wp_rewrite->index . '?' . (
25
+ strpos($this->query, '=') === FALSE
26
+ ? $this->query . '=1'
27
+ : $this->query
28
+ );
29
+ $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
30
+ }
31
+
32
+ private function parse_query($query)
33
+ {
34
+ $query = explode('&', $query);
35
+ $query = explode(
36
+ '=',
37
+ is_array($query) && isset($query[0]) ? $query[0] : $query
38
+ );
39
+ return (is_array($query) && isset($query[0]) ? $query[0] : $query);
40
+ }
41
+
42
+ public function query_vars($vars)
43
+ {
44
+ $vars[] = $this->parse_query($this->query);
45
+ return $vars;
46
+ }
47
+
48
+ public function wp()
49
+ {
50
+ if (get_query_var($this->parse_query($this->query))) {
51
+ call_user_func($this->callback);
52
+ }
53
+ }
54
+ }
55
+ endif;
56
+
57
+ // eol
langs/tinymce_templates-es_ES.mo ADDED
Binary file
langs/tinymce_templates-es_ES.po ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is distributed under the same license as the PACKAGE package.
2
+ # Tobias Bergius <bergius.tobias@gmail.com>, 2011.
3
+ #
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: PACKAGE VERSION\n"
7
+ "Report-Msgid-Bugs-To: \n"
8
+ "POT-Creation-Date: 2010-11-21 05:10+0900\n"
9
+ "PO-Revision-Date: 2011-09-21 16:55+0100\n"
10
+ "Last-Translator: David Bravo <dbravo@dimensionmultimedia.com>\n"
11
+ "Language: Swedish\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Language-Team: \n"
16
+
17
+ #: ../includes/MceTemplatesAdmin.class.php:34
18
+ #: ../includes/MceTemplatesAdmin.class.php:156
19
+ #: ../tinymce_templates.php:103
20
+ msgid "Edit Templates"
21
+ msgstr "Editar Plantillas"
22
+
23
+ #: ../includes/MceTemplatesAdmin.class.php:38
24
+ msgid "Templates permanently deleted."
25
+ msgstr "Plantillas permanentemente borradas."
26
+
27
+ #: ../includes/MceTemplatesAdmin.class.php:46
28
+ #: ../includes/MceTemplatesAdmin.class.php:55
29
+ msgid "Name"
30
+ msgstr "Nombre"
31
+
32
+ #: ../includes/MceTemplatesAdmin.class.php:47
33
+ #: ../includes/MceTemplatesAdmin.class.php:56
34
+ msgid "Description"
35
+ msgstr "Descripción"
36
+
37
+ #: ../includes/MceTemplatesAdmin.class.php:48
38
+ #: ../includes/MceTemplatesAdmin.class.php:57
39
+ msgid "Author"
40
+ msgstr "Autor"
41
+
42
+ #: ../includes/MceTemplatesAdmin.class.php:49
43
+ #: ../includes/MceTemplatesAdmin.class.php:58
44
+ #: ../includes/MceTemplatesAdmin.class.php:169
45
+ #: ../includes/MceTemplatesAdmin.class.php:172
46
+ #: ../includes/MceTemplatesAdmin.class.php:175
47
+ msgid "Share"
48
+ msgstr "Compartido"
49
+
50
+ #: ../includes/MceTemplatesAdmin.class.php:94
51
+ msgid "Shared"
52
+ msgstr "Compartido"
53
+
54
+ #: ../includes/MceTemplatesAdmin.class.php:96
55
+ #: ../includes/MceTemplatesAdmin.class.php:173
56
+ #: ../includes/MceTemplatesAdmin.class.php:176
57
+ msgid "Private"
58
+ msgstr "Privado"
59
+
60
+ #: ../includes/MceTemplatesAdmin.class.php:103
61
+ msgid "Delete checked items"
62
+ msgstr "Borrar elementos seleccionados"
63
+
64
+ #: ../includes/MceTemplatesAdmin.class.php:113
65
+ msgid "Template saved."
66
+ msgstr "Plantilla guardada."
67
+
68
+ #: ../includes/MceTemplatesAdmin.class.php:124
69
+ msgid "All entry must not be blank."
70
+ msgstr "No puede haber ningún campo en blanco."
71
+
72
+ #: ../includes/MceTemplatesAdmin.class.php:158
73
+ #: ../tinymce_templates.php:111
74
+ msgid "Add New Templates"
75
+ msgstr "Añadir nuevas Plantillas"
76
+
77
+ #: ../includes/MceTemplatesAdmin.class.php:163
78
+ msgid "Template Name"
79
+ msgstr "Nombre de la Plantilla"
80
+
81
+ #: ../includes/MceTemplatesAdmin.class.php:165
82
+ msgid "Template Description"
83
+ msgstr "Descripción de la Plantilla"
84
+
85
+ #: ../includes/MceTemplatesAdmin.class.php:167
86
+ msgid "Template Contents"
87
+ msgstr "Contenidos de la Plantilla"
88
+
89
+ #: ../includes/MceTemplatesAdmin.class.php:180
90
+ msgid "Save Template"
91
+ msgstr "Guardar Plantilla"
92
+
93
+ #: ../tinymce_templates.php:94
94
+ msgid "tinyMCE Templates"
95
+ msgstr "Plantillas de tinyMCE"
96
+
97
+ #: ../tinymce_templates.php:95
98
+ msgid "Templates"
99
+ msgstr "Plantillas"
100
+
101
+ #: ../tinymce_templates.php:104
102
+ msgid "Edit"
103
+ msgstr "Editar"
104
+
105
+ #: ../tinymce_templates.php:112
106
+ msgid "Add New"
107
+ msgstr "Añadir Nueva"
108
+
langs/tinymce_templates-nl_NL.mo ADDED
Binary file
langs/tinymce_templates-nl_NL.po ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2010-11-21 05:10+0900\n"
11
+ "PO-Revision-Date: 2011-04-15 08:54+0100\n"
12
+ "Last-Translator: Frank Groeneveld <frank@ivaldi.nl>\n"
13
+ "Language-Team: nl_NL <info@ivaldi.nl>\n"
14
+ "Language: \n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+
19
+ #: ../includes/MceTemplatesAdmin.class.php:34
20
+ #: ../includes/MceTemplatesAdmin.class.php:156
21
+ #: ../tinymce_templates.php:103
22
+ msgid "Edit Templates"
23
+ msgstr "Bewerk templates"
24
+
25
+ #: ../includes/MceTemplatesAdmin.class.php:38
26
+ msgid "Templates permanently deleted."
27
+ msgstr "Templates permanent verwijderd."
28
+
29
+ #: ../includes/MceTemplatesAdmin.class.php:46
30
+ #: ../includes/MceTemplatesAdmin.class.php:55
31
+ msgid "Name"
32
+ msgstr "Naam"
33
+
34
+ #: ../includes/MceTemplatesAdmin.class.php:47
35
+ #: ../includes/MceTemplatesAdmin.class.php:56
36
+ msgid "Description"
37
+ msgstr "Omschrijving"
38
+
39
+ #: ../includes/MceTemplatesAdmin.class.php:48
40
+ #: ../includes/MceTemplatesAdmin.class.php:57
41
+ msgid "Author"
42
+ msgstr "Auteur"
43
+
44
+ #: ../includes/MceTemplatesAdmin.class.php:49
45
+ #: ../includes/MceTemplatesAdmin.class.php:58
46
+ #: ../includes/MceTemplatesAdmin.class.php:169
47
+ #: ../includes/MceTemplatesAdmin.class.php:172
48
+ #: ../includes/MceTemplatesAdmin.class.php:175
49
+ msgid "Share"
50
+ msgstr "Delen"
51
+
52
+ #: ../includes/MceTemplatesAdmin.class.php:94
53
+ msgid "Shared"
54
+ msgstr "Gedeeld"
55
+
56
+ #: ../includes/MceTemplatesAdmin.class.php:96
57
+ #: ../includes/MceTemplatesAdmin.class.php:173
58
+ #: ../includes/MceTemplatesAdmin.class.php:176
59
+ msgid "Private"
60
+ msgstr "Privé"
61
+
62
+ #: ../includes/MceTemplatesAdmin.class.php:103
63
+ msgid "Delete checked items"
64
+ msgstr "Verwijder geselecteerde items"
65
+
66
+ #: ../includes/MceTemplatesAdmin.class.php:113
67
+ msgid "Template saved."
68
+ msgstr "Template opgeslagen"
69
+
70
+ #: ../includes/MceTemplatesAdmin.class.php:124
71
+ msgid "All entry must not be blank."
72
+ msgstr "Alle invoervelden moeten gevuld zijn."
73
+
74
+ #: ../includes/MceTemplatesAdmin.class.php:158
75
+ #: ../tinymce_templates.php:111
76
+ msgid "Add New Templates"
77
+ msgstr "Nieuwe template toevoegen"
78
+
79
+ #: ../includes/MceTemplatesAdmin.class.php:163
80
+ msgid "Template Name"
81
+ msgstr "Naam template"
82
+
83
+ #: ../includes/MceTemplatesAdmin.class.php:165
84
+ msgid "Template Description"
85
+ msgstr "Omschrijving template"
86
+
87
+ #: ../includes/MceTemplatesAdmin.class.php:167
88
+ msgid "Template Contents"
89
+ msgstr "Inhoud template"
90
+
91
+ #: ../includes/MceTemplatesAdmin.class.php:180
92
+ msgid "Save Template"
93
+ msgstr "Template opslaan"
94
+
95
+ #: ../tinymce_templates.php:94
96
+ msgid "tinyMCE Templates"
97
+ msgstr "tinyMCE Templates"
98
+
99
+ #: ../tinymce_templates.php:95
100
+ msgid "Templates"
101
+ msgstr "Templates"
102
+
103
+ #: ../tinymce_templates.php:104
104
+ msgid "Edit"
105
+ msgstr "Templates"
106
+
107
+ #: ../tinymce_templates.php:112
108
+ msgid "Add New"
109
+ msgstr "Nieuwe template"
110
+
mce_plugins/plugins/template/langs/es_dlg.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tinyMCE.addI18n('es.template_dlg',{
2
+ title:"Plantillas",
3
+ label:"Plantilla",
4
+ desc_label:"Descripci&oacute;n",
5
+ desc:"Inserta el contenido predefinido de la plantilla",
6
+ select:"Selecciona una plantilla",
7
+ preview:"Previsualizar",
8
+ warning:"Atencion: Actualizar una plantilla con otra diferente puede acarrear p&eacute;rdida de datos.",
9
+ mdate_format:"%Y-%m-%d %H:%M:%S",
10
+ cdate_format:"%Y-%m-%d %H:%M:%S",
11
+ months_long:"Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre",
12
+ months_short:"Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic",
13
+ day_long:"Domingo,Lunes,Martes,Mi&eacute;rcoles,Jueves,Viernes,S&aacute;bado,Domingo",
14
+ day_short:"Dom,Lun,Mar,Mi&eacute;,Jue,Vie,S&aacute;b,Dom"
15
+ });
mce_plugins/plugins/template/langs/nl_dlg.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tinyMCE.addI18n('nl.template_dlg',{
2
+ title:"Templates",
3
+ label:"Template",
4
+ desc_label:"Omschrijving",
5
+ desc:"Template invoegen",
6
+ select:"Selecteer een template",
7
+ preview:"Preview",
8
+ warning:"Warning: Updating a template with a different one may cause data loss.",
9
+ mdate_format:"%Y-%m-%d %H:%M:%S",
10
+ cdate_format:"%Y-%m-%d %H:%M:%S",
11
+ months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
12
+ months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
13
+ day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
14
+ day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
15
+ });
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: 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.
@@ -16,6 +16,7 @@ You can edit and share this template with WordPress users.
16
 
17
  If you will install this plugin, You will be very easy to edit posts and pages.
18
 
 
19
  * [Plugin Homepage](http://firegoby.theta.ne.jp/wp/tinymce_templates) (Japanese)
20
  * [Support](http://wordpress.org/tags/tinymce-templates)
21
 
@@ -31,6 +32,8 @@ If you will install this plugin, You will be very easy to edit posts and pages.
31
  * Italian(it_IT) - [Andrea Bersi](http://www.andreabersi.com)
32
  * Swedish(sv_SE) - Tobias Bergius
33
  * German(de_DE) - [Martin Lettner](http://www.martinlettner.info/)
 
 
34
 
35
  You can send your own language pack to me.
36
 
4
  Tags: tinymce, Visual Editor, template
5
  Requires at least: 3.0
6
  Tested up to: 3.2
7
+ Stable tag: 1.6.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.
16
 
17
  If you will install this plugin, You will be very easy to edit posts and pages.
18
 
19
+ * [GitHub](https://github.com/miya0001/TinyMCE-Templates)
20
  * [Plugin Homepage](http://firegoby.theta.ne.jp/wp/tinymce_templates) (Japanese)
21
  * [Support](http://wordpress.org/tags/tinymce-templates)
22
 
32
  * Italian(it_IT) - [Andrea Bersi](http://www.andreabersi.com)
33
  * Swedish(sv_SE) - Tobias Bergius
34
  * German(de_DE) - [Martin Lettner](http://www.martinlettner.info/)
35
+ * Spanish(es_ES) - [David Bravo](http://www.dimensionmultimedia.com/)
36
+ * Dutch(nl_NL) - [Frank Groeneveld](http://ivaldi.nl/)
37
 
38
  You can send your own language pack to me.
39
 
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.5.0
8
  Author URI: http://firegoby.theta.ne.jp/
9
  */
10
 
@@ -33,12 +33,13 @@ THE SOFTWARE.
33
  define('TINYMCE_TEMPLATES_PLUGIN_URL', WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__)));
34
  define('TINYMCE_TEMPLATES_DOMAIN', 'tinymce_templates');
35
 
36
- require_once(dirname(__FILE__).'/includes/addrewriterules.class.php');
37
  require_once(dirname(__FILE__).'/includes/mceplugins.class.php');
38
  require_once(dirname(__FILE__).'/includes/TinyMCETemplate.class.php');
39
  require_once(dirname(__FILE__).'/includes/MceTemplatesAdmin.class.php');
40
 
41
  $MceTemplates = new MceTemplates();
 
42
  register_activation_hook (__FILE__, array(&$MceTemplates, 'activation'));
43
  //register_deactivation_hook (__FILE__, array(&$MceTemplates, 'deactivation'));
44
 
@@ -46,6 +47,9 @@ class MceTemplates{
46
 
47
  function __construct()
48
  {
 
 
 
49
  add_action('admin_menu', array(&$this, 'loadAdmin'));
50
  add_filter('plugin_row_meta', array(&$this, 'plugin_row_meta'), 10, 2);
51
  }
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.6.0
8
  Author URI: http://firegoby.theta.ne.jp/
9
  */
10
 
33
  define('TINYMCE_TEMPLATES_PLUGIN_URL', WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__)));
34
  define('TINYMCE_TEMPLATES_DOMAIN', 'tinymce_templates');
35
 
36
+ require_once(dirname(__FILE__).'/includes/class-addrewriterules.php');
37
  require_once(dirname(__FILE__).'/includes/mceplugins.class.php');
38
  require_once(dirname(__FILE__).'/includes/TinyMCETemplate.class.php');
39
  require_once(dirname(__FILE__).'/includes/MceTemplatesAdmin.class.php');
40
 
41
  $MceTemplates = new MceTemplates();
42
+ register_activation_hook(__FILE__, 'flush_rewrite_rules');
43
  register_activation_hook (__FILE__, array(&$MceTemplates, 'activation'));
44
  //register_deactivation_hook (__FILE__, array(&$MceTemplates, 'deactivation'));
45
 
47
 
48
  function __construct()
49
  {
50
+ if (!is_admin()) {
51
+ return;
52
+ }
53
  add_action('admin_menu', array(&$this, 'loadAdmin'));
54
  add_filter('plugin_row_meta', array(&$this, 'plugin_row_meta'), 10, 2);
55
  }