Plugin Directory

Changeset 355222


Ignore:
Timestamp:
03/04/2011 02:49:32 PM (15 years ago)
Author:
netAction
Message:

enable PHP

Location:
enable-raw-html-disable-corruption/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • enable-raw-html-disable-corruption/trunk/enable-raw-html-disable-corruption.php

    r348744 r355222  
    44Plugin URI: http://netaction.de
    55Description: Disables filters wpautop, convert_chars and wptexturize
    6 Version: 0.1
     6Version: 0.2
    77Author: Thomas (netAction) Schmidt
    88Author URI: http://netaction.de
     
    1717//remove_filter('the_excerpt', 'wpautop');
    1818
     19// Enable the filter to execude < ?php echo "Hello!" ? >
     20// add_filter('the_content', 'parse_as_php');
     21
     22function 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}
    1931
    2032?>
  • enable-raw-html-disable-corruption/trunk/readme.txt

    r348744 r355222  
    44Requires at least: 2.0
    55Tested up to: 3.1
     6Stable tag: trunk
    67
    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.
     8Every post and page will be forwarded directly to the browser without any correction. The plugin is extremely simple and effective.
    109
    1110== Description ==
     11
     12Line 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.
    1213
    1314This 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.
     
    3334With 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.
    3435
     36= When should I enable the filter parse_as_php? =
     37
     38If you have PHP code in your posts and trust your authors.
    3539
    3640== Changelog ==
     
    3943* first version
    4044
     45= 0.2 =
     46* PHP execution
     47
Note: See TracChangeset for help on using the changeset viewer.