-
Notifications
You must be signed in to change notification settings - Fork 0
Options
Noah Mason edited this page Oct 22, 2022
·
6 revisions
WP Backstage can create new custom options, theme, and tools pages with deeply integrated custom fields.
-
type
settings | theme | tools
― The type of options page to be rendered. This will determine which menu item in the admin menu to place this page. The page will appear under "Settings" when set to "settings". The page will appear under "Appearance" when set to "theme". The page will appear under "Tools" when set to "tools" and will also render a tool card on the tools archive page. -
title
string
― The page's title. -
menu_title
string
― The page's title in the admin menu. -
description
string
― The page's d.escription. -
show_in_rest
string
― Whether the page's field values should show in the REST API or not. -
sections
array
― The page's sections.-
id
string
― The section's unique ID. -
title
string
― The section's title. -
description
string
― The section's description. -
fields
array
― The section's fields.
-
id
WP_Backstage_Options::add(
'wp_backstage_options',
array(
'type' => 'settings',
'title' => __( 'Test Options', 'wp_backstage_examples' ),
'menu_title' => __( 'Test Options', 'wp_backstage_examples' ),
'description' => __( 'A test custom options page containing all field types.', 'wp_backstage_examples' ),
'show_in_rest' => true,
'sections' => array(
array(
'id' => 'wp_backstage_options_fields',
'title' => __( 'All Fields', 'wp_backstage_examples' ),
'description' => __( 'These extra meta fields control further options. <a href="#">Example Link</a>', 'wp_backstage_examples' ),
'fields' => array(),
),
array(
'id' => 'wp_backstage_options_extras',
'title' => __( 'Extras', 'wp_backstage_examples' ),
'description' => __( 'These extra meta fields control further options. <a href="#">Example Link</a>', 'wp_backstage_examples' ),
'fields' => array(),
),
),
)
);
Create standardized and deployable WordPress objects like post types with meta boxes and custom fields, taxonomy terms with custom fields, options pages with custom fields and widgets with custom fields; and extend existing WordPress objects like pages, posts, attachments, categories, tags, users and nav menu items.
Website | GitHub | Docs | Issues | API Reference
© Copyright 2018-2022 Dreamsicle. All Rights Reserved.