Skip to content

Commit c849778

Browse files
committed
Docs: Improve docblock for WP_REST_Template_Revisions_Controller::get_parent().
Props rockfire. See #60699, #61113. git-svn-id: https://develop.svn.wordpress.org/trunk@58156 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1975c20 commit c849778

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ public function register_routes() {
156156
}
157157

158158
/**
159-
* Gets the parent post, if the ID is valid.
159+
* Gets the parent post, if the template ID is valid.
160160
*
161161
* @since 6.4.0
162162
*
163-
* @param int $parent_post_id Supplied ID.
163+
* @param string $parent_template_id Supplied ID.
164164
* @return WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise.
165165
*/
166-
protected function get_parent( $parent_post_id ) {
167-
$template = get_block_template( $parent_post_id, $this->parent_post_type );
166+
protected function get_parent( $parent_template_id ) {
167+
$template = get_block_template( $parent_template_id, $this->parent_post_type );
168168

169169
if ( ! $template ) {
170170
return new WP_Error(

0 commit comments

Comments
 (0)