esc_html__( 'Currency Switcher', 'alpus' ), 'lang-switcher' => esc_html__( 'Language Switcher', 'alpus' ), 'main-menu' => esc_html__( 'Main Menu', 'alpus' ), ) ) ); // support WordPress add_theme_support( 'title-tag' ); add_theme_support( 'custom-background', array() ); add_theme_support( 'custom-header', array() ); add_theme_support( 'custom-logo', array() ); // support gutenberg add_theme_support( 'wp-block-styles' ); add_theme_support( 'responsive-embeds' ); add_theme_support( 'align-wide' ); add_theme_support( 'editor-styles' ); // support woocommerce add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-lightbox' ); // default rss feed links add_theme_support( 'automatic-feed-links' ); // add support for post thumbnails add_theme_support( 'post-thumbnails' ); // add support for post formats add_theme_support( 'post-formats', array( 'video' ) ); // switch default core markup for search form, comment form, and comments to output valid HTML5. add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style', ) ); // add editor custom font sizes add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_html__( 'Small', 'alpus' ), 'shortName' => esc_html__( 'S', 'alpus' ), 'size' => 15, 'slug' => 'small', ), array( 'name' => esc_html__( 'Normal', 'alpus' ), 'shortName' => esc_html__( 'N', 'alpus' ), 'size' => 18, 'slug' => 'normal', ), array( 'name' => esc_html__( 'Medium', 'alpus' ), 'shortName' => esc_html__( 'M', 'alpus' ), 'size' => 24, 'slug' => 'medium', ), array( 'name' => esc_html__( 'Large', 'alpus' ), 'shortName' => esc_html__( 'L', 'alpus' ), 'size' => 30, 'slug' => 'large', ), array( 'name' => esc_html__( 'Huge', 'alpus' ), 'shortName' => esc_html__( 'huge', 'alpus' ), 'size' => 34, 'slug' => 'huge', ), ) ); // editor color palette add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', 'alpus' ), 'slug' => 'primary', 'color' => alpus_get_option( 'primary_color' ), ), array( 'name' => esc_html__( 'Secondary', 'alpus' ), 'slug' => 'secondary', 'color' => alpus_get_option( 'secondary_color' ), ), array( 'name' => esc_html__( 'Alert', 'alpus' ), 'slug' => 'alert', 'color' => alpus_get_option( 'alert_color' ), ), array( 'name' => esc_html__( 'Dark', 'alpus' ), 'slug' => 'dark', 'color' => '#333', ), array( 'name' => esc_html__( 'White', 'alpus' ), 'slug' => 'white', 'color' => '#fff', ), array( 'name' => esc_html__( 'Default Font Color', 'alpus' ), 'slug' => 'font', 'color' => '#666', ), array( 'name' => esc_html__( 'Transparent', 'alpus' ), 'slug' => 'transparent', 'color' => 'transparent', ), ) ); add_editor_style(); /** * Filters the image sizes. * * @since 1.0 */ $image_sizes = apply_filters( 'alpus_image_sizes', array( 'alpus-post-medium' => array( 'width' => 600, 'height' => 420, 'crop' => true, ), 'alpus-post-small' => array( 'width' => 400, 'height' => 280, 'crop' => true, ), 'alpus-product-thumbnail' => array( 'width' => 150, 'height' => 0, 'crop' => true, ), ) ); $sizes = alpus_get_option( 'custom_image_sizes' ); if ( is_array( $sizes ) ) { $old_size = alpus_get_option( 'custom_image_size' ); if ( ! empty( $old_size['Width'] ) && ! empty( $old_size['Height'] ) ) { $sizes[] = array( 'size_name' => esc_html__( 'Alpus Custom', 'alpus' ), 'width' => $old_size['Width'], 'height' => $old_size['Height'], ); set_theme_mod( 'custom_image_sizes', $sizes ); remove_theme_mod( 'custom_image_size' ); } foreach ( $sizes as $size ) { if ( ! empty( $size['size_name'] ) && ! empty( $size['width'] ) && ! empty( $size['height'] ) ) { $image_sizes[ $size['size_name'] ] = array( 'width' => (int) $size['width'], 'height' => (int) $size['height'], 'crop' => true, ); } } } foreach ( $image_sizes as $image => $size ) { add_image_size( $image, $size['width'], $size['height'], $size['crop'] ); } // Content Width if ( ! isset( $content_width ) ) { $content_width = 1240; } } /** * Add Widget Areas ( Sidebar ) * * @since 1.0 * @access public */ public function setup_sidebars() { $sidebars = array(); $sidebars['blog-sidebar'] = array( 'name' => esc_html__( 'Blog Sidebar', 'alpus' ), 'before_widget' => '', 'before_title' => '