get( 'Version' ) ); } define( 'akiieezlauncher_DEBUG', defined( 'WP_DEBUG' ) && WP_DEBUG === true ); define( 'akiieezlauncher_DIR', trailingslashit( get_template_directory() ) ); define( 'akiieezlauncher_URL', trailingslashit( get_template_directory_uri() ) ); define( 'akiieezlauncher_DEMO_URL', 'https://assets.cozythemes.com/cozy-essential-addons/demos/akiieezlauncher/' ); if ( ! function_exists( 'akiieezlauncher_support' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * @since walker_fse 1.0.0 * * @return void */ function akiieezlauncher_support() { // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Add support for block styles. add_theme_support( 'wp-block-styles' ); add_theme_support( 'post-thumbnails' ); // Enqueue editor styles. add_editor_style( 'style.css' ); // Removing default patterns. remove_theme_support( 'core-block-patterns' ); load_theme_textdomain( 'akiieezlauncher', get_template_directory() ); } endif; add_action( 'after_setup_theme', 'akiieezlauncher_support' ); // print_r( get_template_directory() ); /* ---------------------------------------------------------------------------------- Enqueue Styles -----------------------------------------------------------------------------------*/ if ( ! function_exists( 'akiieezlauncher_styles' ) ) : function akiieezlauncher_styles() { // registering style for theme wp_enqueue_style( 'akiieezlauncher-style', get_stylesheet_uri(), array(), akiieezlauncher_VERSION ); wp_enqueue_style( 'akiieezlauncher-blocks-style', get_template_directory_uri() . '/assets/css/blocks.css' ); wp_enqueue_style( 'akiieezlauncher-aos-style', get_template_directory_uri() . '/assets/css/aos.css' ); if ( is_rtl() ) { wp_enqueue_style( 'akiieezlauncher-rtl-css', get_template_directory_uri() . '/assets/css/rtl.css', 'rtl_css' ); } wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'akiieezlauncher-aos-scripts', get_template_directory_uri() . '/assets/js/aos.js', array(), akiieezlauncher_VERSION, true ); wp_enqueue_script( 'akiieezlauncher-scripts', get_template_directory_uri() . '/assets/js/akiieezlauncher-scripts.js', array(), akiieezlauncher_VERSION, true ); } endif; add_action( 'wp_enqueue_scripts', 'akiieezlauncher_styles' ); /** * Enqueue scripts for admin area */ function akiieezlauncher_admin_style() { $hello_notice_current_screen = get_current_screen(); if ( ( ! empty( $_GET['page'] ) && 'about-akiieezlauncher' === $_GET['page'] ) || $hello_notice_current_screen->id === 'themes' || $hello_notice_current_screen->id === 'dashboard' || $hello_notice_current_screen->id === 'plugins' ) { wp_enqueue_style( 'akiieezlauncher-admin-style', get_template_directory_uri() . '/inc/admin/css/admin-style.css', array(), akiieezlauncher_VERSION, 'all' ); wp_enqueue_script( 'akiieezlauncher-admin-scripts', get_template_directory_uri() . '/inc/admin/js/akiieezlauncher-admin-scripts.js', array(), akiieezlauncher_VERSION, true ); wp_localize_script( 'akiieezlauncher-admin-scripts', 'akiieezlauncher_admin_localize', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'akiieezlauncher_admin_nonce' ), 'welcomeNonce' => wp_create_nonce( 'akiieezlauncher_welcome_nonce' ), 'redirect_url' => admin_url( 'themes.php?page=about-akiieezlauncher' ), 'scrollURL' => admin_url( 'plugins.php?cozy-addons-scroll=true' ), 'demoURL' => admin_url( 'themes.php?page=advanced-import' ), ) ); } } add_action( 'admin_enqueue_scripts', 'akiieezlauncher_admin_style' ); /** * Enqueue assets scripts for both backend and frontend */ function akiieezlauncher_block_assets() { wp_enqueue_style( 'akiieezlauncher-blocks-style', get_template_directory_uri() . '/assets/css/blocks.css' ); } add_action( 'enqueue_block_assets', 'akiieezlauncher_block_assets' ); /** * Load core file. */ require_once get_template_directory() . '/inc/core/init.php'; /** * Load welcome page file. */ require_once get_template_directory() . '/inc/admin/welcome-notice.php'; if ( ! function_exists( 'akiieezlauncher_excerpt_more_postfix' ) ) { function akiieezlauncher_excerpt_more_postfix( $more ) { if ( is_admin() ) { return $more; } return '...'; } add_filter( 'excerpt_more', 'akiieezlauncher_excerpt_more_postfix' ); } function akiieezlauncher_add_woocommerce_support() { add_theme_support( 'woocommerce' ); } add_action( 'after_setup_theme', 'akiieezlauncher_add_woocommerce_support' );