本文整理汇总了PHP中acf_add_options_page函数的典型用法代码示例。如果您正苦于以下问题:PHP acf_add_options_page函数的具体用法?PHP acf_add_options_page怎么用?PHP acf_add_options_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acf_add_options_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bolt_setup
/**
* Bolt initial setup and constants
*/
function bolt_setup()
{
// Make theme available for translation
// @TODO add correct .pot file n stuff
load_theme_textdomain('bolt', get_template_directory() . '/lang');
// Register wp_nav_menu() menus
// http://codex.wordpress.org/Function_Reference/register_nav_menus
register_nav_menus(array('primary_navigation' => __('Primary Navigation', 'bolt'), 'footer_navigation' => __('Footer Navigation', 'bolt')));
// Add post thumbnails
// http://codex.wordpress.org/Post_Thumbnails
// http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
// http://codex.wordpress.org/Function_Reference/add_image_size
add_theme_support('post-thumbnails');
// Add post formats
// http://codex.wordpress.org/Post_Formats
add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio'));
// Add HTML5 markup for captions
// http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
add_theme_support('html5', array('caption', 'comment-form', 'comment-list'));
// Tell the TinyMCE editor to use a custom stylesheet
// add_editor_style('/assets/css/editor-style.css');
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('page_title' => __('Sticky Info'), 'menu_title' => __('Sticky Info + Contact'), 'menu_slug' => 'site-options', 'capability' => 'edit_posts', 'redirect' => false));
}
}
示例2: plugin_admin_add_page
/**
* Register settings page
*/
function plugin_admin_add_page()
{
acf_add_options_page(array('page_title' => 'Brand', 'menu_title' => get_bloginfo('name'), 'menu_slug' => 'theme-general-settings', 'redirect' => false, 'position' => -1));
acf_add_options_sub_page(array('page_title' => 'SEO (Search Engine Optimization)', 'menu_title' => 'SEO', 'parent_slug' => 'theme-general-settings'));
acf_add_options_sub_page(array('page_title' => 'SDO (Social Discovery Optimization)', 'menu_title' => 'SDO', 'parent_slug' => 'theme-general-settings'));
acf_add_options_sub_page(array('page_title' => 'Third Party API\'S', 'menu_title' => 'API\'s', 'parent_slug' => 'theme-general-settings'));
}
示例3: addSettingsPage
/**
* Adds the settings page for the screensaver functionallity
*/
public function addSettingsPage()
{
$icon = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMjEgMjM0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyMjEgMjM0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMTg3LjYsMTg0Yy02Mi42LDAtMTEzLjQtNTAuOC0xMTMuNC0xMTMuNGMwLTI0LjUsNy44LTQ3LjMsMjEuMS02NS44Yy00OC45LDEyLjYtODUuMSw1Ny04NS4xLDEwOS44DQoJYzAsNjIuNiw1MC44LDExMy40LDExMy40LDExMy40YzM4LjEsMCw3MS44LTE4LjgsOTIuMy00Ny42QzIwNi45LDE4Mi44LDE5Ny40LDE4NCwxODcuNiwxODR6IE01NC43LDYyLjkNCgljLTcuOSwxMS41LTEzLjQsMjQtMTYuNSwzNy42Yy0yLjIsOS40LTE2LjYsNS40LTE0LjUtNGMzLjQtMTQuNyw5LjUtMjguNywxOC00MS4yQzQ3LjIsNDcuNCw2MC4yLDU0LjksNTQuNyw2Mi45eiIvPg0KPHBvbHlnb24gcG9pbnRzPSIxNDUuMyw0OS40IDE1MC40LDY0LjEgMTY1LjIsNjkgMTUwLjQsNzQuMSAxNDUuNSw4OC45IDE0MC41LDc0LjEgMTI1LjcsNjkuMiAxNDAuNCw2NC4yICIvPg0KPHBvbHlnb24gcG9pbnRzPSIxMjUuMywxMDEuNCAxMjguNiwxMTAuOCAxMzguMSwxMTQgMTI4LjYsMTE3LjIgMTI1LjUsMTI2LjcgMTIyLjIsMTE3LjMgMTEyLjcsMTE0LjEgMTIyLjIsMTEwLjkgIi8+DQo8cG9seWdvbiBwb2ludHM9IjEwNi44LDY1LjkgMTEwLjksNzcuOSAxMjMsODIgMTExLDg2LjEgMTA3LDk4LjIgMTAyLjgsODYuMSA5MC43LDgyLjEgMTAyLjgsNzggIi8+DQo8cG9seWdvbiBwb2ludHM9IjEyNS4zLDMxLjQgMTI4LjYsNDAuOCAxMzguMSw0NCAxMjguNiw0Ny4yIDEyNS41LDU2LjcgMTIyLjIsNDcuMyAxMTIuNyw0NC4xIDEyMi4yLDQwLjkgIi8+DQo8L3N2Zz4NCg==';
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('page_title' => 'Skärmsläckare', 'menu_title' => 'Skärmsläckare', 'menu_slug' => 'screensaver', 'capability' => 'edit_posts', 'icon_url' => $icon, 'position' => 30.3, 'redirect' => false));
}
}
示例4: addSettingsPage
/**
* Adds the settings page for the screensaver functionallity
*/
public function addSettingsPage()
{
$icon = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE4LjEuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2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My41NDcsNiwxNCw2LjQ0NiwxNCw2Ljk5N1YxMy4wMDN6Ii8+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg==';
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('page_title' => 'Takeover', 'menu_title' => 'Takeover', 'menu_slug' => 'takeover', 'capability' => 'edit_posts', 'icon_url' => $icon, 'position' => 31.4, 'redirect' => false));
}
}
示例5: yb_add_options_page
function yb_add_options_page()
{
/* create main yb options page */
acf_add_options_page(array('page_title' => 'yb Site Options', 'menu_title' => 'Site Options', 'menu_slug' => 'yb-options', 'capability' => 'edit_posts', 'redirect' => false));
/* create settings sub page */
acf_add_options_sub_page(array('page_title' => 'Miscellaneous', 'menu_title' => 'Miscellaneous', 'parent_slug' => 'yb-options'));
}
示例6: register_admin_pages
/**
* Register all custom admin pages
*/
public function register_admin_pages()
{
add_submenu_page('edit.php?post_type=rules', 'Éditer le Zodiaque', 'Zodiaque', 'manage_options', 'terraarcana_zodiac', array($this, 'render_zodiac_page'));
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('page_title' => 'Réglages de Terra Arcana', 'menu_title' => 'Terra Arcana', 'menu_slug' => 'terra-settings', 'parent_slug' => 'options-general.php'));
}
}
示例7: registerThemeSettingsPages
public function registerThemeSettingsPages()
{
// Register theme options page
if (function_exists('acf_add_options_page')) {
acf_add_options_page(['page_title' => 'Theme General Settings', 'menu_title' => 'Theme General Settings', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => false]);
}
}
示例8: sfy_setup
function sfy_setup()
{
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on sfy, use a find and replace
* to change 'sfy' to the name of your theme in all the template files
*/
load_theme_textdomain('sfy', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support('title-tag');
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support('post-thumbnails');
register_nav_menus(array('top-nav' => __('Primary menu', 'sfy'), 'bottom-nav' => __('Secondary menu', 'sfy')));
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
if (function_exists("acf_add_options_page")) {
acf_add_options_page(array('title' => __('Options', 'sfy'), 'menu_slug' => 'sfy-options'));
}
}
示例9: add_theme_acf_options_page
function add_theme_acf_options_page()
{
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('page_title' => 'Site Settings', 'menu_title' => 'Site Settings', 'menu_slug' => 'site-settings', 'capability' => 'edit_posts', 'redirect' => true));
acf_add_options_sub_page(array('page_title' => 'Above Average Theme Settings', 'menu_title' => 'AA Settings', 'menu_slug' => 'aa-features', 'parent_slug' => 'site-settings'));
acf_add_options_sub_page(array('page_title' => 'The Kicker Theme Settings', 'menu_title' => 'TK Settings', 'menu_slug' => 'tk-features', 'parent_slug' => 'site-settings'));
}
}
示例10: optionsPage
function optionsPage()
{
if (function_exists('acf_add_options_page')) {
acf_add_options_page();
acf_add_options_sub_page(array('page_title' => 'General Settings', 'menu_title' => 'General'));
acf_add_options_sub_page(array('page_title' => 'Contact Settings', 'menu_title' => 'Contact'));
}
}
示例11: acf_add_options_page
function acf_add_options_page()
{
if (function_exists('acf_add_options_page')) {
acf_add_options_page(array('menu_title' => 'Theme Options', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'icon_url' => 'dashicons-welcome-write-blog', 'redirect' => true));
acf_add_options_sub_page(array('page_title' => 'General Settings', 'menu_title' => 'General Settings', 'parent_slug' => 'theme-general-settings'));
acf_add_options_sub_page(array('page_title' => 'Home Settings', 'menu_title' => 'Home Settings', 'parent_slug' => 'theme-general-settings'));
}
}
示例12: init_hooks
private static function init_hooks()
{
self::$initiated = true;
if (class_exists('acf')) {
acf_add_options_page();
}
add_filter('acf/settings/save_json', array(__CLASS__, 'acf_json_save_path'));
}
示例13: add_options_page
public static function add_options_page($params = array())
{
if (!self::exists() || !function_exists('acf_add_options_page')) {
return;
}
$params = array_merge(array('page_title' => __('Options', 'crb'), 'menu_title' => __('Options', 'crb'), 'menu_slug' => 'acf-options', 'capability' => 'edit_posts', 'parent_slug' => '', 'position' => false, 'icon_url' => false, 'redirect' => true), $params);
return acf_add_options_page($params);
}
示例14: add_options_pages
/**
* Add options pages
*
*/
function add_options_pages()
{
if (function_exists('acf_add_options_page')) {
//SITE OPTIONS
acf_add_options_page(array('page_title' => 'About site', 'menu_title' => 'About site', 'menu_slug' => 'theme-options', 'capability' => 'edit_posts', 'redirect' => true));
acf_add_options_sub_page(array('page_title' => 'Contact info', 'menu_title' => 'Contact info', 'parent_slug' => 'theme-options'));
acf_add_options_sub_page(array('page_title' => 'Words', 'menu_title' => 'Words', 'parent_slug' => 'theme-options'));
}
}
示例15: mtm_options_page
function mtm_options_page()
{
if (false !== mtm_acf_check()) {
acf_add_options_page(array('page_title' => 'Theme General Settings', 'menu_title' => 'Theme Settings', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => true));
acf_add_options_sub_page(array('page_title' => 'Theme Header Settings', 'menu_title' => 'Header', 'parent_slug' => 'theme-general-settings'));
acf_add_options_sub_page(array('page_title' => 'Theme Default Settings', 'menu_title' => 'Defaults', 'parent_slug' => 'theme-general-settings'));
acf_add_options_sub_page(array('page_title' => 'Theme Footer Settings', 'menu_title' => 'Footer', 'parent_slug' => 'theme-general-settings'));
}
}