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

(Required) The post excerpt.

$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