WP_Post::filter

Advertisement

Summery Summery

{@Missing Summary}

Syntax Syntax

WP_Post::filter( string $filter )

Parameters Parameters

$filter

(string) (Required) Filter.

Return Return

(array|bool|object|WP_Post)

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 );
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.