Version Description
Download this release
Release Info
Developer | miyauchi |
Plugin | TinyMCE Templates |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.0 to 2.5.0
- readme.txt +3 -3
- tinymce-templates.php +7 -9
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
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.
|
6 |
-
Tested up to: 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.
|
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.2
|
6 |
+
Tested up to: 3.3
|
7 |
+
Stable tag: 2.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://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
|
@@ -173,8 +173,7 @@ public function admin_head(){
|
|
173 |
|
174 |
public function display_post_states($stat)
|
175 |
{
|
176 |
-
|
177 |
-
$share = get_post_meta($post->ID, $this->meta_param, true);
|
178 |
if ($share) {
|
179 |
$stat[] = __('Shared', 'tinymce_templates');
|
180 |
}
|
@@ -331,7 +330,7 @@ public function wp_ajax(){
|
|
331 |
if (isset($_GET['template_id']) && intval($_GET['template_id'])) {
|
332 |
$p = get_post($_GET['template_id']);
|
333 |
if ($p->post_status === 'publish') {
|
334 |
-
if ($u->ID === $p->post_author) {
|
335 |
echo apply_filters(
|
336 |
"tinymce_templates",
|
337 |
wpautop($p->post_content),
|
@@ -360,14 +359,13 @@ public function wp_ajax(){
|
|
360 |
$posts = get_posts($p);
|
361 |
|
362 |
$url = admin_url('admin-ajax.php');
|
363 |
-
$url
|
364 |
-
$
|
365 |
-
$nonce
|
366 |
-
$url = add_query_arg('nonce', $nonce, $url);
|
367 |
|
368 |
$arr = array();
|
369 |
foreach ($posts as $p) {
|
370 |
-
if ($u->ID !== $p->post_author) {
|
371 |
$share = get_post_meta($p->ID, $this->meta_param, true);
|
372 |
if (!$share) {
|
373 |
continue;
|
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.5.0
|
8 |
Author URI: http://wpist.me/
|
9 |
Domain Path: /languages
|
10 |
Text Domain: tinymce_templates
|
173 |
|
174 |
public function display_post_states($stat)
|
175 |
{
|
176 |
+
$share = get_post_meta(get_the_ID(), $this->meta_param, true);
|
|
|
177 |
if ($share) {
|
178 |
$stat[] = __('Shared', 'tinymce_templates');
|
179 |
}
|
330 |
if (isset($_GET['template_id']) && intval($_GET['template_id'])) {
|
331 |
$p = get_post($_GET['template_id']);
|
332 |
if ($p->post_status === 'publish') {
|
333 |
+
if (intval($u->ID) && (intval($u->ID) === intval($p->post_author))) {
|
334 |
echo apply_filters(
|
335 |
"tinymce_templates",
|
336 |
wpautop($p->post_content),
|
359 |
$posts = get_posts($p);
|
360 |
|
361 |
$url = admin_url('admin-ajax.php');
|
362 |
+
$url = add_query_arg('action', 'tinymce_templates', $url);
|
363 |
+
$nonce = wp_create_nonce("tinymce_templates");
|
364 |
+
$url = add_query_arg('nonce', $nonce, $url);
|
|
|
365 |
|
366 |
$arr = array();
|
367 |
foreach ($posts as $p) {
|
368 |
+
if (intval($u->ID) && (intval($u->ID) !== intval($p->post_author))) {
|
369 |
$share = get_post_meta($p->ID, $this->meta_param, true);
|
370 |
if (!$share) {
|
371 |
continue;
|