本文整理匯總了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>