Make WordPress Core


Ignore:
Timestamp:
06/10/2011 11:01:16 PM (12 years ago)
Author:
azaozz
Message:

Twenty Eleven code review and cleanup, props dd32, fixes #17748

File:
1 edited

Legend:

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

    r18235 r18253  
    1515 * @since Twenty Eleven 1.0
    1616 *
    17  * @param string $hook_suffix The action passes the current page to the function. We don't
    18  *  do anything if we're not on our theme options page.
    1917 */
    2018function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
    21     if ( $hook_suffix != 'appearance_page_theme_options' )
    22         return;
    23 
    2419    wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' );
    2520    wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' );
    2621    wp_enqueue_style( 'farbtastic' );
    2722}
    28 add_action( 'admin_enqueue_scripts', 'twentyeleven_admin_enqueue_scripts' );
     23add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' );
    2924
    3025/**
     
    310305    // Link color must be 3 or 6 hexadecimal characters
    311306    if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
    312             $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
     307        $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
    313308
    314309    // Theme layout must be in our array of theme layout options
Note: See TracChangeset for help on using the changeset viewer.