Version Description
- Fixed whitespace from being stripped in HTML mode
Download this release
Release Info
Developer | katzwebdesign |
Plugin | Rich Text Tags |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.2.1
- readme.txt +7 -1
- rich-text-tags.php +27 -21
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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, SEO, search engine optimization
|
5 |
Requires at least: 2.6
|
6 |
-
Tested up to: 3.0.
|
7 |
Stable tag: trunk
|
8 |
|
9 |
The Rich Text Tags Plugin allows you to edit tag, category, and taxonomy descriptions using Wordpress' built in WYSIWYG editor.
|
@@ -35,6 +35,9 @@ Use the PHP functions `tag_description()` and `category_description()` in your t
|
|
35 |
|
36 |
== Upgrade Notice ==
|
37 |
|
|
|
|
|
|
|
38 |
= 1.2 =
|
39 |
* Fixed issue where toggling between rich text and HTML editors removed paragraphs and line breaks (issue <a href="http://wordpress.org/support/topic/473880" rel="nofollow">473880</a>)
|
40 |
|
@@ -45,6 +48,9 @@ Use the PHP functions `tag_description()` and `category_description()` in your t
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
48 |
= 1.2 =
|
49 |
* Fixed issue where toggling between rich text and HTML editors removed paragraphs and line breaks (issue <a href="http://wordpress.org/support/topic/473880" rel="nofollow">473880</a>)
|
50 |
|
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, SEO, search engine optimization
|
5 |
Requires at least: 2.6
|
6 |
+
Tested up to: 3.0.3
|
7 |
Stable tag: trunk
|
8 |
|
9 |
The Rich Text Tags Plugin allows you to edit tag, category, and taxonomy descriptions using Wordpress' built in WYSIWYG editor.
|
35 |
|
36 |
== Upgrade Notice ==
|
37 |
|
38 |
+
= 1.2.1 =
|
39 |
+
* Fixed whitespace from being stripped in HTML mode
|
40 |
+
|
41 |
= 1.2 =
|
42 |
* Fixed issue where toggling between rich text and HTML editors removed paragraphs and line breaks (issue <a href="http://wordpress.org/support/topic/473880" rel="nofollow">473880</a>)
|
43 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 1.2.1 =
|
52 |
+
* Fixed whitespace from being stripped in HTML mode
|
53 |
+
|
54 |
= 1.2 =
|
55 |
* Fixed issue where toggling between rich text and HTML editors removed paragraphs and line breaks (issue <a href="http://wordpress.org/support/topic/473880" rel="nofollow">473880</a>)
|
56 |
|
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.2
|
8 |
Author URI: http://www.katzwebservices.com
|
9 |
*/
|
10 |
/*
|
@@ -43,18 +43,18 @@ function kws_rich_text_tags() {
|
|
43 |
$GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit' //(!isset($_REQUEST['action']) || $_REQUEST['action'] == 'edit')
|
44 |
) {
|
45 |
if(!user_can_richedit()) { return; }
|
46 |
-
add_filter( 'tiny_mce_before_init', 'kws_rt_remove_filter');
|
47 |
|
48 |
wp_enqueue_script('post');
|
49 |
-
//if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) return;
|
50 |
if(floatval($GLOBALS['wp_version']) >= 2.7) {
|
51 |
-
// wp_enqueue_script('tiny_mce');
|
52 |
wp_enqueue_script('jquery');
|
53 |
wp_enqueue_script('thickbox');
|
54 |
add_action('admin_head','wp_tiny_mce');
|
55 |
} else {
|
56 |
wp_enqueue_script('tiny_mce');
|
57 |
}
|
|
|
|
|
|
|
58 |
wp_enqueue_script('media');
|
59 |
wp_enqueue_script('media-upload');
|
60 |
wp_enqueue_script('swfupload-all');
|
@@ -63,14 +63,14 @@ function kws_rich_text_tags() {
|
|
63 |
add_action('init','kws_rt_taxonomy_load_mce');
|
64 |
add_action('wp_print_scripts','kws_rt_taxonomy_scripts');
|
65 |
}
|
|
|
66 |
if($GLOBALS['pagenow'] == 'edit-tags.php' && $_REQUEST['action'] == 'edit') {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
// add_action( 'media_buttons', 'media_buttons' );
|
74 |
}
|
75 |
|
76 |
add_action('init', 'kws_rt_remove_filter');
|
@@ -89,19 +89,10 @@ function kws_rich_text_tags() {
|
|
89 |
}
|
90 |
function kws_rt_taxonomy_scripts() {
|
91 |
global $pagenow;
|
92 |
-
$array = array();
|
93 |
if( $pagenow == 'edit-tags.php' && $_REQUEST['action'] == 'edit' ||
|
94 |
$pagenow == 'categories.php' && $_REQUEST['action'] == 'edit') {
|
95 |
-
|
96 |
-
$array['editor_selector'] = 'description';
|
97 |
-
} else {
|
98 |
-
$array['editor_selector'] = 'category_description';
|
99 |
-
}
|
100 |
-
}
|
101 |
-
if(function_exists('wp_tiny_mce')) {
|
102 |
-
wp_tiny_mce(false, $array);
|
103 |
}
|
104 |
-
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";
|
105 |
}
|
106 |
|
107 |
// PROCESS FIELDS
|
@@ -151,6 +142,21 @@ EOF;
|
|
151 |
remove_filter( 'pre_term_description', 'wp_filter_kses' );
|
152 |
remove_filter( 'term_description', 'wp_kses_data' );
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
function kws_rt_remove_filter($array) {
|
155 |
global $pagenow;
|
156 |
if (( is_admin() || defined('DOING_AJAX') ) && current_user_can('manage_categories')) {
|
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.2.1
|
8 |
Author URI: http://www.katzwebservices.com
|
9 |
*/
|
10 |
/*
|
43 |
$GLOBALS['pagenow'] == 'categories.php' && $_REQUEST['action'] == 'edit' //(!isset($_REQUEST['action']) || $_REQUEST['action'] == 'edit')
|
44 |
) {
|
45 |
if(!user_can_richedit()) { return; }
|
|
|
46 |
|
47 |
wp_enqueue_script('post');
|
|
|
48 |
if(floatval($GLOBALS['wp_version']) >= 2.7) {
|
|
|
49 |
wp_enqueue_script('jquery');
|
50 |
wp_enqueue_script('thickbox');
|
51 |
add_action('admin_head','wp_tiny_mce');
|
52 |
} else {
|
53 |
wp_enqueue_script('tiny_mce');
|
54 |
}
|
55 |
+
wp_enqueue_script('quicktags');
|
56 |
+
add_filter( 'tiny_mce_before_init', 'kws_rt_remove_filter');
|
57 |
+
add_filter( 'tiny_mce_before_init', 'kws_rt_tinymce_settings');
|
58 |
wp_enqueue_script('media');
|
59 |
wp_enqueue_script('media-upload');
|
60 |
wp_enqueue_script('swfupload-all');
|
63 |
add_action('init','kws_rt_taxonomy_load_mce');
|
64 |
add_action('wp_print_scripts','kws_rt_taxonomy_scripts');
|
65 |
}
|
66 |
+
|
67 |
if($GLOBALS['pagenow'] == 'edit-tags.php' && $_REQUEST['action'] == 'edit') {
|
68 |
+
if(isset($_REQUEST['taxonomy'])) {
|
69 |
+
add_action(esc_attr($_REQUEST['taxonomy']).'_edit_form_fields', 'kws_show_media_upload');
|
70 |
+
} else {
|
71 |
+
add_action('edit_tag_form_fields','kws_show_media_upload'); // Add link to disable Rich Text
|
72 |
+
add_action('edit_term','kws_rt_taxonomy_save');
|
73 |
+
}
|
|
|
74 |
}
|
75 |
|
76 |
add_action('init', 'kws_rt_remove_filter');
|
89 |
}
|
90 |
function kws_rt_taxonomy_scripts() {
|
91 |
global $pagenow;
|
|
|
92 |
if( $pagenow == 'edit-tags.php' && $_REQUEST['action'] == 'edit' ||
|
93 |
$pagenow == 'categories.php' && $_REQUEST['action'] == 'edit') {
|
94 |
+
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";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
|
|
96 |
}
|
97 |
|
98 |
// PROCESS FIELDS
|
142 |
remove_filter( 'pre_term_description', 'wp_filter_kses' );
|
143 |
remove_filter( 'term_description', 'wp_kses_data' );
|
144 |
|
145 |
+
function kws_rt_tinymce_settings($array = array()) {
|
146 |
+
global $pagenow;
|
147 |
+
if( $pagenow == 'edit-tags.php' && $_REQUEST['action'] == 'edit' ||
|
148 |
+
$pagenow == 'categories.php' && $_REQUEST['action'] == 'edit') {
|
149 |
+
if( $pagenow == 'edit-tags.php' && $_REQUEST['action'] == 'edit' ) {
|
150 |
+
$array['editor_selector'] = 'description';
|
151 |
+
} else {
|
152 |
+
$array['editor_selector'] = 'category_description';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
$array['remove_linebreaks'] = false;
|
156 |
+
$array['apply_source_formatting'] = true;
|
157 |
+
return $array;
|
158 |
+
}
|
159 |
+
|
160 |
function kws_rt_remove_filter($array) {
|
161 |
global $pagenow;
|
162 |
if (( is_admin() || defined('DOING_AJAX') ) && current_user_can('manage_categories')) {
|