Version Description
Download this release
Release Info
Developer | miyauchi |
Plugin | TinyMCE Templates |
Version | 2.7.0 |
Comparing to | |
See all releases |
Code changes from version 2.6.1 to 2.7.0
- readme.txt +2 -1
- tinymce-templates.php +18 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: tinymce, Visual Editor, template
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.3
|
7 |
-
Stable tag: 2.
|
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.
|
@@ -55,6 +55,7 @@ You can send your own language pack to me.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
58 |
* [2.6.0](http://wpist.me/2011/11/14/tinymce-templates-2-6-0/)
|
59 |
* [2.4.0](http://wpist.me/2011/11/14/tinymce-templates-2-4-0/)
|
60 |
* [2.3.0](http://wpist.me/2011/11/14/tinymce-templates-2-3-0/)
|
4 |
Tags: tinymce, Visual Editor, template
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.3
|
7 |
+
Stable tag: 2.7.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.
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
* [2.7.0](http://wpist.me/2012/05/19/tinymce-templates-2-7-0/)
|
59 |
* [2.6.0](http://wpist.me/2011/11/14/tinymce-templates-2-6-0/)
|
60 |
* [2.4.0](http://wpist.me/2011/11/14/tinymce-templates-2-4-0/)
|
61 |
* [2.3.0](http://wpist.me/2011/11/14/tinymce-templates-2-3-0/)
|
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: 2.
|
8 |
Author URI: http://wpist.me/
|
9 |
Domain Path: /languages
|
10 |
Text Domain: tinymce_templates
|
@@ -87,6 +87,7 @@ function __construct()
|
|
87 |
add_filter('mce_css', array(&$this, 'mce_css'));
|
88 |
add_action('admin_head', array(&$this, 'admin_head'));
|
89 |
add_action('wp_ajax_tinymce_templates', array(&$this, 'wp_ajax'));
|
|
|
90 |
}
|
91 |
|
92 |
public function activation()
|
@@ -159,6 +160,10 @@ public function admin_head(){
|
|
159 |
);
|
160 |
|
161 |
if (get_post_type() === $this->post_type) {
|
|
|
|
|
|
|
|
|
162 |
if (get_option("tinymce_templates_db_version") != $this->db_version) {
|
163 |
$this->activation();
|
164 |
}
|
@@ -175,6 +180,18 @@ public function admin_head(){
|
|
175 |
}
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
public function display_post_states($stat)
|
179 |
{
|
180 |
$share = get_post_meta(get_the_ID(), $this->meta_param, true);
|
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: 2.7.0
|
8 |
Author URI: http://wpist.me/
|
9 |
Domain Path: /languages
|
10 |
Text Domain: tinymce_templates
|
87 |
add_filter('mce_css', array(&$this, 'mce_css'));
|
88 |
add_action('admin_head', array(&$this, 'admin_head'));
|
89 |
add_action('wp_ajax_tinymce_templates', array(&$this, 'wp_ajax'));
|
90 |
+
add_filter('parse_query', array(&$this, 'parse_query'));
|
91 |
}
|
92 |
|
93 |
public function activation()
|
160 |
);
|
161 |
|
162 |
if (get_post_type() === $this->post_type) {
|
163 |
+
global $wp_roles;
|
164 |
+
$me = wp_get_current_user();
|
165 |
+
$role = array_shift($me->roles);
|
166 |
+
$wp_roles->remove_cap($role, "edit_others_posts");
|
167 |
if (get_option("tinymce_templates_db_version") != $this->db_version) {
|
168 |
$this->activation();
|
169 |
}
|
180 |
}
|
181 |
}
|
182 |
|
183 |
+
public function parse_query($q)
|
184 |
+
{
|
185 |
+
if (!is_admin()) {
|
186 |
+
return $q;
|
187 |
+
}
|
188 |
+
if (isset($q->query_vars['post_type']) &&
|
189 |
+
($q->query_vars['post_type'] === $this->post_type)) {
|
190 |
+
//$q->set('author', get_current_user_id());
|
191 |
+
}
|
192 |
+
return $q;
|
193 |
+
}
|
194 |
+
|
195 |
public function display_post_states($stat)
|
196 |
{
|
197 |
$share = get_post_meta(get_the_ID(), $this->meta_param, true);
|