Changeset 26746
- Timestamp:
- 12/06/2013 09:25:31 PM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/about.php
r26737 r26746 82 82 <h3><?php echo ( 'Pick a color' ); ?></h3> 83 83 <p><?php echo ( 'We’ve included four color schemes so that you can choose your favorite. Don’t like this striking new admin? Choose from any of the schemes below to change it in an instant.' ); ?></p> 84 <?php $user_id = get_current_user_id(); ?> 84 85 <?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) :?> 85 86 <?php 87 wp_nonce_field('update-user_' . $user_id); 86 88 /** This action is documented in wp-admin/user-edit.php */ 87 89 do_action( 'admin_color_scheme_picker' ); … … 90 92 <img src="<?php echo admin_url( 'images/about-color-schemes.png' ); ?>" /> 91 93 <?php endif; ?> 92 <p><?php printf( ( 'To change your color scheme later, just <a href="%1$s">visit your profile settings</a>.' ), get_edit_profile_url( get_current_user_id()) ); ?></p>94 <p><?php printf( ( 'To change your color scheme later, just <a href="%1$s">visit your profile settings</a>.' ), get_edit_profile_url( $user_id ) ); ?></p> 93 95 </div> 94 96 </div> -
trunk/src/wp-admin/js/about.js
r26737 r26746 1 /* global isRtl */1 /* global ajaxurl */ 2 2 (function($){ 3 3 … … 11 11 $colorpicker = $( '#color-picker' ); 12 12 $stylesheet = $( '#colors-css' ); 13 if ( isRtl ){14 $stylesheet = $( '#colors-rtl-css' );15 }16 13 17 14 $colorpicker.on( 'click.colorpicker', '.color-option', function() { … … 29 26 // Load the colors stylesheet 30 27 css_url = $this.children( '.css_url' ).val(); 31 if ( isRtl ){32 css_url = css_url.replace('.min', '-rtl.min');33 }34 35 28 $stylesheet.attr( 'href', css_url ); 36 29 … … 46 39 } 47 40 } 41 42 // update user option 43 $.post( ajaxurl, { 44 action: 'save-user-color-scheme', 45 color_scheme: $this.children( 'input[name="admin_color"]' ).val(), 46 nonce: $('#_wpnonce').val() 47 }); 48 48 }); 49 49 });
Note: See TracChangeset
for help on using the changeset viewer.