A unique ID. This ID will be used to get the value
type
string
checkbox
Type of the field
title
string
Title of the field
default
array|string
Default value from database, if the option doesn’t exist
subtitle
string
Subtitle to display below the title
desc
string
Description to display after the field
help
string
Text to display on right-corer (as hover/popup) of the field
class
string
Extra CSS classes (space separated) to append to the field
before
string
Content to display before the field
after
string
Content to display after the field
dependency
array
Define field visibility depending on other field value.
attributes
array
Extra HTML attributes to append to the field
sanitize
string
Callback funciton for sanitizing value
validate
string
Callback function for validating value
EXTRAS
empty_message
string
Display to empty text if options empty
label
string
The text to display with the checkbox, when use to single checkbox
options
array|string
An array of object containing key/value pairs representing the options or use a predefined options ( pages posts categories tags menus users sidebars roles post_types)
query_args
array
An associative array of query arguments
query_args Arguments
Name
Type
Default
Description
post_type
string
Custom post type name. Default posts
taxonomy
string
Custom taxonomy name
posts_per_page
number
Maximum number of posts to show (Used for Custom Post Types : posts / pages
number
number
Maximum number of posts to show (used for other returns: categories / tags / menus / ex)
orderby
string
post_title
Sort retrieved posts by parameter
order
string
ASC
Designates the ascending or descending order of the orderby parameter
Get more query arguments for (posts, pages: wp_query ) and (categories, tags, menus: wp_term_query)