Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.326.913 Times

PHP Shortcode 1.3

  Date Added: May 26, 2013  |  Visits: 1.143

PHP Shortcode

Report Broken Link
Printer Friendly Version


Product Homepage
Download (48 downloads)



Based on kukukuan's Inline PHP, this plugin allows you to embed and run PHP code in posts, pages or widgets* with a WordPress shortcode.(* Requires a shortcode enabled widget plugin, such as Section Widget.)UsageThe plugin provides two pairs of shortcodes - [php]code[/php] and [echo]code[/echo]. these two pairs of shortcodes resembles the functionality of the and tags in a normal PHP script, respectively.For example:The answer to the ultimate math challenge, 1+2, is...[php] $a = 1; $b = 2; echo $a + $b;[/php]Will become:The answer to the ultimate math challenge, 1+2, is...3The [echo] tag will automatically print the returned value of the first expression. Therefore, [echo]some_function()[/echo] is essentially equivalent to [php]echo some_function()[/php].Some Important Notes** This plugin will change the priority of the do_shortcode filter. If you are experiencing any conflict with other shortcode plugins, please disable the plugin and report the problem in the forums. **Although I said the shortcode pairs resembles a tag pair, there is an important difference. The PHP code in the shortcodes are executed in a "throw-away" local namespace, instead of the global one. All variables defined in a [php] code [/php] block cannot be accessed outside the block. Therefore, this will not work:[php] $a = 1; $b = 2;[/php]The answer to the ultimate math challenge, 1+2, is... [echo]$a+$b[/echo]And neither would this:[php] $my_array = array('apple','orange'); foreach($my_array as $fruit):[/php]I like [echo]$fruit[/echo][php]endforeach;[/php]To work around the first problem, you may use the global keyword:[php] global $a, $b; $a = 1; $b = 2;[/php]The answer to the ultimate math challenge, 1+2, is... [php]global $a, $b; echo $a+$b[/php]And to work around the second problem, you may use "real" PHP closing tags within your [php] code [/php] block to switch between PHP and HTML mode:[php] $my_array = array('apple','orange'); foreach($my_array as $fruit):?>I like

Requirements: No special requirements
Platforms: PHP
Keyword: Answer Array Block Challenge Foreachmy Array Fphp Global Ltemgtultimateltemgt Pairs Php Php Shortcode Php Shortcode Scripts Phpthe Plugin Problem Resembles Scripts Shortcode Shortcode Scripts Shortcodes
Users rating: 0/10

License: Freeware Size: 10 KB
USER REVIEWS
More Reviews or Write Review


PHP SHORTCODE RELATED
Development Editors  -  PyGMO 1.0.0 PreAlpha
PyGMO is developed in order to offer a user-friendly access to a wide array of global and local optimization algorithms and problems. Basically, PyGMO is a C++ / Python platform to easily perform parallel computations of optimization tasks...
 
Development Tools  -  loccache 1.0
extension for PHP, which uses persistent global arrays of PHP-process to store data.
 
Games  -  GameHouse Solitaire Challenge for Mac OS 1.0
Take a break today with this fantastic collection of solitaire games featuring an original twist! Choose from ten of your favorite solitaire variations including Klondike, Tri-Peaks, Pyramid, and Spider! Play a relaxing game of card-matching, or...
18.4 MB  
Modules  -  Block Top Spammers 0.5
Block Top Spammers displays a list of your top spammers' IP addresses, based on all comments in your database that are marked as spam. It also generates a blacklist for your .htaccess file to block those spammers from your website entirely, thus...
20.48 KB  
Modules  -  Post Block 6.x-2.1
The Post Block module allows you to create blocks that display a list of links to the various content types on your site. The benefit of using Post Block is that you can specify exactly which content types are listed.Post Block also gives you the...
10 KB  
Libraries  -  JSignal 0.2
JSignal is a loose port of the signal system implemented by GTKs GLib. JSignal project uses signals and handlers to allow for the registration of callback functions to events. To use JSignal those classes which will emit signals (cause events)...
28.67 KB  
Modules  -  WPMU Global Search 2.1
Easily search through all blogs into your WordPress MU posts by post title, post content or post author. WPMU Global Search can manage multiple search forms. Currently in the following languages: * English * Spanish (es_ES)If you have created your...
10 KB  
Modules  -  WP Global Screen Options 0.2
This plugin let's you set global "Screen Options" for all users in the Dashboard and when adding/editing Posts and Pages. Sets screen options for all users, current and new ones. Option to hide "Screen Options" tab on the Posts and Page pages in...
10 KB  
Education  -  FreeMat for Mac OS X 4.0
FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks, and IDL from Research Systems, but is Open Source. FreeMat is available under...
41.9 MB  
Education  -  FreeMat for Windows 4.0
FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks, and IDL from Research Systems, but is Open Source. FreeMat is available under...
17.9 MB  
NEW DOWNLOADS IN SCRIPTS, NETWORKING
Scripts  -  Free Ecommerce website creator 1.2
Free Ecommerce website creator is a free PHP shop creating script. This allows you to put a online shop on your own website. Create your own free ecommerce website for Your Business. Create an online shop using easyGUI online shop creator. The...
1.44 KB  
Scripts  -  MochiGames PHP Script ZDR 1.00
MochiGames PHP Script ZDR is web site, ready for use, for flash games. These flash games are downloaded automatically by "MochiGames PHP Script ZDR" from MochiGames media. The use of the games is free, you can use your own Mochi Publisher ID and...
368.54 KB  
Scripts  -  Php Chat 2.0
Add a free php site, single sign-on and multiple skins, 100% free 1. Server Modes: The chat server has paid mode and free mode. If the free chat mode, a free chat room will be assigned to your website with your domain as the room name. 2....
938.87 KB  
Scripts  -  Nibbleblog 3.0.1
Nibbleblog it's a powerful engine for creation and manipulation of BLOG's completely free. Very simple to install and configure (Only 1 step). The database used is based on XML files and this way it is not necessary to use MySQL or similar DBMS....
371.09 KB  
Scripts  -  PHP File Manager | CloudOsys 2.9b8
CloudOsys is a PHP file manager, a tool that allows your visitors upload files such as media content directly to your website. Your visitors will upload files directly to your website, where they can share and comment on them. Through cloud...
1.41 MB  
Networking  -  Shortcode Autolink 0.1
Lets you create links automatically on the basis of internal research results, and everything through Shortcode !Installation : 1. Upload the plugin folder to your /wp-content/plugins/ folder. 2. Go to the Plugins page and activate the plugin. 3....
10 KB  
Networking  -  Pixel Sitemap 1.0.0
Pixel Sitemap Plugin allows with the use of widget to display in sidebar links on the posts in compact way, namely as a rows of 1 pixel pictures.The main features are: * Support cache for links * Display links in random order or by date * Easy...
10 KB  
Networking  -  Contexture Page Security 0.7.1
Contexture Page Security adds some much-needed "page security" to WordPress, allowing admins to limit or restrict access to individual pages or entire sections of their website. To do this, admins create "groups" of users that can be added to...
10 KB  
Networking  -  Vertical scroll recent post 8.0
This will scroll the recent post title in site side bar or any desired template location.In version 4.0 three new option added. 1. Categories selection. 2. select display Orderbys. 3. select display orderFeature * User can see the newest post at...
10 KB  
Networking  -  Wp-o-Matic-Authors 1.0
"Wp-o-matic-Authors" is an add-on to Wp-o-Matic. It automatically creates a new author for each campaign (even if already fetched). Then, each post imported by Wp-o-Matic will have as author the name given by this plugin instead of a name already...
10 KB