_wp_preview_post_thumbnail_filter

Advertisement

Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Summery Summery

Filters post thumbnail lookup to set the post thumbnail.

Syntax Syntax

_wp_preview_post_thumbnail_filter( null|array|string $value, int $post_id, string $meta_key )

Parameters Parameters

$value

(null|array|string) (Required) The value to return - a single metadata value, or an array of values.

$post_id

(int) (Required) Post ID.

$meta_key

(string) (Required) Meta key.

Return Return

(null|array) The default return value or the post thumbnail meta array.

Source Source

File: wp-includes/revision.php

		}
	}

	return $terms;
}

/**
 * Filters post thumbnail lookup to set the post thumbnail.
 *
 * @since 4.6.0
 * @access private
 *
 * @param null|array|string $value    The value to return - a single metadata value, or an array of values.
 * @param int               $post_id  Post ID.
 * @param string            $meta_key Meta key.
 * @return null|array The default return value or the post thumbnail meta array.
 */
function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
	$post = get_post();
	if ( ! $post ) {
		return $value;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Advertisement

Leave a Reply

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