Rich Text Tags - Version 1.6.1

Version Description

  • Fixed issue with filters stripping tags.
Download this release

Release Info

Developer katzwebdesign
Plugin Icon 128x128 Rich Text Tags
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.5.2 to 1.6.1

Files changed (3) hide show
  1. kws_rt_taxonomy.js +5 -0
  2. readme.txt +16 -1
  3. rich-text-tags.php +56 -28
kws_rt_taxonomy.js CHANGED
@@ -18,6 +18,11 @@ jQuery(document).ready(function($) {
18
  $('.form-field').has('#category-description').remove();
19
  $('.form-field').has('#description').remove();
20
 
 
 
 
 
 
21
  // Make sure you're saving the latest content
22
  $('input#submit').click(function(e) {
23
  kwsTriggerSave();
18
  $('.form-field').has('#category-description').remove();
19
  $('.form-field').has('#description').remove();
20
 
21
+
22
+ var profileTable = $('.user-edit-php .form-table, .profile-php .form-table').not('.rich-text-tags').has('textarea#description');
23
+ profileTable.prev('h3').insertBefore('table.rich-text-tags');
24
+ profileTable.remove();
25
+
26
  // Make sure you're saving the latest content
27
  $('input#submit').click(function(e) {
28
  kwsTriggerSave();
readme.txt CHANGED
@@ -1,7 +1,7 @@
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&currency_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, terms
5
  Requires at least: 3.3
6
  Tested up to: 3.3.1
7
  Stable tag: trunk
@@ -20,6 +20,7 @@ Use the WordPress functions `tag_description()` and `category_description()` in
20
  <h4>Features</h4>
21
  * Edit term descriptions with WordPress's built-in WYSIWYG editor
22
  * Works with custom taxonomies (and custom post types, introduced in WP 3.0)
 
23
 
24
  == Installation ==
25
 
@@ -36,6 +37,13 @@ Thanks, it's by <a href="http://www.flickr.com/photos/laurenmanning/5659535988/"
36
 
37
  == Upgrade Notice ==
38
 
 
 
 
 
 
 
 
39
  = 1.5.2 =
40
  * Plugin now loads later to allow for custom taxonomies
41
 
@@ -80,6 +88,13 @@ Thanks, it's by <a href="http://www.flickr.com/photos/laurenmanning/5659535988/"
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
83
  = 1.5.2 =
84
  * Plugin now loads later to allow for custom taxonomies
85
 
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&currency_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, terms, bio, biography, user, user data, user description
5
  Requires at least: 3.3
6
  Tested up to: 3.3.1
7
  Stable tag: trunk
20
  <h4>Features</h4>
21
  * Edit term descriptions with WordPress's built-in WYSIWYG editor
22
  * Works with custom taxonomies (and custom post types, introduced in WP 3.0)
23
+ * Now supports user biography fields!
24
 
25
  == Installation ==
26
 
37
 
38
  == Upgrade Notice ==
39
 
40
+ = 1.6.1 =
41
+ * Fixed issue with filters stripping tags.
42
+
43
+ = 1.6 =
44
+ * Added support for rich text editing user biography fields!
45
+ * Made load a little later for support of more taxonomies
46
+
47
  = 1.5.2 =
48
  * Plugin now loads later to allow for custom taxonomies
49
 
88
 
89
  == Changelog ==
90
 
91
+ = 1.6.1 =
92
+ * Fixed issue with filters stripping tags.
93
+
94
+ = 1.6 =
95
+ * Added support for rich text editing user biography fields!
96
+ * Made load a little later for support of more taxonomies
97
+
98
  = 1.5.2 =
99
  * Plugin now loads later to allow for custom taxonomies
100
 
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.5.2
8
  Author URI: http://www.katzwebservices.com
9
  */
10
 
@@ -26,7 +26,7 @@ Author URI: http://www.katzwebservices.com
26
  */
27
 
28
 
29
- add_action('init', 'kws_rich_text_tags');
30
  function kws_rich_text_tags() {
31
 
32
  global $wpdb, $user, $current_user, $pagenow, $wp_version;
@@ -36,10 +36,14 @@ function kws_rich_text_tags() {
36
  // ADD EVENTS
37
  if(
38
  $pagenow == 'edit-tags.php' ||
39
- $pagenow == 'categories.php'
 
 
40
  ) {
41
  if(!user_can_richedit()) { return; }
42
-
 
 
43
  $taxonomies = get_taxonomies();
44
 
45
  foreach($taxonomies as $tax) {
@@ -47,11 +51,17 @@ function kws_rich_text_tags() {
47
  add_action($tax.'_add_form_fields', 'kws_add_form');
48
  }
49
 
50
- wp_enqueue_script('kws_rte', plugins_url('kws_rt_taxonomy.js', __FILE__), array('jquery'));
51
-
52
  if($pagenow == 'edit-tags.php' && isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit' && empty($_REQUEST['taxonomy'])) {
53
  add_action('edit_term','kws_rt_taxonomy_save');
54
- }
 
 
 
 
 
 
 
 
55
  }
56
 
57
  // Enable shortcodes in category, taxonomy, tag descriptions
@@ -71,28 +81,47 @@ function kws_rt_taxonomy_save() {
71
  }
72
  }
73
 
74
- function kws_add_form($taxonomy = ''){
 
75
  global $pagenow;
76
 
77
- $content = is_object($taxonomy) && isset($taxonomy->description) ? $taxonomy->description : '';
78
- $content = html_entity_decode($content);
79
-
80
- if( $pagenow == 'edit-tags.php') {
81
- $editor_id = 'tag_description';
82
- $editor_selector = 'description';
83
- } else {
84
- $editor_id = $editor_selector = 'category_description';
85
- }
86
-
87
  $css = '
88
- <style type="text/css">
89
- .wp-editor-container .quicktags-toolbar input.ed_button {
90
- width:auto;
91
- }
92
- .html-active .wp-editor-area { border:0;}
93
- </style>';
94
 
95
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  <tr class="form-field">
97
  <th scope="row" valign="top"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
98
  <td><?php wp_editor($content, $editor_id,
@@ -103,9 +132,8 @@ function kws_add_form($taxonomy = ''){
103
  <span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td>
104
  </tr>
105
  <?php
106
- }
107
-
108
 
 
109
 
 
110
 
111
- ?>
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.6.1
8
  Author URI: http://www.katzwebservices.com
9
  */
10
 
26
  */
27
 
28
 
29
+ add_action('init', 'kws_rich_text_tags', 11);
30
  function kws_rich_text_tags() {
31
 
32
  global $wpdb, $user, $current_user, $pagenow, $wp_version;
36
  // ADD EVENTS
37
  if(
38
  $pagenow == 'edit-tags.php' ||
39
+ $pagenow == 'categories.php' ||
40
+ $pagenow == 'profile.php' ||
41
+ $pagenow == 'user-edit.php'
42
  ) {
43
  if(!user_can_richedit()) { return; }
44
+
45
+ wp_enqueue_script('kws_rte', plugins_url('kws_rt_taxonomy.js', __FILE__), array('jquery'));
46
+
47
  $taxonomies = get_taxonomies();
48
 
49
  foreach($taxonomies as $tax) {
51
  add_action($tax.'_add_form_fields', 'kws_add_form');
52
  }
53
 
 
 
54
  if($pagenow == 'edit-tags.php' && isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit' && empty($_REQUEST['taxonomy'])) {
55
  add_action('edit_term','kws_rt_taxonomy_save');
56
+ }
57
+
58
+ foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' ) as $filter ) {
59
+ remove_filter( $filter, 'wp_filter_kses' );
60
+ }
61
+
62
+ add_action('show_user_profile', 'kws_add_form', 1);
63
+ add_action('edit_user_profile', 'kws_add_form', 1);
64
+ add_action('edit_user_profile_update', 'kws_rt_taxonomy_save');
65
  }
66
 
67
  // Enable shortcodes in category, taxonomy, tag descriptions
81
  }
82
  }
83
 
84
+
85
+ function kws_add_form($object = ''){
86
  global $pagenow;
87
 
 
 
 
 
 
 
 
 
 
 
88
  $css = '
89
+ <style type="text/css">
90
+ .wp-editor-container .quicktags-toolbar input.ed_button {
91
+ width:auto;
92
+ }
93
+ .html-active .wp-editor-area { border:0;}
94
+ </style>';
95
 
96
+ // This is a profile page
97
+ if(is_a($object, 'WP_User')) {
98
+ $content = html_entity_decode(get_user_meta($object->ID, 'description', true));
99
+ $editor_selector = $editor_id = 'description';
100
+ ?>
101
+ <table class="form-table rich-text-tags">
102
+ <tr>
103
+ <th><label for="description"><?php _e('Biographical Info'); ?></label></th>
104
+ <td><?php wp_editor($content, $editor_id,
105
+ array(
106
+ 'textarea_name' => $editor_selector,
107
+ 'editor_css' => $css,
108
+ )); ?><br />
109
+ <span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>
110
+ </tr>
111
+ <?php
112
+ }
113
+ // This is a taxonomy
114
+ else {
115
+ $content = is_object($object) && isset($object->description) ? html_entity_decode($object->description) : '';
116
+
117
+ if( in_array($pagenow, array('edit-tags.php')) ) {
118
+ $editor_id = 'tag_description';
119
+ $editor_selector = 'description';
120
+ } else {
121
+ $editor_id = $editor_selector = 'category_description';
122
+ }
123
+
124
+ ?>
125
  <tr class="form-field">
126
  <th scope="row" valign="top"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
127
  <td><?php wp_editor($content, $editor_id,
132
  <span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td>
133
  </tr>
134
  <?php
 
 
135
 
136
+ }
137
 
138
+ }
139