Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

register_theme_feature()

3 tags 1 category

register_theme_feature() — Registers a theme feature for use in add_theme_support(). This does not indicate that the active theme supports the feature, it only describes the feature’s supported options.

Inputs: $feature (string): The name uniquely identifying the feature. See add_theme_support() for the list of possible values. $args (array): Data used to describe the theme. Field $type (string): The type of data associated with this feature. Valid values are ‘string’, ‘boolean’, ‘integer’, ‘number’, ‘array’, and ‘object’. Defaults to ‘boolean’. Field $variadic (bool): Does this feature utilize the variadic support of add_theme_support(), or are all arguments specified as the second parameter. Must be used with the “array” type. Field $description (string): A short description of the feature. Included in the Themes REST API schema. Intended for developers. Field $show_in_rest (bool|array): Whether this feature should be included in the Themes REST API endpoint. Defaults to not being included.

Returns true|WP_Error: True if the theme feature was successfully registered, a WP_Error object if not.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…