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

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

Serving Software Downloads in 976 Categories, Downloaded 29.883.630 Times

PHP Shortcode 1.3

  Date Added: May 26, 2013  |  Visits: 565

PHP Shortcode

Report Broken Link
Printer Friendly Version


Product Homepage
Download (19 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
Libraries  -  Array::Compare 1.14
SYNOPSIS use Array::Compare; my $comp1 = Array::Compare->new; $comp->Sep(|); $comp->Skip({3 => 1, 4 => 1}); $comp->WhiteSpace(0); $comp->Case(1); my $comp2 = Array::Compare->new(Sep => |, WhiteSpace => 0, Case => 1, Skip => {3 => 1, 4...
8.19 KB  
Libraries  -  Array::Iterator 0.06
Array::Iterator is a simple class for iterating over Perl arrays. SYNOPSIS use Array::Iterator; # create an iterator with an array my $i = Array::Iterator->new(1 .. 100); # create an iterator with an array reference my $i =...
10.24 KB  
Snippets  -  search array find in array 1.0
search array find in array script searches an array to find a specific value.
 
Communication  -  Convert Time Array to a Datenum Array 1.1
UTC time (universal time convention) is used in ANSI-C standard for defining time. This is measured in seconds since 1970, at the Prime Meridian.The UTC2Datenum_array function takes a M x 1 array of UTC time values and converts it to a M x 1 array...
10 KB  
Development Editors  -  FileIO 6.1
I/O teaching tool that generates sample Java source code to read or write the console, a sequential file, a random access file, a String, an array of characters, an array of bytes, URL, HTTP CGI GET/POST, Socket, resource or Pipe. It shows you how...
1.11 MB  
Lifestyle  -  Baby Center 1.0.0.0
This app contain a lot of videos talk about babycenter. Whatever your question, BabyCenter has the answer! BabyCenter is the Web's #1 global interactive parenting network, and has nurtured more than 100 million parents since 1997. Our purpose is...
3 MB  
Weather  -  Facts of Global Warming 1.0.0.0
Here in this application you can find critical facts of global warming. It is important to know the true facts about global warming. Because it is not a small or localized environmental problem, it is going to require international cooperation...
1024 KB  
Games  -  Confuzzled 1.0.0.0
Tired of memory games that barely challenge you by having to match pairs? Wish there was something a little (or a lot!) more challenging? Well, you're in luck! Salty Cactus is here to save the day with Confuzzled! More than just another...
1024 KB  
Libraries  -  Array::Each::Tutorial 0.02
Array::Each::Tutorial - POD giving various examples how to use Array::Each. SYNOPSIS man Array::Each man Array::Each::Tutorial or perldoc Array::Each perldoc Array::Each::Tutorial Overview This tutorial contains only POD, so dont do...
20.48 KB  
Libraries  -  Tie::Array::RestrictUpdates 0.01
Tie::Array::RestrictUpdates can limit the number of times you change elements in an array. SYNOPSIS use Tie::Array::RestrictUpdates; tie @foo,"Tie::Array::RestrictUpdates",1; # Default limit is 1. # Every element from the array can only be...
3.07 KB  
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