tag in add_theme_support( 'title-tag' ); // Enable Font Icons // Disable this (remove this line) if the theme doesnt use font icons, // or if the font-awesome library is being enqueued by some other plugin using // a handle other than 'font-awesome' or 'fontawesome' (to avoid loading the // library twice) add_theme_support( 'font-awesome' ); // Enable google fonts (fixed fonts, or entire library) add_theme_support( 'google-fonts' ); // Enable widgetized template (options in Admin Panel) add_theme_support( 'hoot-widgetized-template' ); /** WordPress **/ // Add theme support for WordPress Custom Logo add_theme_support( 'custom-logo' ); // Adds theme support for WordPress 'featured images'. add_theme_support( 'post-thumbnails' ); // Automatically add feed links to . add_theme_support( 'automatic-feed-links' ); /** WordPress Jetpack **/ add_theme_support( 'infinite-scroll', array( 'type' => apply_filters( 'hoot_theme_jetpack_infinitescroll_type', 'click' ), // scroll or click 'container' => 'content', 'footer' => false, 'wrapper' => true, 'render' => 'hoot_jetpack_infinitescroll_render', ) ); /** Hoot Extensions **/ // Enable custom widgets add_theme_support( 'hoot-core-widgets' ); // Pagination. add_theme_support( 'loop-pagination' ); // Nicer [gallery] shortcode implementation when Jetpack tiled-gallery is not active if ( !class_exists( 'Jetpack' ) || !Jetpack::is_module_active( 'tiled-gallery' ) ) add_theme_support( 'cleaner-gallery' ); // Better captions for themes to style. add_theme_support( 'cleaner-caption' ); /** WooCommerce **/ // Woocommerce support and init load theme woo functions if ( class_exists( 'WooCommerce' ) ) { add_theme_support( 'woocommerce' ); get_template_part( 'woocommerce/functions' ); } } /** * Theme setup on the 'wp' hook. Only used for special scenarios based on conditional tags. * Like enqueueing scripts/styles conditionally, or adding theme support so that enqueue functions * hooked into 'wp_enqueue_scripts' load the script/styles. * * @since 1.0 * @access public * @return void */ function conditional_theme_setup() { /* Enable Light Slider if its the 'Widgetized Template' */ if ( is_page_template() ) { $template_slug = get_page_template_slug(); if ( 'page-templates/template-widgetized.php' == $template_slug ) { add_theme_support( 'light-slider' ); } } } /** * Handle content width for embeds and images. * * @since 1.0 * @access public * @return void */ function content_width() { $width = intval( hoot_get_mod( 'site_width' ) ); $width = !empty( $width ) ? $width : 1260; hoot_set_content_width( $width ); } /** * Modify the '[...]' Read More Text * * @since 1.0 * @access public * @return string */ function modify_read_more_link( $more = '[...]' ) { $read_more = hoot_get_mod('read_more'); $read_more = ( empty( $read_more ) ) ? sprintf( __( 'Read More %s', 'chromatic' ), '→' ) : $read_more; global $post; $read_more = '' . $read_more . ''; return apply_filters( 'hoot_readmore', $read_more ) ; } /** * Always display the 'Read More' link in Excerpts. * Insert quicktag to be replaced later in 'wp_trim_excerpt()' * * @since 2.12 * @access public * @return string */ function insert_excerpt_readmore_quicktag( $more = '' ) { return ''; } /** * Always display the 'Read More' link in Excerpts. * Replace quicktag with read more link * * @since 2.12 * @access public * @return string */ function replace_excerpt_readmore_quicktag( $text, $raw_excerpt ) { $read_more = $this->modify_read_more_link(); $text = str_replace( '', '', $text ); return $text . $read_more; } /** * Modify the exceprt length. * * @since 1.0 * @access public * @return void */ function custom_excerpt_length( $length ) { $excerpt_length = intval( hoot_get_mod('excerpt_length') ); if ( !empty( $excerpt_length ) ) return $excerpt_length; return 105; } } // end class } // end if