Raw HTML - Version 1.2.5

Version Description

  • Fixed a conflict with the Intypo plugin
Download this release

Release Info

Developer whiteshadow
Plugin Icon wp plugin Raw HTML
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

Files changed (2) hide show
  1. raw_html.php +27 -20
  2. readme.txt +8 -5
raw_html.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Raw HTML capability
4
  Plugin URI: http://w-shadow.com/blog/2007/12/13/raw-html-in-wordpress/
5
  Description: Lets you enter raw HTML in your posts. You can also enable/disable smart quotes and other automatic formatting on a per-post basis.
6
- Version: 1.2.4
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
@@ -114,25 +114,32 @@ function maybe_convert_smilies($content){
114
  return maybe_use_filter('convert_smilies', $content);
115
  }
116
 
117
- // disable default filters
118
- remove_filter('the_content', 'wpautop');
119
- remove_filter('the_content', 'wptexturize');
120
- remove_filter('the_content', 'convert_chars');
121
- remove_filter('the_content', 'convert_smilies');
122
- remove_filter('the_excerpt', 'wpautop');
123
- remove_filter('the_excerpt', 'wptexturize');
124
- remove_filter('the_excerpt', 'convert_chars');
125
- remove_filter('the_excerpt', 'convert_smilies');
126
-
127
- // add our conditional filters
128
- add_filter('the_content', 'maybe_wptexturize', 3);
129
- add_filter('the_content', 'maybe_wpautop', 3);
130
- add_filter('the_content', 'maybe_convert_chars', 3);
131
- add_filter('the_content', 'maybe_convert_smilies', 3);
132
- add_filter('the_excerpt', 'maybe_wptexturize', 3);
133
- add_filter('the_excerpt', 'maybe_wpautop', 3);
134
- add_filter('the_excerpt', 'maybe_convert_chars', 3);
135
- add_filter('the_excerpt', 'maybe_convert_smilies', 3);
 
 
 
 
 
 
 
136
 
137
  // Add a custom meta box for per-post settings
138
  add_action('admin_menu', 'rawhtml_add_custom_box');
3
  Plugin Name: Raw HTML capability
4
  Plugin URI: http://w-shadow.com/blog/2007/12/13/raw-html-in-wordpress/
5
  Description: Lets you enter raw HTML in your posts. You can also enable/disable smart quotes and other automatic formatting on a per-post basis.
6
+ Version: 1.2.5
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/blog/
9
  */
114
  return maybe_use_filter('convert_smilies', $content);
115
  }
116
 
117
+ // Disable default filters and add our conditional filters
118
+ function rawhtml_add_conditional_filters(){
119
+ $filters = array(
120
+ 'the_content' => array(
121
+ 'wpautop',
122
+ 'wptexturize',
123
+ 'convert_chars',
124
+ 'convert_smilies',
125
+ ),
126
+ 'the_excerpt' => array(
127
+ 'wpautop',
128
+ 'wptexturize',
129
+ 'convert_chars',
130
+ 'convert_smilies',
131
+ ),
132
+ );
133
+
134
+ foreach ( $filters as $tag => $functions ){
135
+ foreach ( $functions as $func ){
136
+ if ( remove_filter($tag, $func) ){
137
+ add_filter( $tag, 'maybe_'.$func, 3 );
138
+ };
139
+ }
140
+ }
141
+ }
142
+ add_action('init', 'rawhtml_add_conditional_filters');
143
 
144
  // Add a custom meta box for per-post settings
145
  add_action('admin_menu', 'rawhtml_add_custom_box');
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: whiteshadow
3
  Tags: posts, formatting, javascript, html, css, code
4
  Requires at least: 2.2
5
- Tested up to: 2.8.4
6
- Stable tag: 1.2.4
7
 
8
  Lets you use raw HTML or any other code in your posts. You can also disable smart quotes and other automatic formatting on a per-post basis.
9
 
@@ -23,6 +23,7 @@ RawHTML will also add some new checkboxes to the "Edit" screen that will let you
23
  To prevent a part of your post or page from being filtered by WordPress, wrap it in `<!--start_raw-->...<!--end_raw-->` or `[RAW]...[/RAW]` tags. These two versions work exactly the same, but the latter may be handy if you're using the visual editor (not recommended).
24
 
25
  *Example :*
 
26
  `<!--start_raw-->
27
  This
28
 
@@ -47,14 +48,17 @@ To install the plugin follow these steps :
47
 
48
  == Changelog ==
49
 
 
 
 
50
  = 1.2.4 =
51
- * *There are no release notes for this version*
52
 
53
  = 1.2.3 =
54
  * Fix a problem where very long posts would be displayed as blank. This was caused by a regexp input size limitation/bug in newer versions of PHP.
55
 
56
  = 1.2.2 =
57
- * Fix a glitch when one [RAW][/RAW] block is immediately followed by another (cause : greedy regexp).
58
 
59
  = 1.2.1 =
60
  * Change filter priorities *again* to make it compatible with Exec-PHP (hopefully).
@@ -80,4 +84,3 @@ To install the plugin follow these steps :
80
  = 1.0.2 =
81
  * *There are no release notes for this version*
82
 
83
-
2
  Contributors: whiteshadow
3
  Tags: posts, formatting, javascript, html, css, code
4
  Requires at least: 2.2
5
+ Tested up to: 3.0
6
+ Stable tag: 1.2.5
7
 
8
  Lets you use raw HTML or any other code in your posts. You can also disable smart quotes and other automatic formatting on a per-post basis.
9
 
23
  To prevent a part of your post or page from being filtered by WordPress, wrap it in `<!--start_raw-->...<!--end_raw-->` or `[RAW]...[/RAW]` tags. These two versions work exactly the same, but the latter may be handy if you're using the visual editor (not recommended).
24
 
25
  *Example :*
26
+
27
  `<!--start_raw-->
28
  This
29
 
48
 
49
  == Changelog ==
50
 
51
+ = 1.2.5 =
52
+ * Fixed a conflict with the Intypo plugin
53
+
54
  = 1.2.4 =
55
+ * Added an autogenerated changelog.
56
 
57
  = 1.2.3 =
58
  * Fix a problem where very long posts would be displayed as blank. This was caused by a regexp input size limitation/bug in newer versions of PHP.
59
 
60
  = 1.2.2 =
61
+ * Fix a glitch when one [RAW]/RAW block is immediately followed by another (cause : greedy regexp).
62
 
63
  = 1.2.1 =
64
  * Change filter priorities *again* to make it compatible with Exec-PHP (hopefully).
84
  = 1.0.2 =
85
  * *There are no release notes for this version*
86