array( 'value' => 'light', 'label' => __( 'Light', 'ari' ), 'thumbnail' => get_template_directory_uri() . '/inc/theme-options/images/light.png', 'default_first_link_color' => '#88c34b', 'default_second_link_color' => '#999999', 'default_text_color' => '#4c4c4c' ), 'dark' => array( 'value' => 'dark', 'label' => __( 'Dark', 'ari' ), 'thumbnail' => get_template_directory_uri() . '/inc/theme-options/images/dark.png', 'default_first_link_color' => '#8a8a8a', 'default_second_link_color' => '#b7b7b7', 'default_text_color' => '#707070' ) ); return apply_filters( 'ari_color_schemes', $color_scheme_options ); } /** * Returns the default options for Ari. * * @since Ari 1.1.2 */ function ari_get_default_theme_options() { $default_theme_options = array( 'color_scheme' => 'light', 'first_link_color' => ari_get_default_first_link_color( 'light' ), 'second_link_color' => ari_get_default_second_link_color( 'light' ), 'text_color' => ari_get_default_text_color( 'light' ) ); return apply_filters( 'ari_default_theme_options', $default_theme_options ); } /** * Returns the default first link color for Ari, based on color scheme. * * @since Ari 1.1.2 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function ari_get_default_first_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = ari_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = ari_color_schemes(); if ( ! isset( $color_schemes[$color_scheme] ) ) return false; return $color_schemes[$color_scheme]['default_first_link_color']; } /** * Returns the default second link color for Ari, based on color scheme. * * @since Ari 1.1.2 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function ari_get_default_second_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = ari_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = ari_color_schemes(); if ( ! isset( $color_schemes[$color_scheme] ) ) return false; return $color_schemes[$color_scheme]['default_second_link_color']; } /** * Returns the default text color for Ari, based on color scheme. * * @since Ari 1.1.2 * * @param $string $color_scheme Color scheme. Defaults to the active color scheme. * @return $string Color. */ function ari_get_default_text_color( $color_scheme = null ) { if ( null === $color_scheme ) { $options = ari_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = ari_color_schemes(); if ( ! isset( $color_schemes[$color_scheme] ) ) return false; return $color_schemes[$color_scheme]['default_text_color']; } /** * Returns the options array for Ari. * * @since Ari 1.1.2 */ function ari_get_theme_options() { return get_option( 'ari_theme_options', ari_get_default_theme_options() ); } /** * Renders the Color Scheme setting field. * * @since Ari 1.1.2 */ function ari_settings_field_color_scheme() { $options = ari_get_theme_options(); foreach ( ari_color_schemes() as $scheme ) { ?>

' . ari_get_default_first_link_color( $options['color_scheme'] ) . '' ); ?>
' . ari_get_default_second_link_color( $options['color_scheme'] ) . '' ); ?>
' . ari_get_default_text_color( $options['color_scheme'] ) . '' ); ?>