Allow PHP in Posts and Pages - Version 1.2

Version Description

  • Character Conversion Fixes

=

Download this release

Release Info

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

Code changes from version 1.1 to 1.2

Files changed (2) hide show
  1. README.txt +3 -1
  2. allowphp.php +3 -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.1
8
 
9
  Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages
10
 
@@ -84,6 +84,8 @@ Version: 1.0 <a href='http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-p
84
  * Initial Release
85
  = 1.1 =
86
  * Bug fix for the conversion of the right square bracket
 
 
87
 
88
  == Frequently Asked Questions ==
89
  = What Tags Are Automatically Removed? =
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
 
84
  * Initial Release
85
  = 1.1 =
86
  * Bug fix for the conversion of the right square bracket
87
+ = 1.2 =
88
+ * Character Conversion Fixes
89
 
90
  == Frequently Asked Questions ==
91
  = What Tags Are Automatically Removed? =
allowphp.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Allow PHP in posts and pages
4
- version: 1.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
@@ -21,10 +21,12 @@ function php_handler($args, $content=null){
21
  $content =(htmlspecialchars($content,ENT_QUOTES));
22
  $content = str_replace("&amp;#8217;","'",$content);
23
  $content = str_replace("&amp;#8216;","'",$content);
 
24
  $content = str_replace("&amp;#8220;","\"",$content);
25
  $content = str_replace("&amp;#8221;","\"",$content);
26
  $content = str_replace("&amp;#8243;","\"",$content);
27
  $content = str_replace("&amp;#039;","'",$content);
 
28
  $content = str_replace("&amp;lt;br /&amp;gt;"," ", $content);
29
  $content = htmlspecialchars_decode($content);
30
  $content = str_replace("<br />"," ",$content);
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
21
  $content =(htmlspecialchars($content,ENT_QUOTES));
22
  $content = str_replace("&amp;#8217;","'",$content);
23
  $content = str_replace("&amp;#8216;","'",$content);
24
+ $content = str_replace("&amp;#8242;","'",$content);
25
  $content = str_replace("&amp;#8220;","\"",$content);
26
  $content = str_replace("&amp;#8221;","\"",$content);
27
  $content = str_replace("&amp;#8243;","\"",$content);
28
  $content = str_replace("&amp;#039;","'",$content);
29
+ $content = str_replace("&amp;#038;","&",$content);
30
  $content = str_replace("&amp;lt;br /&amp;gt;"," ", $content);
31
  $content = htmlspecialchars_decode($content);
32
  $content = str_replace("<br />"," ",$content);