' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '

' . '
    ' . '
  1. ' . __( 'Color Scheme: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '
  2. ' . '
  3. ' . __( 'Link Color: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '
  4. ' . '
  5. ' . __( 'Default Layout: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '
  6. ' . '
' . '

' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '

'; $sidebar = '

' . __( 'For more information:', 'twentyeleven' ) . '

' . '

' . __( 'Documentation on Theme Options', 'twentyeleven' ) . '

' . '

' . __( 'Support Forums', 'twentyeleven' ) . '

'; $screen = get_current_screen(); if ( method_exists( $screen, 'add_help_tab' ) ) { // WordPress 3.3 $screen->add_help_tab( array( 'title' => __( 'Overview', 'twentyeleven' ), 'id' => 'theme-options-help', 'content' => $help, ) ); $screen->set_help_sidebar( $sidebar ); } else { // WordPress 3.2 add_contextual_help( $screen, $help . $sidebar ); } } /** * Returns an array of color schemes registered for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_color_schemes() { $color_scheme_options = array( 'light' => array( 'value' => 'light', 'label' => __( 'Light', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', 'default_link_color' => '#1b8be0', ), 'dark' => array( 'value' => 'dark', 'label' => __( 'Dark', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', 'default_link_color' => '#e4741f', ), ); return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options ); } /** * Returns an array of layout options registered for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_layouts() { $layout_options = array( 'content-sidebar' => array( 'value' => 'content-sidebar', 'label' => __( 'Content on left', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png', ), 'sidebar-content' => array( 'value' => 'sidebar-content', 'label' => __( 'Content on right', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', ), 'content' => array( 'value' => 'content', 'label' => __( 'One-column, no sidebar', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', ), ); return apply_filters( 'twentyeleven_layouts', $layout_options ); } /** * Returns the default options for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_get_default_theme_options() { $default_theme_options = array( 'color_scheme' => 'light', 'link_color' => twentyeleven_get_default_link_color( 'light' ), 'theme_layout' => 'content-sidebar', ); if ( is_rtl() ) $default_theme_options['theme_layout'] = 'sidebar-content'; return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options ); } /** * Returns the default link color for Twenty Eleven, based on color scheme. * * @since Twenty Eleven 1.0 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function twentyeleven_get_default_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = twentyeleven_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = twentyeleven_color_schemes(); if ( ! isset( $color_schemes[ $color_scheme ] ) ) return false; return $color_schemes[ $color_scheme ]['default_link_color']; } /** * Returns the options array for Twenty Eleven. * * @since Twenty Eleven 1.0 */ function twentyeleven_get_theme_options() { return get_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() ); } /** * Renders the Color Scheme setting field. * * @since Twenty Eleven 1.3 */ function twentyeleven_settings_field_color_scheme() { $options = twentyeleven_get_theme_options(); foreach ( twentyeleven_color_schemes() as $scheme ) { ?>

' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '' ); ?>