—
— p>
Stay up-to-date with the latest by following @kingproplugins on Twitter, @kingproplugins ,
://facebook.com/kingproplugins" rel="nofollow">KingProPlugins on Facebook or King Pro Plugins on Google+
“> Google+上的King Pro插件 p>
—
— p>
Built as a continuation of the blog posts on King Pro Plugins – Building a simple WordPress Plugin
“> King Pro插件–构建一个简单的WordPress插件 p>
Details King Pro creates an easy way to have global values that can be used
Details King Pro 创建了一种简单的方法来拥有可以使用的全局值
site with either via the provided shortcode or
通过提供的简码或
使用
via the PHP functions.
通过PHP函数。
Fields dynamically created by you can have a variety of values such as single textbox plain text value, block textarea plain text value, WYSIWYG content
您动态创建的字段可以具有多种值,例如单个文本框纯文本值,块文本区域纯文本值,所见即所得内容
value, file upload (such as a logo), or a date picker field.
值,文件上传(例如徽标)或日期选择器字段。 p>
—
— p>
If you have any suggestions or would like to see a feature in the plugin, please let me know in the support forum.
如果您有任何建议或希望在插件中看到功能,请在支持论坛中让我知道。 p>
Any issues you are having, I’d also love to know, so again, please let me know using the support forum.
我也很想知道您遇到的任何问题,请再次通过支持论坛让我知道。 p>
—
— p>
Check out the King Pro Plugins range
查看King Pro插件范围 p>
How To Use
使用方法 h3>
Use Shortcodes
使用简码 h4>
Shortcodes can be used in any page or post on your site.
简码可用于您网站上的任何页面或帖子。
By default:
默认情况下:
[dkp k=”your-field-key”]
[dkp k =“您的字段密钥”]
If you would like to display an error if the key is not found:
如果找不到密钥时要显示错误:
[dkp k=”your-field-key” e=true]
[dkp k =“ your-field-key” e = true)
To add this into a template, just use the “do_shortcode” function:
要将其添加到模板中,只需使用“ do_shortcode”函数:
<?php if(function_exists('dkp_func'))echo do_shortcode(“ [dkp k ='your-field-key']”));
?>
?>
Of course, why do that when you have functions you can use:
当然,为什么要在有功能的情况下可以这样做:
<?php the_dkp_field($ field_key,$ error);
?>
?>
This will print the value right there, or if you need to use the variable prior to printing it, use:
这将在此处打印值,或者如果您需要在打印之前使用变量,请使用:
<?php $ value = get_dkp_field($ field_key,$ error);
?>
?> p>
—
— p>
Having Trouble?
有麻烦吗?
Get support either on the support forums here or at @kingproplugins on Twitter, @kingproplugins ,
.com/kingproplugins" rel="nofollow">KingProPlugins on Facebook or King Pro.com / kingproplugins“ rel =” nofollow“> Facebook上的KingProPlugins
或 King Pro Plugins on Google+
Google+上的插件 p>
—
— p>