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-gutenberg-editor-font-awesome-styles-5', THEMEOO_THEME_URI . 'assets/plugins/fontawesome/css/fontawesome.css', array(), THEMEOO_THEME_VERSION ); wp_enqueue_style( 'themeoo-gutenberg-editor-customizer-styles', 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 ); wp_enqueue_style( 'themeoo-admin-panel-css', THEMEOO_THEME_URI . 'assets/dist/css/admin/admin.css', [], THEMEOO_THEME_VERSION ); if ( in_array( $hook, [ 'post-new.php', 'post.php' ], true ) ) { // Enqueue required styles. wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'jquery-reveal', THEMEOO_THEME_URI . 'assets/plugins/reveal/jquery.reveal.js', [], THEMEOO_THEME_VERSION, true ); wp_enqueue_style( 'jquery-reveal', THEMEOO_THEME_URI . 'assets/plugins/reveal/reveal.css', [], THEMEOO_THEME_VERSION ); // Enqueue required scripts. wp_enqueue_script( 'themeoo_custom_js', THEMEOO_THEME_URI . 'assets/dist/js/admin.js', [], THEMEOO_THEME_VERSION, true ); // Support post meta. wp_register_script( 'themeoo-post-meta', THEMEOO_THEME_URI . 'assets/dist/js/admin/admin-post-format.js', [], THEMEOO_THEME_VERSION, true ); wp_register_script( 'themeoo-admin-scripts', THEMEOO_THEME_URI . 'assets/dist/js/admin/themeoo-admin-scripts.js', [], THEMEOO_THEME_VERSION, true ); wp_enqueue_script( 'themeoo-post-meta' ); } } } add_action( 'admin_enqueue_scripts', 'themeoo_admin_scripts' ); // End of file themeoo-include.php