WP_Post::filter( string $filter )
{@Missing Summary}
Parameters
- $filter
-
(Required) Filter.
Return
(self|array|bool|object|WP_Post)
Source
File: wp-includes/class-wp-post.php
public function filter( $filter ) {
if ( $this->filter == $filter )
return $this;
if ( $filter == 'raw' )
return self::get_instance( $this->ID );
return sanitize_post( $this, $filter );
}
Changelog
Version | Description |
---|---|
WP-3.5.0 | Introduced. |