WordPress.org

Make WordPress Core

Changeset 18229


Ignore:
Timestamp:
06/10/11 13:41:51 (3 years ago)
Author:
dd32
Message:
  • Don't clear link colour when switching layouts
  • Update "default colour" link when a custom colour has been selected

Fixes #17746

Location:
trunk/wp-content/themes/twentyeleven/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.js

    r18198 r18229  
    4040        }); 
    4141 
    42         $('.image-radio-option input:radio').change( function() { 
     42        $('.image-radio-option.color-scheme input:radio').change( function() { 
    4343            var currentDefault = $('#default-color a'), 
    44                 newDefault; 
    45             if ( $('#link-color').val() !== currentDefault.text() ) 
    46                 return; 
    47             newDefault = $(this).next().val(); 
     44                newDefault = $(this).next().val(); 
     45 
     46            if ( $('#link-color').val() == currentDefault.text() ) 
     47                pickColor( newDefault ); 
     48 
    4849            currentDefault.text( newDefault ); 
    49             pickColor( newDefault ); 
    5050        }); 
    5151    }); 
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.php

    r18198 r18229  
    2323 
    2424    wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' ); 
    25     wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-04-28' ); 
     25    wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' ); 
    2626    wp_enqueue_style( 'farbtastic' ); 
    2727} 
     
    225225            <table class="form-table"> 
    226226 
    227                 <tr valign="top" class="image-radio-option"><th scope="row"><?php _e( 'Color Scheme', 'twentyeleven' ); ?></th> 
     227                <tr valign="top" class="image-radio-option color-scheme"><th scope="row"><?php _e( 'Color Scheme', 'twentyeleven' ); ?></th> 
    228228                    <td> 
    229229                        <fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend> 
     
    261261                </tr> 
    262262 
    263                 <tr valign="top" class="image-radio-option"><th scope="row"><?php _e( 'Default Layout', 'twentyeleven' ); ?></th> 
     263                <tr valign="top" class="image-radio-option theme-layout"><th scope="row"><?php _e( 'Default Layout', 'twentyeleven' ); ?></th> 
    264264                    <td> 
    265265                        <fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend> 
Note: See TracChangeset for help on using the changeset viewer.