admin_url( 'admin-ajax.php' ), 'siteurl' => get_template_directory_uri(), 'error' => __( 'Error!', 'ayyash' ), 'nonce' => wp_create_nonce( 'themeoo-nonce' ), 'viewport' => $sticky_viewport_size, 'sticky' => themeoo_get_mod( 'layout_header_sticky' ), 'header' => themeoo_get_mod( 'layout_header_sticky_height' ), 'accent' => ( themeoo_get_mod( 'skin' ) !== 'default' ) ? themeoo_get_mod( 'accent_color' ) : '#428bca', 'no_smoothscroll' => ( themeoo_get_mod( 'smoothscroll' ) ) ? '1' : '0', ] ); } } add_action( 'wp_enqueue_scripts', 'themeoo_scripts' ); /** * Enqueue Block Editor Styles * * @return void */ function themeoo_action_enqueue_block_editor_assets() { wp_enqueue_style( 'themeoo-themify-icons', THEMEOO_THEME_URI . 'assets/plugins/themify-icons/themify-icons.css', [], THEMEOO_THEME_VERSION ); wp_enqueue_style( 'themeoo-fontawesome-icons', THEMEOO_THEME_URI . 'assets/plugins/fontawesome/css/fontawesome.min.css', [], THEMEOO_THEME_VERSION ); wp_enqueue_style( 'themeoo-gutenberg-editor', THEMEOO_THEME_URI . 'assets/dist/css/gutenberg-editor-custom.css', array(), THEMEOO_THEME_VERSION ); } add_action('enqueue_block_editor_assets', 'themeoo_action_enqueue_block_editor_assets' ); if ( ! function_exists( 'themeoo_admin_scripts' ) ) { /** * Enqueue Admin scripts and styles. * * @param string $hook admin page hook. * * @return void */ function themeoo_admin_scripts( $hook ) { wp_enqueue_style( 'themeoo-themify-icons', THEMEOO_THEME_URI . 'assets/plugins/themify-icons/themify-icons.css', [], THEMEOO_THEME_VERSION ); wp_enqueue_style( 'themeoo-fontawesome-icons', THEMEOO_THEME_URI . 'assets/plugins/fontawesome/css/fontawesome.min.css', [], THEMEOO_THEME_VERSION ); // Admin & Customizer. wp_enqueue_style( 'themeoo-admin', THEMEOO_THEME_URI . 'assets/dist/css/admin.css', [], THEMEOO_THEME_VERSION ); // Mega Menu Editor. wp_enqueue_style( 'themeoo-mega-menu', THEMEOO_THEME_URI . 'assets/dist/css/edit-mega-menu.css', [], THEMEOO_THEME_VERSION ); wp_enqueue_script( 'themeoo-mega-menu', THEMEOO_THEME_URI . 'assets/dist/js/edit-mega-menu.js', [ 'jquery', 'jquery-ui-dialog' ], THEMEOO_THEME_VERSION, true ); wp_enqueue_script('wp-codemirror'); if ( in_array( $hook, [ 'post-new.php', 'post.php' ], true ) ) { // Enqueue required scripts. wp_enqueue_script( 'themeoo-admin', THEMEOO_THEME_URI . 'assets/dist/js/admin.js', [], THEMEOO_THEME_VERSION, true ); } } } add_action( 'admin_enqueue_scripts', 'themeoo_admin_scripts' ); // End of file themeoo-include.php