__( 'Small', 'alves' ), 'shortName' => __( 'S', 'alves' ), 'size' => 16.6667, 'slug' => 'small', ), array( 'name' => __( 'Normal', 'alves' ), 'shortName' => __( 'M', 'alves' ), 'size' => 20, 'slug' => 'normal', ), array( 'name' => __( 'Large', 'alves' ), 'shortName' => __( 'L', 'alves' ), 'size' => 28.8, 'slug' => 'large', ), array( 'name' => __( 'Huge', 'alves' ), 'shortName' => __( 'XL', 'alves' ), 'size' => 34.5667, 'slug' => 'huge', ), ) ); /* * Get customizer colors and add them to the editor color palettes * * - if the customizer color is empty, use the default */ $colors_array = get_theme_mod( 'colors_manager' ); // color annotations array() $primary = is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) ? ( $colors_array['colors']['link'] ?? '' ) : '#3E7D98'; // $config-global--color-primary-default; $secondary = is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) ? ( $colors_array['colors']['fg1'] ?? '' ) : '#9B6A36'; // $config-global--color-secondary-default; $background = is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) ? ( $colors_array['colors']['bg'] ?? '' ) : '#FFFFFF'; // $config-global--color-background-default; $foreground = is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) ? ( $colors_array['colors']['txt'] ?? '' ) : '#394d55'; // $config-global--color-foreground-default; $foreground_light = ( is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) && ( isset( $colors_array['colors']['txt'] ) && $colors_array['colors']['txt'] != '#394d55' ) ) ? ( $colors_array['colors']['txt'] ?? '' ) : '#4d6974'; // $config-global--color-foreground-light-default; $foreground_dark = ( is_array( $colors_array ) && array_key_exists( 'colors', $colors_array ) && ( isset( $colors_array['colors']['txt'] ) && $colors_array['colors']['txt'] != '#394d55' ) ) ? ( $colors_array['colors']['txt'] ?? '' ) : '#253136'; // $config-global--color-foreground-dark-default; // Editor color palette. add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Primary', 'alves' ), 'slug' => 'primary', 'color' => $primary, ), array( 'name' => __( 'Secondary', 'alves' ), 'slug' => 'secondary', 'color' => $secondary, ), array( 'name' => __( 'Background', 'alves' ), 'slug' => 'background', 'color' => $background, ), array( 'name' => __( 'Foreground', 'alves' ), 'slug' => 'foreground', 'color' => $foreground, ), array( 'name' => __( 'Foreground Light', 'alves' ), 'slug' => 'foreground-light', 'color' => $foreground_light, ), array( 'name' => __( 'Foreground Dark', 'alves' ), 'slug' => 'foreground-dark', 'color' => $foreground_dark, ), ) ); // Setup nav on side toggle support. if ( function_exists( 'varia_mobile_nav_on_side_setup' ) ) { varia_mobile_nav_on_side_setup(); } } endif; add_action( 'after_setup_theme', 'alves_setup', 12 ); /** * Register second and third footer widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function alves_widgets_init() { register_sidebar( array( 'name' => __( 'Footer 2', 'alves' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your footer.', 'alves' ), 'before_widget' => '
', 'before_title' => '