[wp-trac] [WordPress Trac] #28042: Logic for custom header default text color is broken

WordPress Trac noreply at wordpress.org
Sun Apr 27 09:56:52 UTC 2014


#28042: Logic for custom header default text color is broken
----------------------------+-------------------------
 Reporter:  ocean90         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  4.0
Component:  Appearance      |    Version:
 Severity:  normal          |   Keywords:  needs-patch
  Focuses:  administration  |
----------------------------+-------------------------
 Have a theme which registers following header support:

 {{{
 add_theme_support( 'custom-header', array(
         'width'       => 500,
         'flex-height' => true,
         'height'      => 500,
 ) );
 }}}

 (Or use Twenty Eleven and remove `'default-text-color' => '000',`.)

 Then go to Appearance > Header. You will see that beside "Text color" is
 nothing (see attached screenshot). Unchecking the checkbox for "Header
 Text" will produce a JS error: `Uncaught TypeError: Cannot read property
 'replace' of undefined` in themes.php?page=custom-header:61.

 The issue is that `current_theme_supports( 'custom-header', 'default-text-
 color' )` returns false.

 My original goal was to just support custom header images and allow to
 show/hide the header text. No color changing. Per default `header-text`
 will be true. `default-text-color` is an empty string. But that seems
 impossible with our API yet.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28042>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list