WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

PHP Execution

The PHP Execution plugin allows embedding php code inside of posts and pages.

Editing PHP code

  • php code can be edited in the html view of the editor.
  • php code is embedded into a post in the same way as you are used to: a php block begins with ''. The short open tag, i.e. '') somewhere inside a string in your php code block. If you do so, this ending delimeter will be matched and your code will inevitably break apart. So donít write e.g.:
    some text
    <?php $test = "hello ?>"  ?>
    more text
  • Writing '$test = "hello ?&gt;"' instead will not lead to any problems.
  • Php code is not executed in the global scope. If you need to gain access to variables in the global scope you need to "import" them first with 'global $var1, $var2;'.
  • This plugin does not evaluate every single code snippet, but the content of the post as a whole. So the following lines wonít result in errors:
    <?php if ($test==true) { ?>
    The test was successful.
    <?php } else { ?>
    The test failed.
    <?php } ?>
  • When switching between html and visual view the php code is not altered in any case. All html tags, whitespaces etc. in your code are preserved.

Requires: 2.5 or higher
Compatible up to: 2.8.3
Last Updated: 2009-5-14
Downloads: 50,517

Ratings

4 stars
4.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
100,2,2
75,4,3
100,4,4
92,12,11
100,2,2
100,7,7
100,2,2
100,2,2
100,2,2
100,4,4
0,1,0
100,2,2
100,1,1
100,1,1
50,4,2
0,1,0
100,2,2
0,1,0
100,2,2
100,1,1
100,1,1