関数 wp_trim_excerpt()
2014/12/10
関数 wp_trim_excerpt()
定義ファイル :/blog/wp-includes/formatting.php 9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function wp_trim_excerpt($text = '') { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); /** This filter is documented in wp-includes/post-template.php */ $text = apply_filters( 'the_content', $text ); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters( 'excerpt_length', 55 ); $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' ); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); } return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt ); } |