WP_REST_Revisions_Controller::prepare_excerpt_response

Advertisement

Summery Summery

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

Syntax Syntax

WP_REST_Revisions_Controller::prepare_excerpt_response( string $excerpt, WP_Post $post )

Parameters Parameters

$excerpt

(string) (Required) The post excerpt.

$post

(WP_Post) (Required) Post revision object.

Return Return

(string) Prepared excerpt or empty string.

Source Source

File: wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

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

		return $excerpt;
	}
}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

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