WordPress开发者和主题制作者的搜索引擎



the_preview ›

Since2.7.0
已弃用n/a
apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this )
参数: (2)
  • (WP_Post) $post_preview The Post object.
    Required: Yes
  • (WP_Query) $this The WP_Query instance (passed by reference).
    Required: Yes
定义在:
文档:

Filters the single post for preview mode.





源码

$this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) );