Make WordPress Core

Ticket #19616: customheader.diff

File customheader.diff, 2.0 KB (added by tw2113, 11 years ago)

custom-header.php color selecting changes

  • wp-admin/custom-header.php

     
    328328                jQuery('#name').css('color', color);
    329329                jQuery('#desc').css('color', color);
    330330                jQuery('#text-color').val(color);
     331                jQuery('#link-color-example').css('background-color', color);
    331332                farbtastic.setColor(color);
    332333        }
    333334
     
    360361                jQuery('#pickcolor').click(function() {
    361362                        jQuery('#color-picker').show();
    362363                });
     364                jQuery('#link-color-example').click( function(e) {
     365                        jQuery('#color-picker').show();
     366                        e.preventDefault();
     367                });
    363368
    364369                jQuery('input[name="hidetext"]').click(function() {
    365370                        toggle_text(this);
     
    599604        <p>
    600605                <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) ); ?>" />
    601606                <span class="description hide-if-js"><?php _e( 'If you want to hide header text, add <strong>#blank</strong> as text color.' );?></span>
     607                <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
    602608                <input type="button" class="button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color' ); ?>" id="pickcolor" />
    603609        </p>
    604610        <div id="color-picker" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
  • wp-admin/css/wp-admin.dev.css

     
    45214521.appearance_page_custom-header .available-headers label img {
    45224522        vertical-align: middle;
    45234523}
     4524#link-color-example {
     4525        -moz-border-radius: 4px;
     4526        -webkit-border-radius: 4px;
     4527        border-radius: 4px;
     4528        border: 1px solid #dfdfdf;
     4529        margin: 0 7px 0 3px;
     4530        padding: 4px 14px;
     4531}
    45244532
    4525 
    45264533/*------------------------------------------------------------------------------
    45274534  16.2 - Custom Background Screen
    45284535------------------------------------------------------------------------------*/