Open hellofromtonya opened 7 years ago
So to be used like this:
<?php
add_filter( 'beans_add_theme_supports', 'my_theme_support');
function my_theme_support( $theme_supports ) {
$theme_supports['title-tag'] = true;
return $theme_supports;
}
In your draft - is the custom-header defined right now? Why should that be activated on default?
And the strategy is rather to enable the minimum than enabling the maximum, yes?
@ibes
Not quite.
Theme support will be added for all the items listed in the array.
The keys with the null
value, don't take a configuration. (See the DocBlock explanation)
If you don't want to include a theme support, you have to either unset
it or use your own config array.
There are various features and components within the framework that loaded or registered as default. For these, hooking them into a filter event allows child themes or plugins to configure what is needed for the specific web page.
For Example - Theme Supports
For example, Beans registers a set of default theme support features. Moving those into a configurable filter does the following:
remove_theme_support
.Sample Code