Make WordPress Core


Ignore:
Timestamp:
06/29/2023 06:47:43 AM (19 months ago)
Author:
isabel_brison
Message:

REST API: updates test annotations for global styles revisions

Adds @covers annotations to tests and fixes incorrect spacing.

Props ramonopoly, mukesh27.
See #58524.

File:
1 edited

Legend:

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

    r56082 r56105  
    436436
    437437        if ( post_type_supports( $this->post_type, 'revisions' ) ) {
    438             $revisions       = wp_get_latest_revision_id_and_total_count( $id );
    439             $revisions_count = ! is_wp_error( $revisions ) ? $revisions['count'] : 0;
    440             $revisions_base  = sprintf( '/%s/%d/revisions', $base, $id );
     438            $revisions                = wp_get_latest_revision_id_and_total_count( $id );
     439            $revisions_count          = ! is_wp_error( $revisions ) ? $revisions['count'] : 0;
     440            $revisions_base           = sprintf( '/%s/%d/revisions', $base, $id );
    441441            $links['version-history'] = array(
    442442                'href'  => rest_url( $revisions_base ),
Note: See TracChangeset for help on using the changeset viewer.