WordPress at a glance
function is not described

WP_Post::filter() public WP 3.5.0

{@Missing Summary}

{} It's a method of the class: WP_Post{}

No Hooks.

Return

WP_Post. Nothing.

Usage

$WP_Post = new WP_Post();
$WP_Post->filter( $filter );
$filter(string) (required)
Filter.

Changelog

Since 3.5.0 Introduced.

Code of WP_Post::filter() WP 5.7.2

<?php
public function filter( $filter ) {
	if ( $this->filter === $filter ) {
		return $this;
	}

	if ( 'raw' === $filter ) {
		return self::get_instance( $this->ID );
	}

	return sanitize_post( $this, $filter );
}