WP_Post::filter( string $filter )

{@Missing Summary}


Parameters Parameters

$filter

(string) (Required) Filter.


Top ↑

Return Return

(WP_Post)


Top ↑

Source Source

File: wp-includes/class-wp-post.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 );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.