Opened 11 years ago
Closed 8 years ago
#26815 closed enhancement (maybelater)
Add theme_mod to disable Header Text as default
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Customize | Keywords: | needs-patch |
Focuses: | Cc: |
Description
There is no way to disable the header text as default.
A trick would be to do something like this but then there is no default color.
function custom_header_setup() {
add_theme_support( 'custom-header', array(
'default-text-color' => 'blank',
) );
set_theme_mod( $name, $value );
}
add_action( 'after_setup_theme', 'custom_header_setup' );`
I think this would follow up from https://core.trac.wordpress.org/ticket/18887
My idea would be
function display_header_text() {
if ( ! current_theme_supports( 'custom-header', 'header-text' ) )
return false;
$header_text = get_theme_mod( 'header_text', get_theme_support( 'custom-header', 'display-header-text' ) );
return $header_text;
}
Files that would need to be updated.
https://github.com/WordPress/WordPress/blob/master/wp-admin/custom-header.php#L609
https://github.com/WordPress/WordPress/blob/master/wp-includes/theme.php#L991
https://github.com/WordPress/WordPress/blob/master/wp-includes/theme.php#L1407
Change History (5)
This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.
10 years ago
#3
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
Let's see what a patch looks like here, keeping the Customizer in mind.