[wp-trac] [WordPress Trac] #26815: Add theme_mod to disable Header Text as default

WordPress Trac noreply at wordpress.org
Sat Jan 11 21:13:18 UTC 2014


#26815: Add theme_mod to disable Header Text as default
----------------------------+-----------------------------
 Reporter:  grapplerulrich  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Themes          |    Version:  3.8
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 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.
 {{{#!php
 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
 {{{#!php
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26815>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list