Version Description
- Improved Javascript to use jQuery
- Improved placement of Toggle link
- Added
remove_filter( 'pre_term_description', 'wp_filter_kses' );
code to allow for HTML in tag, category, and taxonomy descriptions -- since that's what this plugin does :-) *
Download this release
Release Info
Developer | katzwebdesign |
Plugin | Rich Text Tags |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- kws_rt_category.js +0 -19
- kws_rt_taxonomy.css +1 -13
- kws_rt_taxonomy.js +15 -13
- readme.txt +11 -2
- rich-text-tags.php +10 -30
- screenshot-1.jpg +0 -0
kws_rt_category.js
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
// For use with Rich Text Tags & Taxonomy WordPress Plugin
|
2 |
-
|
3 |
-
//this is for compatability with cforms
|
4 |
-
var purl = '';
|
5 |
-
|
6 |
-
/*-----------------------
|
7 |
-
Initialize
|
8 |
-
-----------------------*/
|
9 |
-
window.onload = function () {
|
10 |
-
tinyMCE.settings['save_callback'] = function (e,c,body) {
|
11 |
-
return c;
|
12 |
-
}
|
13 |
-
tinyMCE.execCommand('mceAddControl',false,'category_description');
|
14 |
-
}
|
15 |
-
|
16 |
-
function toggleRichText() {
|
17 |
-
tinyMCE.execCommand('mceToggleEditor',false,'category_description');
|
18 |
-
return false;
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kws_rt_taxonomy.css
CHANGED
@@ -4,16 +4,4 @@ textarea#description, textarea#category_description {
|
|
4 |
}
|
5 |
#description_tbl {
|
6 |
border:1px solid #666;
|
7 |
-
}
|
8 |
-
#toggleRichText{
|
9 |
-
margin:10px;
|
10 |
-
position: absolute;
|
11 |
-
right: 0;
|
12 |
-
margin-top: 30px;
|
13 |
-
}
|
14 |
-
/*
|
15 |
-
#toggleRichText{
|
16 |
-
margin:10px;
|
17 |
-
position: relative;
|
18 |
-
}
|
19 |
-
*/
|
4 |
}
|
5 |
#description_tbl {
|
6 |
border:1px solid #666;
|
7 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kws_rt_taxonomy.js
CHANGED
@@ -3,17 +3,19 @@
|
|
3 |
//this is for compatability with cforms
|
4 |
var purl = '';
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
return c;
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
tinyMCE.execCommand('mceToggleEditor',false,'description');
|
18 |
-
return false;
|
19 |
-
}
|
3 |
//this is for compatability with cforms
|
4 |
var purl = '';
|
5 |
|
6 |
+
jQuery(function($) {
|
7 |
+
|
8 |
+
// Add the Rich Text Editor to the "description" textarea
|
9 |
+
tinyMCE.execCommand('mceAddControl',false,'description');
|
10 |
+
tinyMCE.execCommand('mceAddControl',false,'category_description');
|
11 |
+
tinyMCE.settings['save_callback'] = function (e,c,body) { return c; }
|
12 |
+
|
13 |
+
$('label[for="description"],label[for="category_description"]').parent().append('<div id="toggleRichText" class="hide-if-no-js"><p><a href="#">Toggle Rich Text Editor</a></p></div>');
|
14 |
+
|
15 |
+
$('#toggleRichText').click(function() {
|
16 |
+
tinyMCE.execCommand('mceToggleEditor',false,'description');
|
17 |
+
tinyMCE.execCommand('mceToggleEditor',false,'category_description');
|
18 |
+
return false;
|
19 |
+
});
|
20 |
|
21 |
+
}); /* end ready() */
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,15 +4,17 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zackk
|
|
4 |
Tags: tag, tags, taxonomy, taxonomies, category, categories, category description, rich text category, editor, rich text, description, tag description, taxonomy description, rich text, wysiwyg, tinyMCE
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 2.8.4
|
7 |
-
Stable tag: 1.0.
|
8 |
|
9 |
The Rich Text Tags Plugin allows you to edit tag, category, and taxonomy descriptions using Wordpress' built in WYSIWYG editor.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
###
|
14 |
The Rich Text Tags Plugin allows you to edit tag descriptions, category descriptions, and taxonomy descriptions using Wordpress' built in rich-text editor. Switch between WYSIWYG and HTML editing modes with the click of a link.
|
15 |
|
|
|
|
|
16 |
#### Created by a [Denver SEO](http://www.katzwebdesign.net) company. ####
|
17 |
Katz Web Services, Inc. is a Denver WordPress development and search engine optimization company. [Check out our other plugins](http://wordpress.org/extend/plugins/profile/katzwebdesign)!
|
18 |
|
@@ -29,6 +31,13 @@ Katz Web Services, Inc. is a Denver WordPress development and search engine opti
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
= 1.0.1 =
|
33 |
* Updated the `readme.txt` file to make clearer
|
34 |
|
4 |
Tags: tag, tags, taxonomy, taxonomies, category, categories, category description, rich text category, editor, rich text, description, tag description, taxonomy description, rich text, wysiwyg, tinyMCE
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 2.8.4
|
7 |
+
Stable tag: 1.0.2
|
8 |
|
9 |
The Rich Text Tags Plugin allows you to edit tag, category, and taxonomy descriptions using Wordpress' built in WYSIWYG editor.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
### WordPress now has a TinyMCE Editor for Tags, Categories, and Taxonomies ###
|
14 |
The Rich Text Tags Plugin allows you to edit tag descriptions, category descriptions, and taxonomy descriptions using Wordpress' built in rich-text editor. Switch between WYSIWYG and HTML editing modes with the click of a link.
|
15 |
|
16 |
+
Use the PHP functions `tag_description()` and `category_description()` in your theme to show the descriptions. To learn how to show taxonomy descriptions, [read more on the plugin page](http://www.seodenver.com/rich-text-tags/).
|
17 |
+
|
18 |
#### Created by a [Denver SEO](http://www.katzwebdesign.net) company. ####
|
19 |
Katz Web Services, Inc. is a Denver WordPress development and search engine optimization company. [Check out our other plugins](http://wordpress.org/extend/plugins/profile/katzwebdesign)!
|
20 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.0.2 =
|
35 |
+
* Improved Javascript to use jQuery
|
36 |
+
* Improved placement of Toggle link
|
37 |
+
* Added `remove_filter( 'pre_term_description', 'wp_filter_kses' );` code to allow for HTML in tag,
|
38 |
+
category, and taxonomy descriptions -- since that's what this plugin does :-)
|
39 |
+
*
|
40 |
+
|
41 |
= 1.0.1 =
|
42 |
* Updated the `readme.txt` file to make clearer
|
43 |
|
rich-text-tags.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Rich Text Tags, Categories, and Taxonomies
|
|
4 |
Plugin URI: http://www.seodenver.com/rich-text-tags/
|
5 |
Description: This plugin offers rich text editing capabilities for descriptions of tags, categories, and taxonomies.
|
6 |
Author: Katz Web Services, Inc.
|
7 |
-
Version: 1.0.
|
8 |
Author URI: http://www.katzwebdesign.net
|
9 |
*/
|
10 |
/*
|
@@ -43,32 +43,27 @@ $GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit' //(!iss
|
|
43 |
wp_enqueue_script('editor');
|
44 |
wp_enqueue_script('thickbox');
|
45 |
add_action('admin_head','wp_tiny_mce');
|
|
|
|
|
46 |
}
|
47 |
add_action('init','kws_rt_taxonomy_load_mce');
|
48 |
add_action('wp_print_scripts','kws_rt_taxonomy_scripts');
|
49 |
}
|
50 |
if($GLOBALS['pagenow'] == 'edit-tags.php' && $_REQUEST['action'] == 'edit') {
|
51 |
-
add_action('edit_tag_form_pre','show_disable_richtext'); // Add link to disable Rich Text
|
52 |
add_action('edit_term','kws_rt_taxonomy_save');
|
53 |
}
|
54 |
if($GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit') { // (!isset($_REQUEST['action']) || $_REQUEST['action'] == 'edit')) {
|
55 |
-
add_action('edit_category_form_pre','show_disable_richtext'); // Add link to disable Rich Text
|
56 |
-
add_action('add_category_form_pre','show_disable_richtext'); // Add link to disable Rich Text
|
57 |
add_action('edit_category','kws_rt_category_save');
|
58 |
-
//add_action('add_category','kws_rt_category_add');
|
59 |
}
|
60 |
|
61 |
// LOAD SCRIPTS
|
62 |
function kws_rt_taxonomy_load_mce() {
|
63 |
-
|
64 |
-
wp_enqueue_script('tiny_mce');
|
65 |
-
}
|
66 |
|
67 |
-
if($
|
68 |
-
|
69 |
-
|
70 |
-
wp_enqueue_script('kws_rte',WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'kws_rt_category.js');
|
71 |
-
}
|
72 |
}
|
73 |
function kws_rt_taxonomy_scripts() {
|
74 |
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'kws_rt_taxonomy.css" type="text/css" media="all" />' . "\n";
|
@@ -92,22 +87,7 @@ function kws_rt_category_save() {
|
|
92 |
}
|
93 |
}
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
global $cat_ID;
|
98 |
-
$a = array('category_description');
|
99 |
-
foreach($a as $v) {
|
100 |
-
wp_update_category($cat_ID,$v,$_POST[$v]);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
*/
|
104 |
|
105 |
-
// Make a funky-ass-positioned toggle link
|
106 |
-
function show_disable_richtext() {
|
107 |
-
echo '
|
108 |
-
<div id="toggleRichText">
|
109 |
-
<!-- could not figure out simple jQuery in the WP Admin for some reason...? -->
|
110 |
-
<a href="#" onclick="toggleRichText()">Toggle Rich Text</a>
|
111 |
-
</div>';
|
112 |
-
}
|
113 |
?>
|
4 |
Plugin URI: http://www.seodenver.com/rich-text-tags/
|
5 |
Description: This plugin offers rich text editing capabilities for descriptions of tags, categories, and taxonomies.
|
6 |
Author: Katz Web Services, Inc.
|
7 |
+
Version: 1.0.2
|
8 |
Author URI: http://www.katzwebdesign.net
|
9 |
*/
|
10 |
/*
|
43 |
wp_enqueue_script('editor');
|
44 |
wp_enqueue_script('thickbox');
|
45 |
add_action('admin_head','wp_tiny_mce');
|
46 |
+
} else {
|
47 |
+
wp_enqueue_script('tiny_mce');
|
48 |
}
|
49 |
add_action('init','kws_rt_taxonomy_load_mce');
|
50 |
add_action('wp_print_scripts','kws_rt_taxonomy_scripts');
|
51 |
}
|
52 |
if($GLOBALS['pagenow'] == 'edit-tags.php' && $_REQUEST['action'] == 'edit') {
|
53 |
+
//add_action('edit_tag_form_pre','show_disable_richtext'); // Add link to disable Rich Text
|
54 |
add_action('edit_term','kws_rt_taxonomy_save');
|
55 |
}
|
56 |
if($GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit') { // (!isset($_REQUEST['action']) || $_REQUEST['action'] == 'edit')) {
|
|
|
|
|
57 |
add_action('edit_category','kws_rt_category_save');
|
|
|
58 |
}
|
59 |
|
60 |
// LOAD SCRIPTS
|
61 |
function kws_rt_taxonomy_load_mce() {
|
62 |
+
$kwsScript = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'kws_rt_taxonomy.js';
|
|
|
|
|
63 |
|
64 |
+
//if ( file_exists($kwsScript) ) {
|
65 |
+
wp_enqueue_script('kws_rte',$kwsScript);
|
66 |
+
// }
|
|
|
|
|
67 |
}
|
68 |
function kws_rt_taxonomy_scripts() {
|
69 |
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'kws_rt_taxonomy.css" type="text/css" media="all" />' . "\n";
|
87 |
}
|
88 |
}
|
89 |
|
90 |
+
// Remove XHTML filtering from descriptions
|
91 |
+
remove_filter( 'pre_term_description', 'wp_filter_kses' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
?>
|
screenshot-1.jpg
CHANGED
Binary file
|