wp-content/plugins/js_composer/include/classes/core/class-vc-base.php
/**
	 * Builds excerpt for post from content.
	 *
	 * Hooked class method by the_excerpt WP filter. When user creates content with VC all content is always wrapped by
	 * shortcodes. This methods calls do_shortcode for post's content and then creates a new excerpt.
	 *
	 * @since  4.2
	 * @access public
	 *
	 * @param $output
	 *
	 * @return string
	 */
Builds excerpt for post from content.
Hooked class method by the_excerpt WP filter. When user creates content with VC all content is always wrapped by
shortcodes. This methods calls do_shortcode for post's content and then creates a new excerpt.



@param $output

@return string
Builds excerpt for post from content . Hooked class method by the_excerpt WP filter . When user creates content with VC all content is always wrapped by shortcodes . This methods calls do_shortcode for post ' s content and then creates a new excerpt . @param $output @return string
public function excerptFilter( $output ) {
		global $post;
		if ( empty( $output ) && ! empty( $post->post_content ) ) {
			$text = strip_tags( do_shortcode( $post->post_content ) );
			$excerpt_length = apply_filters( 'excerpt_length', 55 );
			$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[...]' );
			$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
			return $text;
		}
		return $output;
	}
public function excerptFilter ( $ output ) { global $ post ; if ( empty ( $ output ) && ! empty ( $ post -> post_content ) ) { $ text = strip_tags ( do_shortcode ( $ post -> post_content ) ) ; $ excerpt_length = apply_filters ( 'excerpt_length' , 55 ) ; $ excerpt_more = apply_filters ( 'excerpt_more' , ' ' . '[...]' ) ; $ text = wp_trim_words ( $ text , $ excerpt_length , $ excerpt_more ) ; return $ text ; } return $ output ; }
Builds excerpt for post from content.
Builds excerpt for post from content .