. add_theme_support( 'automatic-feed-links' ); /** Hoot Extensions **/ // Enable custom widgets add_theme_support( 'hoot-core-widgets' ); // Pagination. add_theme_support( 'loop-pagination' ); // Nicer [gallery] shortcode implementation. add_theme_support( 'cleaner-gallery' ); // Better captions for themes to style. add_theme_support( 'cleaner-caption' ); } /** * 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.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.0 * @access public * @return void */ function content_width() { $width = intval( hoot_get_option( 'site_width' ) ); $width = !empty( $width ) ? $width : 1260; hoot_set_content_width( $width ); } /** * Modify the '[...]' Read More Text * * @since 1.0.0 * @access public * @return void */ function modify_read_more_link( $more = '[...]' ) { $read_more = hoot_get_option('read_more'); $read_more = ( empty( $read_more ) ) ? sprintf( __( 'Read More %s', 'chromatic' ), '→' ) : $read_more; global $post; return '' . $read_more . ''; } /** * Modify the exceprt length. * * @since 1.0.0 * @access public * @return void */ function custom_excerpt_length( $length ) { $excerpt_length = intval( hoot_get_option('excerpt_length') ); if ( !empty( $excerpt_length ) ) return $excerpt_length; return 105; } } }