
如何修复MAMP本地环境phpMyAdmin不工作错误
get_the_excerpt ( $post = null )
get_the_excerpt: 这个函数检索当前文章或页面的摘录。它需要一个可选参数:摘录的最大字数。它以字符串形式返回摘录。
检索文章的摘录。
function get_the_excerpt( $post = null ) { if ( is_bool( $post ) ) { _deprecated_argument( __FUNCTION__, '2.3.0' ); } $post = get_post( $post ); if ( empty( $post ) ) { return ''; } if ( post_password_required( $post ) ) { return __( 'There is no excerpt because this is a protected post.' ); } /** * Filters the retrieved post excerpt. * * @since 1.2.0 * @since 4.5.0 Introduced the `$post` parameter. * * @param string $post_excerpt The post excerpt. * @param WP_Post $post Post object. */ return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ); }