Allow PHP in Posts and Pages - Version 1.2.2

Version Description

Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

Files changed (2) hide show
  1. README.txt +2 -1
  2. allowphp.php +4 -3
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.1
8
 
9
  Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages
10
 
@@ -87,6 +87,7 @@ Version: 1.0 <a href='http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-p
87
  = 1.2 =
88
  * Character Conversion Fixes
89
 
 
90
  == Frequently Asked Questions ==
91
  = What Tags Are Automatically Removed? =
92
  Currently all &lt;br /&gt; and &lt;p&gt; (and its closing counterpart) tags are removed from the input code because these are the tags that Wordpress automatically add.
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.2
8
 
9
  Allow PHP in posts and pages allows you to add php functionality to Wordpress Posts and Pages
10
 
87
  = 1.2 =
88
  * Character Conversion Fixes
89
 
90
+
91
  == Frequently Asked Questions ==
92
  = What Tags Are Automatically Removed? =
93
  Currently all &lt;br /&gt; and &lt;p&gt; (and its closing counterpart) tags are removed from the input code because these are the tags that Wordpress automatically add.
allowphp.php CHANGED
@@ -1,7 +1,7 @@
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,7 +11,7 @@ add_shortcode('php','php_handler');
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));
@@ -27,6 +27,7 @@ function php_handler($args, $content=null){
27
  $content = str_replace("&amp;#8221;","\"",$content);
28
  $content = str_replace("&amp;#8243;","\"",$content);
29
  $content = str_replace("&amp;#039;","'",$content);
 
30
  $content = str_replace("&amp;#038;","&",$content);
31
  $content = str_replace("&amp;lt;br /&amp;gt;"," ", $content);
32
  $content = htmlspecialchars_decode($content);
@@ -64,7 +65,7 @@ function allow_php_options(){
64
  <div style='float:right; display:inline; margin-left:25px; margin-bottom:10px; margin-right:15px; padding:5px; background-color:#ffffcc; border:1px solid #ddddaa;'>
65
  <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Developed by <a href='http://www.hitreach.co.uk' target="_blank" style='text-decoration:none;'>Hit Reach</a></span>
66
  <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Check out our other <a href='http://www.hitreach.co.uk/services/wordpress-plugins/' target="_blank" style='text-decoration:none;'>Wordpress Plugins</a></span>
67
- <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Version: 1.1 <a href='http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-posts-and-pages/' target="_blank" style='text-decoration:none;'>Support, Comments &amp; questions</a></span></div>
68
 
69
  <p>Allow PHP in posts and pages adds the functionality to include PHP in wordpress posts and pages by adding a simple shortcode <span style='color:green'>[php]</span><em>.code.</em><span style='color:green'>[/php]</span></p>
70
  <p>This plugin strips away the automatically generated wordpress &lt;p&gt; and &lt;br/&gt; tags but still allows the addition of your own &lt;p&gt; and &lt;br/&gt; tags
1
  <?php
2
  /*
3
  Plugin Name: Allow PHP in posts and pages
4
+ version: 1.2.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
  add_action('admin_menu', 'allow_php_menu');
12
 
13
  function php_handler($args, $content=null){
14
+ define("ALLOWPHPVERSION","1.2.2");
15
  global $is_comment;
16
  if($is_comment){return "";}
17
  extract( shortcode_atts(array('debug' => 0), $args));
27
  $content = str_replace("&amp;#8221;","\"",$content);
28
  $content = str_replace("&amp;#8243;","\"",$content);
29
  $content = str_replace("&amp;#039;","'",$content);
30
+ $content = str_replace("#039;","'",$content);
31
  $content = str_replace("&amp;#038;","&",$content);
32
  $content = str_replace("&amp;lt;br /&amp;gt;"," ", $content);
33
  $content = htmlspecialchars_decode($content);
65
  <div style='float:right; display:inline; margin-left:25px; margin-bottom:10px; margin-right:15px; padding:5px; background-color:#ffffcc; border:1px solid #ddddaa;'>
66
  <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Developed by <a href='http://www.hitreach.co.uk' target="_blank" style='text-decoration:none;'>Hit Reach</a></span>
67
  <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Check out our other <a href='http://www.hitreach.co.uk/services/wordpress-plugins/' target="_blank" style='text-decoration:none;'>Wordpress Plugins</a></span>
68
+ <span style='font-size:1em; color:#999; display:block; line-height:1.2em;'>Version: 1.2.2 <a href='http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-posts-and-pages/' target="_blank" style='text-decoration:none;'>Support, Comments &amp; questions</a></span></div>
69
 
70
  <p>Allow PHP in posts and pages adds the functionality to include PHP in wordpress posts and pages by adding a simple shortcode <span style='color:green'>[php]</span><em>.code.</em><span style='color:green'>[/php]</span></p>
71
  <p>This plugin strips away the automatically generated wordpress &lt;p&gt; and &lt;br/&gt; tags but still allows the addition of your own &lt;p&gt; and &lt;br/&gt; tags