is_block_editor ) ) { wp_enqueue_style( 'brandy-editor-style', BRANDY_TEMPLATE_URL . '/assets/css/admin/editor.min.css', array(), BRANDY_VERSION ); } } ); $this->register_font_families(); } /** * Enqueue callback */ public function enqueue_scripts() { /** Enqueue styles */ wp_enqueue_script( 'wc-cart-fragments' ); wp_enqueue_script( 'brandy-frontend', BRANDY_TEMPLATE_URL . '/assets/js/frontend.min.js', array( 'jquery' ), time(), true ); wp_localize_script( 'brandy-frontend', 'brandyData', array_merge( array( 'ajax' => array( 'path' => admin_url( 'admin-ajax.php' ), 'nonces' => array( 'update_cart' => wp_create_nonce( 'brandy_update_cart' ), 'send_subscribe_mail' => wp_create_nonce( 'send_subscribe_mail' ), ), ), ), is_brandy_blocks_installed() ? array( 'brandy_blocks' => array(), ) : array(), array( 'urls' => array( 'wishlist' => Wishlist::get_wishlist_url(), 'cart' => brandy_get_cart_page_url(), 'assets' => BRANDY_TEMPLATE_URL . '/assets', ), ) ) ); FrontendVite::enqueue_vite(); /* Enqueue styles */ if ( is_customize_preview() ) { wp_enqueue_style( 'brandy-customize-preview-style', BRANDY_TEMPLATE_URL . '/assets/css/frontend/customize-preview.min.css', array(), BRANDY_VERSION ); } } public function register_font_families() { /** * Roboto */ wp_register_style( 'roboto-font', 'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'roboto-font' ); /** * Readex pro */ wp_register_style( 'readex-pro-font', 'https://fonts.googleapis.com/css2?family=Readex+Pro:wght@160..700&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'readex-pro-font' ); /** * Outfit pro */ wp_register_style( 'outfit-font', 'https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'outfit-font' ); /** * Lexend */ wp_register_style( 'lexend-font', 'https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'lexend-font' ); /** * Jost */ wp_register_style( 'jost-font', 'https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'jost-font' ); /** * Red Hat Mono */ wp_register_style( 'red-hat-mono-font', 'https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'red-hat-mono-font' ); /** * Amiri */ wp_register_style( 'amiri-font', 'https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'amiri-font' ); /** * Prata */ wp_register_style( 'prata-font', 'https://fonts.googleapis.com/css2?family=Prata&display=swap', array(), BRANDY_VERSION ); wp_enqueue_style( 'prata-font' ); } }