WordPress at a glance
функция не описана

WP_REST_Revisions_Controller::prepare_excerpt_response() protected WP 4.7.0

Checks the post excerpt and prepare it for single post output.

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

Hooks from the method
Возвращает

String. Prepared excerpt or empty string.

Использование

// protected - for code of main (parent) or child class
$result = $this->prepare_excerpt_response( $excerpt, $post );
$excerpt(string) (required)
The post excerpt.
$post(WP_Post) (required)
Post revision object.

Changelog

Since 4.7.0 Introduced.

Код WP_REST_Revisions_Controller::prepare_excerpt_response() WP 5.5.1

<?php
protected function prepare_excerpt_response( $excerpt, $post ) {

	/** This filter is documented in wp-includes/post-template.php */
	$excerpt = apply_filters( 'the_excerpt', $excerpt, $post );

	if ( empty( $excerpt ) ) {
		return '';
	}

	return $excerpt;
}