本文整理汇总了PHP中theme::options_uri方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::options_uri方法的具体用法?PHP theme::options_uri怎么用?PHP theme::options_uri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme
的用法示例。
在下文中一共展示了theme::options_uri方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_bar_links
/**
* This adds a "Theme Options" link to the WordPress admin bar under the menu
* with the site name. Is only visible to users who can edit theme options.
*
* @param object $wp_admin_bar The wp_admin_bar object as supplied by WordPress
* @return void
*/
public function admin_bar_links($wp_admin_bar)
{
if (current_user_can('edit_theme_options')) {
$wp_admin_bar->add_node(array('id' => 'theme-options', 'parent' => 'site-name', 'title' => 'Theme Options', 'href' => theme::options_uri()));
}
}
示例2:
theme::options_update_data();
?>
<section class="ui tab active" data-tab="first">
<?php
theme::part('content-general', 'content', 'theme-options-general');
?>
</section>
<section class="ui tab" data-tab="second">
<?php
theme::part('content-meta-tags', 'content', 'theme-options-meta-tags');
?>
</section>
<section class="ui tab" data-tab="third">
<?php
theme::part('content-about', 'content', 'theme-options-about');
?>
</section>
<br>
<div class="ui buttons">
<a class="ui button" href="<?php
echo theme::options_uri();
?>
">Cancel</a>
<button type="submit" class="ui positive submit button">Save All</button>
</div>
</form>
</div>