Raw HTML - Version 1.4.11

Version Description

  • Tested up to WP 3.9-alpha.
  • Fixed a minor conflict with plugins/themes that run custom queries and then manually apply "the_content" filter to post content.
Download this release

Release Info

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

Code changes from version 1.4.10 to 1.4.11

Files changed (3) hide show
  1. include/formatting-override.php +4 -0
  2. raw_html.php +1 -1
  3. readme.txt +17 -11
include/formatting-override.php CHANGED
@@ -9,6 +9,10 @@ require 'screen-options/screen-options.php';
9
  //Apply function $func to $content unless it's been disabled for the current post
10
  function maybe_use_filter($func, $content){
11
  global $post;
 
 
 
 
12
  $settings = rawhtml_get_post_settings($post->ID);
13
  if ( $settings['disable_' . $func] ) {
14
  return $content;
9
  //Apply function $func to $content unless it's been disabled for the current post
10
  function maybe_use_filter($func, $content){
11
  global $post;
12
+ if ( !isset($post) ) {
13
+ return $func($content);
14
+ }
15
+
16
  $settings = rawhtml_get_post_settings($post->ID);
17
  if ( $settings['disable_' . $func] ) {
18
  return $content;
raw_html.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Raw HTML
4
  Plugin URI: http://w-shadow.com/blog/2007/12/13/raw-html-in-wordpress/
5
  Description: Lets you enter any HTML/JS/CSS in your posts without WP changing it, as well as disable automatic formatting on a per-post basis. <strong>Usage:</strong> Wrap your code in [raw]...[/raw] tags. To avoid problems, only edit posts that contain raw code in HTML mode. <strong><a href="http://rawhtmlpro.com/?utm_source=RawHTML%20free&utm_medium=plugin_description&utm_campaign=Plugins">Upgrade to Pro</a></strong> to be able to use Visual editor on the same posts without it messing up the code.
6
- Version: 1.4.10
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/
9
  */
3
  Plugin Name: Raw HTML
4
  Plugin URI: http://w-shadow.com/blog/2007/12/13/raw-html-in-wordpress/
5
  Description: Lets you enter any HTML/JS/CSS in your posts without WP changing it, as well as disable automatic formatting on a per-post basis. <strong>Usage:</strong> Wrap your code in [raw]...[/raw] tags. To avoid problems, only edit posts that contain raw code in HTML mode. <strong><a href="http://rawhtmlpro.com/?utm_source=RawHTML%20free&utm_medium=plugin_description&utm_campaign=Plugins">Upgrade to Pro</a></strong> to be able to use Visual editor on the same posts without it messing up the code.
6
+ Version: 1.4.11
7
  Author: Janis Elsts
8
  Author URI: http://w-shadow.com/
9
  */
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: whiteshadow
3
  Tags: posts, formatting, javascript, html, css, code, disable
4
  Requires at least: 2.8
5
- Tested up to: 3.6-beta2
6
- Stable tag: 1.4.10
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
 
@@ -15,32 +15,32 @@ Lets you disable automatic formatting like smart quotes and automatic paragraph
15
 
16
  With this plugin, you can wrap any part of your post in [raw]...[/raw] tags to prevent WordPress from converting newlines to HTML paragraphs, replacing apostrophes with typographic quotes and so on. This is very useful if you need to add a CSS block or JavaScript to your post.
17
 
18
- RawHTML will also add new checkboxes to the "Edit Post" screen that let you disable certain WP filters on a per-post basis. This way you can :
19
 
20
  * Disable wptexturize (the function that creates smart quotes and other typographic characters).
21
  * Disable automatic paragraph creation.
22
  * Disable image smilies.
23
  * Disable convert_chars (the function that converts ampersands to HTML entities and "fixes" some Unicode characters).
24
 
25
- The free version only supports the HTML editor. [Get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free) if you want to be able to switch between HTML and the Visual editor without WordPress messing up your content.
26
 
27
  **Usage**
28
 
29
- To prevent a part of your post or page from being filtered by WordPress, switch to the HTML editor and wrap it in `[raw]...[/raw]` or `<!--raw-->...<!--/raw-->` tags. These two versions work exactly the same, except that the latter won't be visible to your visitors even if you deactivate Raw HTML.
30
 
31
  *Example :*
32
 
33
- `<!--raw-->
34
  This
35
 
36
  is
37
 
38
  a "test"!
39
- <!--/raw-->`
40
 
41
  In this case, the tags will prevent WordPress from inserting paragraph breaks between "This", "is" and "a "test"", as well as ensure that the double quotes arround "test" are not converted to typographic (curly) quotes.
42
 
43
- To avoid problems, only edit posts that contain your custom code in HTML mode. If you'd like to be able to also use the Visual editor, [get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free). It will make the code betwen [raw] tags appear as a read-only placeholder when viewed in Visual mode, ensuring WordPress doesn't change it.
44
 
45
  **Notes**
46
 
@@ -51,15 +51,17 @@ Some features of Raw HTML will only work for users who have the "unfiltered_html
51
  To install the plugin follow these steps :
52
 
53
  1. Download the raw-html.zip file to your local machine.
54
- 1. Unzip the file.
55
- 1. Upload the "raw-html" folder to your "/wp-content/plugins/" directory.
56
  1. Activate the plugin through the 'Plugins' menu in WordPress
57
 
 
 
58
  == Frequently Asked Questions ==
59
 
60
  = What's the difference between the free version and the Pro version? =
61
 
62
- If you're using the free version, switching from HTML to the Visual editor can still mess up your code. The [Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free) fixes this.
63
 
64
  The way it works is that it replaces `[raw]...[/raw]` code with read-only placeholders when viewed via the Visual editor, and restores the original code when you switch to HTML or when the post is displayed your readers. This allows you to switch between HTML and Visual modes without worrying your content will get mangled by WP.
65
 
@@ -70,6 +72,10 @@ Open to the post editor and click the "Screen Options" button in the top-right p
70
 
71
  == Changelog ==
72
 
 
 
 
 
73
  = 1.4.10 =
74
  * Fixed a rare bug where all [raw]...[/raw] blocks in a post would be replaced with the content of the first block.
75
 
2
  Contributors: whiteshadow
3
  Tags: posts, formatting, javascript, html, css, code, disable
4
  Requires at least: 2.8
5
+ Tested up to: 3.9-alpha
6
+ Stable tag: 1.4.11
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
 
15
 
16
  With this plugin, you can wrap any part of your post in [raw]...[/raw] tags to prevent WordPress from converting newlines to HTML paragraphs, replacing apostrophes with typographic quotes and so on. This is very useful if you need to add a CSS block or JavaScript to your post.
17
 
18
+ RawHTML will also add new checkboxes to the "Edit Post" screen that let you disable certain WP filters on a per-post basis. This way you can:
19
 
20
  * Disable wptexturize (the function that creates smart quotes and other typographic characters).
21
  * Disable automatic paragraph creation.
22
  * Disable image smilies.
23
  * Disable convert_chars (the function that converts ampersands to HTML entities and "fixes" some Unicode characters).
24
 
25
+ The free version only supports editing posts in the Text tab (called "HTML" in older WordPress versions). [Get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free) if you want to be able to switch between Text and the Visual editor without WordPress messing up your content.
26
 
27
  **Usage**
28
 
29
+ To prevent a part of your post or page from being filtered by WordPress, switch to the Text/HTML editor and wrap it in `[raw]...[/raw]` or `<!--raw-->...<!--/raw-->` tags. These two versions work exactly the same, except that the latter won't be visible to your visitors even if you deactivate Raw HTML.
30
 
31
  *Example :*
32
 
33
+ `[raw]
34
  This
35
 
36
  is
37
 
38
  a "test"!
39
+ [/raw]`
40
 
41
  In this case, the tags will prevent WordPress from inserting paragraph breaks between "This", "is" and "a "test"", as well as ensure that the double quotes arround "test" are not converted to typographic (curly) quotes.
42
 
43
+ To avoid problems, only edit posts that contain your custom code in Text/HTML mode. If you'd like to be able to also use the Visual editor, [get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free). It will make the code betwen [raw] tags appear as a read-only placeholder when viewed in Visual mode, ensuring WordPress doesn't change it.
44
 
45
  **Notes**
46
 
51
  To install the plugin follow these steps :
52
 
53
  1. Download the raw-html.zip file to your local machine.
54
+ 1. Go to 'Plugins -> Add New -> Upload'.
55
+ 1. Upload the zip file using the provided form.
56
  1. Activate the plugin through the 'Plugins' menu in WordPress
57
 
58
+ Alternatively, you can search for "Raw HTML" in 'Plugins -> Add New -> Search' and install it from there, or unzip raw-html.zip and upload the `raw-html` directory to your `/wp-content/plugins` directory.
59
+
60
  == Frequently Asked Questions ==
61
 
62
  = What's the difference between the free version and the Pro version? =
63
 
64
+ If you're using the free version, switching from Text/HTML to the Visual editor can still mess up your code. The [Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free) fixes this.
65
 
66
  The way it works is that it replaces `[raw]...[/raw]` code with read-only placeholders when viewed via the Visual editor, and restores the original code when you switch to HTML or when the post is displayed your readers. This allows you to switch between HTML and Visual modes without worrying your content will get mangled by WP.
67
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.4.11 =
76
+ * Tested up to WP 3.9-alpha.
77
+ * Fixed a minor conflict with plugins/themes that run custom queries and then manually apply "the_content" filter to post content.
78
+
79
  = 1.4.10 =
80
  * Fixed a rare bug where all [raw]...[/raw] blocks in a post would be replaced with the content of the first block.
81