【发布时间】:2012-02-19 12:27:03
【问题描述】:
我相信这对你们来说一定很容易,但我很难将我的主题选项值放入变量之一。
在下面的代码中,我必须使用“”作为值,并且我允许用户从 wordpress 主题选项面板插入该值。我不知道如何设置,所以我可以在这个变量中获取主题选项值。
$rate_size="echo get_option('mp_star_size')",
我试过了
$rate_size="'.echo get_option('mp_star_size').'",
但它给了我语法错误所以不知道我应该使用什么语法。
好吧,这里有更多我想要得到的细节
以下代码:
wp_gdsr_render_article(
$stars_set="",
$stars_size=0,
$stars_set_ie6="",
$echo=true
);
我想让我的主题用户从 wordpress 主题的主题选项面板中选择选项。所以我想用 echo get_option() 设置类似的东西,这样我就可以从选项面板中获取该代码的每个参数的值。
示例:
wp_gdsr_render_article(
$stars_set="here is my theme option",
$stars_size=here is my theme option,
$stars_set_ie6="here is my theme option",
$echo=here is my theme option
);
【问题讨论】: