Coutoire: Revise conditionals to fix array offset issue, cody tidying.
This commit is contained in:
parent
3fab705150
commit
e63cef7036
1 changed files with 9 additions and 9 deletions
|
@ -58,11 +58,11 @@ if ( ! function_exists( 'coutoire_setup' ) ) :
|
|||
*
|
||||
* - if the customizer color is empty, use the default
|
||||
*/
|
||||
$colors_array = get_theme_mod('colors_manager'); // color annotations array()
|
||||
$background = $colors_array['colors']['bg']; // $config-global--color-background-default;
|
||||
$primary = $colors_array['colors']['link']; // $config-global--color-primary-default;
|
||||
$foreground = $colors_array['colors']['txt']; // $config-global--color-foreground-default;
|
||||
$secondary = $colors_array['colors']['fg1']; // $config-global--color-secondary-default;
|
||||
$colors_array = get_theme_mod( 'colors_manager' ); // color annotations array()
|
||||
$primary = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#0000FF'; // $config-global--color-primary-default;
|
||||
$secondary = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#FF0000'; // $config-global--color-secondary-default;
|
||||
$foreground = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#444444'; // $config-global--color-foreground-default;
|
||||
$background = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#FFFFFF'; // $config-global--color-background-default;
|
||||
|
||||
// Editor color palette.
|
||||
add_theme_support(
|
||||
|
@ -71,22 +71,22 @@ if ( ! function_exists( 'coutoire_setup' ) ) :
|
|||
array(
|
||||
'name' => __( 'Primary', 'coutoire' ),
|
||||
'slug' => 'primary',
|
||||
'color' => ! isset($primary) ? '#0000FF' : $primary,
|
||||
'color' => $primary,
|
||||
),
|
||||
array(
|
||||
'name' => __( 'Secondary', 'coutoire' ),
|
||||
'slug' => 'secondary',
|
||||
'color' => ! isset($secondary) ? '#FF0000' : $secondary,
|
||||
'color' => $secondary,
|
||||
),
|
||||
array(
|
||||
'name' => __( 'Foreground', 'coutoire' ),
|
||||
'slug' => 'foreground',
|
||||
'color' => ! isset($foreground) ? '#444444' : $foreground,
|
||||
'color' => $foreground,
|
||||
),
|
||||
array(
|
||||
'name' => __( 'Background', 'coutoire' ),
|
||||
'slug' => 'background',
|
||||
'color' => ! isset($background) ? '#FFFFFF' : $background,
|
||||
'color' => $background,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue