admin_url( 'admin-ajax.php' ), 'siteurl' => get_template_directory_uri(), 'error' => __( 'Error!', 'ayyash' ), 'nonce' => wp_create_nonce( 'themeoo-nonce' ), 'viewport' => $stickey_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' ); if ( ! function_exists( 'themeoo_admin_scripts' ) ) { /** * Enqueue Admin scripts and styles. * * @param string $hook admin page hook. * * @return void */ function themeoo_admin_scripts( $hook ) { if ( in_array( $hook, array( 'post-new.php', 'post.php' ) ) ) { // 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, false ); 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/js/admin.js', [], THEMEOO_THEME_VERSION, false ); // Support post meta. wp_register_script( 'themeoo-post-meta', THEMEOO_THEME_URI . 'assets/admin/js/admin-post-format.js', [], THEMEOO_THEME_VERSION, false ); wp_register_script( 'themeoo-admin-scripts', THEMEOO_THEME_URI . 'assets/admin/js/themeoo-admin-scripts.js', [], THEMEOO_THEME_VERSION, false ); wp_enqueue_script( 'themeoo-post-meta' ); } wp_enqueue_style( 'font-awesome', THEMEOO_THEME_URI . 'assets/plugins/themify-icons/themify-icons.css', [], THEMEOO_THEME_VERSION ); wp_enqueue_style( 'admin-panel-css', THEMEOO_THEME_URI . 'assets/admin/css/admin.css', [], THEMEOO_THEME_VERSION ); } } add_action( 'admin_enqueue_scripts', 'themeoo_admin_scripts' );