Make WordPress Core

Opened 10 years ago

Closed 7 years ago

#26815 closed enhancement (maybelater)

Add theme_mod to disable Header Text as default

Reported by: grapplerulrich's profile grapplerulrich Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Customize Keywords: needs-patch
Focuses: Cc:


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

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.

Change History (5)

#1 @nacin
10 years ago

  • Component changed from Themes to Appearance

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.

9 years ago

#3 @celloexpressions
9 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Let's see what a patch looks like here, keeping the Customizer in mind.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.

7 years ago

#5 @melchoyce
7 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Closing per above convo in Slack

Note: See TracTickets for help on using tickets.