WP_Theme::offsetExists() WordPress Method
The WP_Theme::offsetExists() method is used to check whether a given offset exists in the theme. This is useful for checking whether a particular setting exists in the theme.
WP_Theme::offsetExists( $offset ) #
Contents
Source
File: wp-includes/class-wp-theme.php
public function offsetExists( $offset ) {
static $keys = array(
'Name',
'Version',
'Status',
'Title',
'Author',
'Author Name',
'Author URI',
'Description',
'Template',
'Stylesheet',
'Template Files',
'Stylesheet Files',
'Template Dir',
'Stylesheet Dir',
'Screenshot',
'Tags',
'Theme Root',
'Theme Root URI',
'Parent Theme',
);
return in_array( $offset, $keys, true );
}
Expand full source codeCollapse full source codeView on TracView on GitHub