Linux 软件免费装
Banner图

qstring-parameter

开发者 sakush100
更新时间 2013年11月15日 01:05
PHP版本: 3.0 及以上
WordPress版本: 3.6

标签

address url query string get

下载

详情介绍:

Sometimes wordpress developers need to pass values through PHP’s GET method. For example, you need to pass your name to another page by GET method like http://yoursite.com/some-page/?myname=john&age=23 Now you need to retrieve myname and age variables, but wordpress is designed to ignore such things in URL. You get surprised when you don’t seen anything  with <?php print_r($_GET); ?> Hence, i decided to make a simple plugin that does this functionality. Qstring is a plugin to allow to access get parameters from query string or URL easily.

安装:

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page. == Frequently Asked Questions == Usage Examples <?php // IMPORT GET PARAMETERS IN ARRAY FORMAT $myvar = load_qstrings(); // USING PARAMETER WHEREVER NEEDED echo $myvar['user_id']; // TO DEBUG, USE PRINT_R print_r($myvar); ?> Limitations There are some reserved keywords in wordpress like “name”. These should not be used otherwise wordpress shows “The page you requested could not be found.” OR something similar depending on your theme.

更新日志:

none, initial version