'#ffffff', 'default-image' => '', ) ) ); if ( arendelle_is_woocommerce_activated() ) { add_theme_support( 'woocommerce', array( 'thumbnail_image_width' => 295, 'gallery_thumbnail_image_width' => 120, 'single_image_width' => 694, 'product_grid' => array( 'default_columns' => 3, 'default_rows' => 3, ), ) ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } // Gutenberg add_theme_support( 'align-wide' ); add_theme_support( 'responsive-embeds' ); add_editor_style(); add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'blue', 'arendelle' ), 'slug' => 'blue', 'color' => '#024E82', ), array( 'name' => esc_html__( 'orange', 'arendelle' ), 'slug' => 'orange', 'color' => '#D6763C', ), array( 'name' => esc_html__( 'dark', 'arendelle' ), 'slug' => 'dark', 'color' => '#0c0c0c', ), array( 'name' => esc_html__( 'silver', 'arendelle' ), 'slug' => 'silver', 'color' => '#FBFBFB', ), array( 'name' => esc_html__( 'white', 'arendelle' ), 'slug' => 'white', 'color' => '#ffffff', ), array( 'name' => esc_html__( 'black', 'arendelle' ), 'slug' => 'black', 'color' => '#000000', ), ) ); // Redirect on theme activation if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { wp_redirect( admin_url( 'themes.php?page=arendelle-theme' ) ); } // Thumbnails add_image_size( 'arendelle_featured_medium', 914, 0, false ); add_image_size( 'arendelle_featured_large', 1240, 0, false ); // Nav menus register_nav_menus( array( 'primary-menu' => esc_html__( 'Primary Menu', 'arendelle' ), 'footer-bottom-menu' => esc_html__( 'Footer Bottom Menu', 'arendelle' ), ) ); // Disable WooCommerce wizard redirect add_filter('woocommerce_enable_setup_wizard', '__return_false'); add_filter('woocommerce_show_admin_notice', '__return_false'); add_filter('woocommerce_prevent_automatic_wizard_redirect', '__return_false'); // Disable Kirki telemetry add_filter( 'kirki_telemetry', '__return_false' ); // Remove admin notices for Instagram Feed update_option( 'sbi_rating_notice', 'dismissed' ); remove_action( 'admin_notices', 'sbi_usage_tracking' ); remove_action( 'admin_notices', 'sbi_usage_opt_in' ); remove_action( 'admin_notices', 'sbi_notices_html' ); } endif; // theme_setup add_action( 'after_setup_theme', 'arendelle_setup' ); // Update Elementor Defaults if ( 1 != get_option( 'arendelle_elementor_defaults', 0 ) ) { add_option( 'arendelle_elementor_defaults', 0 ); } /** * Update Elementor defaults. */ function arendelle_update_elementor_defaults() { if ( 1 != get_option( 'arendelle_elementor_defaults' ) ) { update_option( 'elementor_cpt_support', array( 'post', 'page', 'theme_template' ) ); update_option( 'elementor_disable_color_schemes', 'yes' ); update_option( 'elementor_disable_typography_schemes', 'yes' ); update_option( 'arendelle_elementor_defaults', 1 ); } } add_action( 'init', 'arendelle_update_elementor_defaults' ); /** * Disable Elementor redirect. */ add_action( 'admin_init', function() { if ( did_action( 'elementor/loaded' ) ) { remove_action( 'admin_init', [ \Elementor\Plugin::$instance->admin, 'maybe_redirect_to_getting_started' ] ); } }, 1 ); /** * Register widget areas. */ function arendelle_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Blog Sidebar', 'arendelle' ), 'id' => 'arendelle-blog-sidebar', 'before_widget' => '
', 'before_title' => '