A few people have asked me to write a VERY simple version of the Exec-PHP plugin for WordPress®. One without some of the extra code, and no need for any admin control panel for this either.
So this PHP execution plugin (ezPHP) is extremely simple. One file, only about 15-20 lines of code. Evaluates PHP tags in Posts (of any kind, including Pages); and also in text widgets.
This plugin can be downloaded from the plugins repository at WordPress.org.
ezPHP Plugin: Description/Usage
Evaluates PHP tags in Posts (of any kind, including Pages); and also in text widgets.
There is only ONE configurable option. You can define this PHP constant inside your /wp-config.php file (optional).
define('EZPHP_EXCLUDED_POST_TYPES', ''); // A comma-delimited list of Post Types to exclude.
For instance, if you don’t want PHP tags evaluated in Posts, only in Pages.
ezPHP is very easy to install (instructions).
- Download ezphp.zip and extract the /ezphp directory.
- Upload the /ezphp folder to your /wp-content/plugins/ directory.
- Activate the plugin through the Plugins menu in WordPress®.
- Use PHP tags in your Posts/Pages/Widgets :-)
v130123 – Initial release.