array( 'value' => 'light', 'label' => __( 'Light', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', 'default_link_color' => '#990000', ), 'dark' => array( 'value' => 'dark', 'label' => __( 'Dark', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', 'default_link_color' => '#ffffff', ), ); return apply_filters( 'chateau_color_schemes', $color_scheme_options ); } /** * Returns an array of archive styles registered for Chateau. * */ function chateau_archive_styles() { $archive_style_options = array( 'detail' => array( 'value' => 'detail', 'label' => __( 'Detail', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/detail.png', ), 'concise' => array( 'value' => 'concise', 'label' => __( 'Concise', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/concise.png', ), ); return apply_filters( 'chateau_archive_styles', $archive_style_options ); } /** * Returns an array of layouts registered for Chateau. * */ function chateau_theme_layouts() { $theme_layout_options = array( 'sidebar-content' => array( 'value' => 'sidebar-content', 'label' => __( 'Sidebar-Content', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', ), 'content-sidebar' => array( 'value' => 'content-sidebar', 'label' => __( 'Content-Sidebar', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png', ), 'content' => array( 'value' => 'content', 'label' => __( 'One Column, No Sidebar', 'chateau' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', ) ); return apply_filters( 'chateau_theme_layouts', $theme_layout_options ); } /** * Returns the default options for Chateau. * */ function chateau_get_default_theme_options() { $default_theme_options = array( 'color_scheme' => 'light', 'link_color' => chateau_get_default_link_color( 'light' ), 'archive_style' => 'detail', 'theme_layout' => 'sidebar-content' ); return apply_filters( 'chateau_default_theme_options', $default_theme_options ); } /** * Returns the default link color for Chateau, based on color scheme. * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function chateau_get_default_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = chateau_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = chateau_color_schemes(); if ( ! isset( $color_schemes[ $color_scheme ] ) ) return false; return $color_schemes[ $color_scheme ]['default_link_color']; } /** * Returns the options array for Chateau. * */ function chateau_get_theme_options() { return get_option( 'chateau_theme_options', chateau_get_default_theme_options() ); } /** * Returns the options array for Chateau. * */ function theme_options_render_page() { ?>