'; } } function bizbuzz_slider_scripts() { wp_enqueue_style( 'bizbuzz-slick-style', get_template_directory_uri() . '/assets/plugins/slick/slick.css' ); wp_enqueue_style( 'bizbuzz-slick-theme-style', get_template_directory_uri() . '/assets/plugins/slick/slick-theme.css' ); wp_enqueue_script( 'bizbuzz-slick', get_template_directory_uri() . '/assets/plugins/slick/slick.min.js', array( 'jquery' ) ); } function bizbuzz_hide_home_content_callback( $hide ) { return bizbuzz_get_option( 'hide_home_content' ); } if ( ! function_exists( 'bizbuzz_excerpt_length_callback' ) ) : /** * Set excerpt length on archive page. * * @param int $length Number of words in the excerpt [content]. * @return int Length. */ function bizbuzz_excerpt_length_callback( $length ) { $excerpt_length = bizbuzz_get_option( 'excerpt_length' ); if ( ! empty( $excerpt_length ) ) { $length = $excerpt_length; } return apply_filters( 'bizbuzz_filter_excerpt_length', esc_attr( $length ) ); } endif; if ( ! function_exists( 'bizbuzz_excerpt_read_more' ) ) : /** * Implement read more in excerpt * * @since 1.0.0 * * @param string $more The string shown within the more link. * @return string The excerpt. */ function bizbuzz_excerpt_read_more( $more ) { $output = $more; $readmore_text = bizbuzz_get_option( 'readmore_text' ); if ( ! empty( $readmore_text ) ) { $output = ' ' . esc_html( $readmore_text ) . ''; $output = apply_filters( 'bizbuzz_filter_excerpt_read_more', $output ); } return $output; } endif; if ( ! function_exists( 'bizbuzz_content_more_link' ) ) : /** * Implement read more in content. * * @since 1.0.0 * * @param string $more Read More link element. * @param string $more_link_text Read More text. * @return string Link. */ function bizbuzz_content_more_link( $more, $more_link_text ) { $output = $more; $readmore_text = bizbuzz_get_option( 'readmore_text' ); if ( ! empty( $readmore_text ) ) { $output = str_replace( $more_link_text, esc_html( $readmore_text ), $more ); } return $output; } endif; if ( ! function_exists( 'bizbuzz_read_more_filters' ) ) { function bizbuzz_read_more_filters() { if ( is_home() || is_front_page() || is_category() || is_tag() || is_author() || is_date() ) { add_filter( 'excerpt_length', 'bizbuzz_excerpt_length_callback', 999 ); add_filter( 'excerpt_more', 'bizbuzz_excerpt_read_more' ); add_filter( 'the_content_more_link', 'bizbuzz_content_more_link', 10, 2 ); } } } add_filter( 'body_class', 'bizbuzz_body_classes' ); add_action( 'wp_head', 'bizbuzz_pingback_header' ); add_action( 'bizbuzz_action_additional_scripts', 'bizbuzz_slider_scripts' ); add_filter( 'bizbuzz_filter_hide_home_content', 'bizbuzz_hide_home_content_callback' ); add_action( 'wp', 'bizbuzz_read_more_filters' ); add_filter( 'post_class', 'bizbuzz_post_class', 10, 3 );