tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'quest-blog-grid', 540, 420, true ); add_image_size( 'quest-gallery', 420, 420, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'quest' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'quest_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Allows theme developers to link a custom stylesheet file to the TinyMCE visual editor add_editor_style( 'custom-editor-style.css' ); } endif; // quest_setup add_action( 'after_setup_theme', 'quest_setup' ); if ( ! function_exists( 'quest_widgets_init' ) ): /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function quest_widgets_init() { //register Main sidebar widgets register_sidebar( array( 'name' => __( 'Sidebar', 'quest' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); $cols = quest_get_mod( 'layout_footer_widgets' ); switch ( $cols ) { case 1: $span = 12; break; case 2: $span = 6; break; case 3: $span = 4; break; case 4: $span = 3; break; } //Register Footer WIdgets register_sidebar( array( 'name' => __( 'Footer Widget', 'quest' ), 'id' => 'footer-widget', 'before_widget' => '
', 'after_widget' => "
\n", 'before_title' => '

', 'after_title' => "

\n" ) ); } endif; add_action( 'widgets_init', 'quest_widgets_init' ); if ( ! function_exists( 'quest_scripts' ) ): /** * Enqueue scripts and styles. */ function quest_scripts() { if( defined( 'QUEST_MINIFY_SCRIPTS' ) && QUEST_MINIFY_SCRIPTS ) { // Enqueue required styles wp_enqueue_style( 'quest-all-css', get_template_directory_uri() . '/assets/css/plugins-all.min.css' ); wp_enqueue_style( 'Quest-style', get_stylesheet_uri(), array( 'quest-all-css' ) ); // Enqueue required scripts wp_enqueue_script( 'quest-all-js', get_template_directory_uri() . '/assets/js/quest-and-plugins.js', array( 'jquery', 'masonry' ) ); } else { // Enqueue required styles wp_enqueue_style( 'quest-bootstrap', get_template_directory_uri() . '/assets/plugins/bootstrap/css/bootstrap.min.css' ); wp_enqueue_style( 'smartmenus', get_template_directory_uri() . '/assets/plugins/smartmenus/addons/bootstrap/jquery.smartmenus.bootstrap.css' ); wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/plugins/font-awesome/css/font-awesome.min.css' ); wp_enqueue_style( 'animate-css', get_template_directory_uri() . '/assets/plugins/animate/animate.css' ); wp_enqueue_style( 'slit-slider', get_template_directory_uri() . '/assets/plugins/FullscreenSlitSlider/css/style.css' ); wp_enqueue_style( 'colorbox', get_template_directory_uri() . '/assets/plugins/colorbox/colorbox.css' ); wp_enqueue_style( 'Quest-style', get_stylesheet_uri(), array( 'quest-bootstrap', 'smartmenus', 'font-awesome', 'animate-css', 'slit-slider', 'colorbox' ) ); // Enqueue required scripts wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/assets/plugins/modernizr/modernizr.custom.js' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/plugins/bootstrap/js/bootstrap.js', array( 'jquery', 'masonry' ) ); wp_enqueue_script( 'smoothscroll', get_template_directory_uri() . '/assets/plugins/smoothscroll/SmoothScroll.js' ); wp_enqueue_script( 'wow', get_template_directory_uri() . '/assets/plugins/wow/wow.min.js' ); wp_enqueue_script( 'ba-cond', get_template_directory_uri() . '/assets/plugins/FullscreenSlitSlider/js/jquery.ba-cond.js', array( 'jquery' ) ); wp_enqueue_script( 'slit-slider', get_template_directory_uri() . '/assets/plugins/FullscreenSlitSlider/js/jquery.slitslider.js' ); wp_enqueue_script( 'colorbox', get_template_directory_uri() . '/assets/plugins/colorbox/jquery.colorbox-min.js', array( 'jquery' ) ); wp_enqueue_script( 'imagesloaded', get_template_directory_uri() . '/assets/plugins/imagesloaded/imagesloaded.pkgd.js', array( 'jquery' ) ); wp_enqueue_script( 'smartmenus', get_template_directory_uri() . '/assets/plugins/smartmenus/jquery.smartmenus.js' ); wp_enqueue_script( 'bs-smartmenus', get_template_directory_uri() . '/assets/plugins/smartmenus/addons/bootstrap/jquery.smartmenus.bootstrap.js' ); wp_enqueue_script( 'smartmenus-keyboard', get_template_directory_uri() . '/assets/plugins/smartmenus/addons/keyboard/jquery.smartmenus.keyboard.js' ); wp_enqueue_script( 'quest-js', get_template_directory_uri() . '/assets/js/quest.js' ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } endif; add_action( 'wp_enqueue_scripts', 'quest_scripts' ); if ( ! function_exists( 'quest_admin_scripts' ) ): /** * Enqueue Admin scripts and styles. */ function quest_admin_scripts( $hook ) { if ( in_array( $hook, array( 'post-new.php', 'post.php' ) ) ) : // Enqueue required styles wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'admin-panel', get_template_directory_uri() . '/custom-editor-style.css' ); wp_enqueue_script( 'jquery-reveal', get_template_directory_uri() . '/assets/plugins/reveal/jquery.reveal.js' ); wp_enqueue_style( 'jquery-reveal', get_template_directory_uri() . '/assets/plugins/reveal/reveal.css' ); // Enqueue required scripts wp_enqueue_script( 'quest_custom_js', get_template_directory_uri() . '/assets/js/admin.js' ); endif; wp_enqueue_style( 'admin-panel-css', get_template_directory_uri() . '/assets/css/admin.css' ); } endif; add_action( 'admin_enqueue_scripts', 'quest_admin_scripts' ); if ( ! function_exists( 'quest_blog_favicon' ) ): /** * Hook into wp_head and add custom favicon */ function quest_blog_favicon() { $favicon = quest_get_mod( 'logo_favicon' ); if ( $favicon !== '' ): ?> db_fields['id']; if ( is_object( $args[0] ) ) { $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); } return parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); } function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { if ( $args->has_children ) { $item->classes[] = 'dropdown'; } parent::start_el( $output, $item, $depth, $args, $id ); } // add classes to ul sub-menus function start_lvl( &$output, $depth = 0, $args = array() ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( "\t", $depth ) : '' ); $output .= "\n" . $indent . '