>
Download This Plugin | |
Download Elegant Themes | |
Name | ezPHP for WordPress |
Version | 150214 |
Author | WebSharks, Inc. (Jason Caldwell) |
Rating | 98 |
Last updated | 2015-02-14 10:51:00 |
Downloads |
5704
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
ezPHP for WordPress plugin added 6 bytes of resources to the Home page and 6 bytes of resources to the sample Post page.
ezPHP for WordPress plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! ezPHP for WordPress plugin ads no tables to your Wordpress blog database.ezPHP brings the power of <?php ?>
tags into WordPress; or you can use [php][/php]
shortcode tags (recommended for the WP Visual Editor; this is generally the best approach). PHP tags can be extremely useful when there is logic that needs to be worked out before certain portions of your content are displayed under certain scenarios. It's also helpful when/if there are portions of your content that need to be more dynamic. Developers might use this to pull external files into WordPress (via include
or require
) making their work easier.
You can define these PHP constants inside your /wp-config.php
file (optional).
<?php
define('EZPHP_INCLUDED_POST_TYPES', '');
// Comma-delimited list of Post Types to include (excluding all others).
define('EZPHP_EXCLUDED_POST_TYPES', '');
// Comma-delimited list of Post Types to exclude (including all others).
For instance, if you want PHP tags evaluated only in Pages; e.g. in the page
type.
<?php
define('EZPHP_INCLUDED_POST_TYPES', 'page');
// Unless included here; all other Post Types will be excluded now.
Or, if you don't want PHP tags evaluated in Posts; e.g. in the post
type.
<?php
define('EZPHP_EXCLUDED_POST_TYPES', 'post');
// Unless excluded here; all other Post Types will be included now.
You can use regular <?php ?>
tags; OR you can use [php][/php]
shortcode tags.
You can use <!php !>
when writing code samples, to avoid having certain PHP tags evaulated. When you write <!php !>
, it is translated into <?php ?>
in the final output; but never executed. Of course, it's ALSO possible to accomplish this with HTML entities; e.g. <?php ?>
.