Make WordPress Core

Changeset 58156


Ignore:
Timestamp:
05/15/2024 11:16:24 AM (8 months ago)
Author:
swissspidy
Message:

Docs: Improve docblock for WP_REST_Template_Revisions_Controller::get_parent().

Props rockfire.
See #60699, #61113.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php

    r56819 r58156  
    157157
    158158    /**
    159      * Gets the parent post, if the ID is valid.
    160      *
    161      * @since 6.4.0
    162      *
    163      * @param int $parent_post_id Supplied ID.
     159     * Gets the parent post, if the template ID is valid.
     160     *
     161     * @since 6.4.0
     162     *
     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 ) {
Note: See TracChangeset for help on using the changeset viewer.