Allow PHP in Posts and Pages - Version 1.2.1

Version Description

Download this release

Release Info

Developer Hit Reach
Plugin Icon wp plugin Allow PHP in Posts and Pages
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2 to 1.2.1

Files changed (2) hide show
  1. README.txt +1 -1
  2. allowphp.php +4 -1
README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
Tags: post, pages, posts, code, php, shortcode,
5
Requires at least: 2.5
6
Tested up to: 3.0.1
7
- Stable tag: 1.2
8
9
Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages
10
4
Tags: post, pages, posts, code, php, shortcode,
5
Requires at least: 2.5
6
Tested up to: 3.0.1
7
+ Stable tag: 1.2.1
8
9
Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages
10
allowphp.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
Plugin Name: Allow PHP in posts and pages
4
- version: 1.2
5
Plugin URI: http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-posts-and-pages/
6
Description: Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages whilst still retaining HTML tags
7
Author: Hit Reach
@@ -11,6 +11,7 @@ add_shortcode('php','php_handler');
11
add_action('admin_menu', 'allow_php_menu');
12
13
function php_handler($args, $content=null){
14
global $is_comment;
15
if($is_comment){return "";}
16
extract( shortcode_atts(array('debug' => 0), $args));
@@ -42,6 +43,8 @@ function php_handler($args, $content=null){
42
$content = str_replace("]",">",$content);
43
$content = str_replace("&#91;",'[',$content);
44
$content = str_replace("&#93;",']',$content);
45
ob_start();
46
eval ($content);
47
if($args['debug'] == 1){
1
<?php
2
/*
3
Plugin Name: Allow PHP in posts and pages
4
+ version: 1.2.1
5
Plugin URI: http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-posts-and-pages/
6
Description: Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages whilst still retaining HTML tags
7
Author: Hit Reach
11
add_action('admin_menu', 'allow_php_menu');
12
13
function php_handler($args, $content=null){
14
+ define("ALLOWPHPVERSION","1.2.1");
15
global $is_comment;
16
if($is_comment){return "";}
17
extract( shortcode_atts(array('debug' => 0), $args));
43
$content = str_replace("]",">",$content);
44
$content = str_replace("&#91;",'[',$content);
45
$content = str_replace("&#93;",']',$content);
46
+ $content = str_replace("&gt;",'>',$content);
47
+ $content = str_replace("&lt;",'<',$content);
48
ob_start();
49
eval ($content);
50
if($args['debug'] == 1){