| 1 | Index: wp-admin/js/custom-background.dev.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/js/custom-background.dev.js (revision 20323) |
|---|
| 4 | +++ wp-admin/js/custom-background.dev.js (working copy) |
|---|
| 5 | @@ -3,7 +3,7 @@ |
|---|
| 6 | function pickColor(color) { |
|---|
| 7 | farbtastic.setColor(color); |
|---|
| 8 | jQuery('#background-color').val(color); |
|---|
| 9 | - jQuery('#custom-background-image').css('background-color', color); |
|---|
| 10 | + jQuery('#custom-background-image,#link-color-example').css('background-color', color); |
|---|
| 11 | if ( color && color !== '#' ) |
|---|
| 12 | jQuery('#clearcolor').show(); |
|---|
| 13 | else |
|---|
| 14 | Index: wp-admin/css/colors-classic.dev.css |
|---|
| 15 | =================================================================== |
|---|
| 16 | --- wp-admin/css/colors-classic.dev.css (revision 20323) |
|---|
| 17 | +++ wp-admin/css/colors-classic.dev.css (working copy) |
|---|
| 18 | @@ -25,6 +25,7 @@ |
|---|
| 19 | background-color: #fff; |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | +#link-color-example, |
|---|
| 23 | * html input, |
|---|
| 24 | * html .widget { |
|---|
| 25 | border-color: #dfdfdf; |
|---|
| 26 | Index: wp-admin/css/colors-fresh.dev.css |
|---|
| 27 | =================================================================== |
|---|
| 28 | --- wp-admin/css/colors-fresh.dev.css (revision 20323) |
|---|
| 29 | +++ wp-admin/css/colors-fresh.dev.css (working copy) |
|---|
| 30 | @@ -25,6 +25,7 @@ |
|---|
| 31 | background-color: #fff; |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | +#link-color-example, |
|---|
| 35 | textarea, |
|---|
| 36 | input[type="text"], |
|---|
| 37 | input[type="password"], |
|---|
| 38 | Index: wp-admin/css/wp-admin.dev.css |
|---|
| 39 | =================================================================== |
|---|
| 40 | --- wp-admin/css/wp-admin.dev.css (revision 20323) |
|---|
| 41 | +++ wp-admin/css/wp-admin.dev.css (working copy) |
|---|
| 42 | @@ -447,6 +447,7 @@ |
|---|
| 43 | padding: 0; |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | +#link-color-example, |
|---|
| 47 | .widefat, |
|---|
| 48 | div.updated, |
|---|
| 49 | div.error, |
|---|
| 50 | @@ -4323,7 +4324,12 @@ |
|---|
| 51 | margin: 2.5em 0 8px; |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | +#link-color-example { |
|---|
| 55 | + margin: 0 7px 0 3px; |
|---|
| 56 | + padding: 4px 14px; |
|---|
| 57 | +} |
|---|
| 58 | |
|---|
| 59 | + |
|---|
| 60 | /*------------------------------------------------------------------------------ |
|---|
| 61 | 16.1 - Custom Header Screen |
|---|
| 62 | ------------------------------------------------------------------------------*/ |
|---|
| 63 | Index: wp-admin/custom-background.php |
|---|
| 64 | =================================================================== |
|---|
| 65 | --- wp-admin/custom-background.php (revision 20323) |
|---|
| 66 | +++ wp-admin/custom-background.php (working copy) |
|---|
| 67 | @@ -306,7 +306,9 @@ |
|---|
| 68 | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend> |
|---|
| 69 | <?php $show_clear = get_background_color() ? '' : ' style="display:none"'; ?> |
|---|
| 70 | <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" /> |
|---|
| 71 | -<a class="hide-if-no-js" href="#" id="pickcolor"><?php _e('Select a Color'); ?></a> <span<?php echo $show_clear; ?> class="hide-if-no-js" id="clearcolor"> (<a href="#"><?php _e( 'Clear' ); ?></a>)</span> |
|---|
| 72 | +<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a> |
|---|
| 73 | +<input type="button" class="pickcolor button hide-if-no-js" id="pickcolor" value="<?php esc_attr_e( 'Select a Color' ); ?>" /> |
|---|
| 74 | +<span<?php echo $show_clear; ?> class="hide-if-no-js" id="clearcolor"> (<a href="#"><?php _e( 'Clear' ); ?></a>)</span> |
|---|
| 75 | <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> |
|---|
| 76 | </fieldset></td> |
|---|
| 77 | </tr> |
|---|
| 78 | Index: wp-admin/custom-header.php |
|---|
| 79 | =================================================================== |
|---|
| 80 | --- wp-admin/custom-header.php (revision 20323) |
|---|
| 81 | +++ wp-admin/custom-header.php (working copy) |
|---|
| 82 | @@ -339,7 +339,12 @@ |
|---|
| 83 | $('#name').css('color', color); |
|---|
| 84 | $('#desc').css('color', color); |
|---|
| 85 | $('#text-color').val(color); |
|---|
| 86 | + $('#link-color-example').css('background-color', color); |
|---|
| 87 | farbtastic.setColor(color); |
|---|
| 88 | + if ( color && color !== '#' ) |
|---|
| 89 | + jQuery('#clearcolor').show(); |
|---|
| 90 | + else |
|---|
| 91 | + jQuery('#clearcolor').hide(); |
|---|
| 92 | } |
|---|
| 93 | |
|---|
| 94 | function toggle_text() { |
|---|
| 95 | @@ -364,6 +369,11 @@ |
|---|
| 96 | $('#color-picker').show(); |
|---|
| 97 | }); |
|---|
| 98 | |
|---|
| 99 | + jQuery('#clearcolor a').click( function(e) { |
|---|
| 100 | + pickColor(''); |
|---|
| 101 | + e.preventDefault(); |
|---|
| 102 | + }); |
|---|
| 103 | + |
|---|
| 104 | $('#display-header-text').click( toggle_text ); |
|---|
| 105 | |
|---|
| 106 | $('#defaultcolor').click(function() { |
|---|
| 107 | @@ -395,7 +405,7 @@ |
|---|
| 108 | <?php if ( display_header_text() ) { ?> |
|---|
| 109 | pickColor('#<?php echo get_header_textcolor(); ?>'); |
|---|
| 110 | <?php } else { ?> |
|---|
| 111 | - toggle_text(); |
|---|
| 112 | + toggle_text(); |
|---|
| 113 | <?php } ?> |
|---|
| 114 | }); |
|---|
| 115 | })(jQuery); |
|---|
| 116 | @@ -634,7 +644,9 @@ |
|---|
| 117 | <?php else : ?> |
|---|
| 118 | <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ); ?>" /> |
|---|
| 119 | <?php endif; ?> |
|---|
| 120 | - <a href="#" class="hide-if-no-js" id="pickcolor"><?php _e( 'Select a Color' ); ?></a> |
|---|
| 121 | + <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a> |
|---|
| 122 | + <input type="button" class="pickcolor button hide-if-no-js" id="pickcolor" value="<?php esc_attr_e( 'Select a Color' ); ?>" /> |
|---|
| 123 | + <span<?php echo $show_clear; ?> class="hide-if-no-js" id="clearcolor"> (<a href="#"><?php _e( 'Clear' ); ?></a>)</span> |
|---|
| 124 | </p> |
|---|
| 125 | <div id="color-picker" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> |
|---|
| 126 | </td> |
|---|