Version Description
- First version of plugin
- Added link to disable Rich Text Editor
=
Download this release
Release Info
Developer | katzwebdesign |
Plugin | Rich Text Tags |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- kws_rt_category.js +19 -0
- kws_rt_taxonomy.css +19 -0
- kws_rt_taxonomy.js +19 -0
- readme.txt +38 -0
- rich-text-tags.php +113 -0
- screenshot-1.jpg +0 -0
kws_rt_category.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* For Rich Text Tags & Taxonomy WordPress Plugin */
|
2 |
+
textarea#description, textarea#category_description {
|
3 |
+
height:400px;
|
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 |
+
*/
|
kws_rt_taxonomy.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,'description');
|
14 |
+
}
|
15 |
+
|
16 |
+
function toggleRichText() {
|
17 |
+
tinyMCE.execCommand('mceToggleEditor',false,'description');
|
18 |
+
return false;
|
19 |
+
}
|
readme.txt
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Rich Text Tags ===
|
2 |
+
Contributors: katzwebdesign
|
3 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zackkatz%40gmail%2ecom&item_name=Rich%20Text%20Tags&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
|
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 |
+
### Finally, 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 |
+
### 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 |
+
|
19 |
+
== Installation ==
|
20 |
+
|
21 |
+
* Upload the `rich-text-tags` folder to the `/wp-content/plugins/` directory
|
22 |
+
* Activate the plugin through the 'Plugins' menu in WordPress
|
23 |
+
|
24 |
+
== Features ==
|
25 |
+
|
26 |
+
* Edit tag descriptions with tinyMCE's WYSIWYG editor
|
27 |
+
* Works with custom taxonomies using [Yoast's Simple Taxonomies Plugin](http://yoast.com/wordpress/simple-taxonomies/)
|
28 |
+
* Capability to turn off rich text editing with a click, so you can edit the HTML
|
29 |
+
|
30 |
+
== Changelog ==
|
31 |
+
|
32 |
+
= 1.0 =
|
33 |
+
* First version of plugin
|
34 |
+
* Added link to disable Rich Text Editor
|
35 |
+
|
36 |
+
== Screenshots ==
|
37 |
+
|
38 |
+
1. How the rich text editor looks in the Edit Tags Page
|
rich-text-tags.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
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 |
+
/*
|
11 |
+
Based on Rich Text Biography by Matthew Praetzel. http://www.ternstyle.us
|
12 |
+
Modified by Katz Web Services, Inc. to work with Simple Taxonomies.
|
13 |
+
The license applied to the Rich Text Biography was in violation of the terms of use specified
|
14 |
+
on the WordPress.org website (http://wordpress.org/extend/plugins/about/), namely that the plugin
|
15 |
+
MUST be GPL Compatible (http://www.gnu.org/licenses/gpl.html).
|
16 |
+
As such, the license included with the original Rich Text Biography plugin was invalid.
|
17 |
+
*/
|
18 |
+
/* Copyright 2009 Katz Web Services, Inc. (email : info@katzwebdesign.com)
|
19 |
+
|
20 |
+
This program is free software; you can redistribute it and/or modify
|
21 |
+
it under the terms of the GNU General Public License as published by
|
22 |
+
the Free Software Foundation; either version 2 of the License, or
|
23 |
+
(at your option) any later version.
|
24 |
+
|
25 |
+
This program is distributed in the hope that it will be useful,
|
26 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28 |
+
GNU General Public License for more details.
|
29 |
+
|
30 |
+
You should have received a copy of the GNU General Public License
|
31 |
+
along with this program; if not, write to the Free Software
|
32 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
33 |
+
*/
|
34 |
+
|
35 |
+
|
36 |
+
// ADD EVENTS
|
37 |
+
if(
|
38 |
+
$GLOBALS['pagenow'] == 'edit-tags.php' && $_REQUEST['action'] == 'edit' ||
|
39 |
+
$GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit' //(!isset($_REQUEST['action']) || $_REQUEST['action'] == 'edit')
|
40 |
+
) {
|
41 |
+
if(floatval($GLOBALS['wp_version']) >= 2.7) {
|
42 |
+
wp_enqueue_script('jquery');
|
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 |
+
if(floatval($GLOBALS['wp_version']) < 2.7) {
|
64 |
+
wp_enqueue_script('tiny_mce');
|
65 |
+
}
|
66 |
+
|
67 |
+
if($GLOBALS['pagenow'] == 'edit-tags.php') { // Tag or taxonomy
|
68 |
+
wp_enqueue_script('kws_rte',WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'kws_rt_taxonomy.js');
|
69 |
+
} else { // category
|
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";
|
75 |
+
}
|
76 |
+
|
77 |
+
// PROCESS FIELDS
|
78 |
+
function kws_rt_taxonomy_save() {
|
79 |
+
global $tag_ID;
|
80 |
+
$a = array('description');
|
81 |
+
foreach($a as $v) {
|
82 |
+
wp_update_term($tag_ID,$v,$_POST[$v]);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
// PROCESS FIELDS
|
87 |
+
function kws_rt_category_save() {
|
88 |
+
global $cat_ID;
|
89 |
+
$a = array('category_description');
|
90 |
+
foreach($a as $v) {
|
91 |
+
wp_update_category($cat_ID,$v,$_POST[$v]);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/*
|
96 |
+
function kws_rt_category_add() {
|
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 |
+
?>
|
screenshot-1.jpg
ADDED
Binary file
|