Changeset 355222
- Timestamp:
- 03/04/2011 02:49:32 PM (15 years ago)
- Location:
- enable-raw-html-disable-corruption/trunk
- Files:
-
- 2 edited
-
enable-raw-html-disable-corruption.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
enable-raw-html-disable-corruption/trunk/enable-raw-html-disable-corruption.php
r348744 r355222 4 4 Plugin URI: http://netaction.de 5 5 Description: Disables filters wpautop, convert_chars and wptexturize 6 Version: 0. 16 Version: 0.2 7 7 Author: Thomas (netAction) Schmidt 8 8 Author URI: http://netaction.de … … 17 17 //remove_filter('the_excerpt', 'wpautop'); 18 18 19 // Enable the filter to execude < ?php echo "Hello!" ? > 20 // add_filter('the_content', 'parse_as_php'); 21 22 function parse_as_php($content) { 23 ob_start(); 24 eval (" ?>".$content."<?php "); 25 if($args['debug'] == 1){ 26 $content =(htmlspecialchars($content,ENT_QUOTES)); 27 echo ("<pre>".$content."</pre>"); 28 } 29 return ob_get_clean(); 30 } 19 31 20 32 ?> -
enable-raw-html-disable-corruption/trunk/readme.txt
r348744 r355222 4 4 Requires at least: 2.0 5 5 Tested up to: 3.1 6 Stable tag: trunk 6 7 7 Every post and page will be raw HTML. Line breaks will not become P elements. Errors in HTML will not be fixed, no correction of Unicode Characters. Quotes, dashes, trademark symbols and so on will stay as they are. 8 9 The plugin is extremely simple and effective. It will only affect pages and posts, but you can edit it. 8 Every post and page will be forwarded directly to the browser without any correction. The plugin is extremely simple and effective. 10 9 11 10 == Description == 11 12 Line breaks will not become P elements. Errors in HTML will not be fixed, no correction of Unicode Characters. Quotes, dashes, trademark symbols and so on will stay as they are. 12 13 13 14 This simple plugin switches all of the filters for your content off. Everything you type will be sent to your visitor's browser. The filters are wp_autop, convert_chars, wptexturize. If you need the same functions not only for posts and pages but also for excerpts or something else, have a look in the source and edit what you need. … … 33 34 With wptexturize you will get some funny things like long dashes, trademark symbols and apostrophes where you wanted to enter usual ASCII characters. Without this function you have to put the right things in the post directly. If you want a dash, use a dash, and you will get a dash. 34 35 36 = When should I enable the filter parse_as_php? = 37 38 If you have PHP code in your posts and trust your authors. 35 39 36 40 == Changelog == … … 39 43 * first version 40 44 45 = 0.2 = 46 * PHP execution 47
Note: See TracChangeset
for help on using the changeset viewer.