Make WordPress Core


Ignore:
Timestamp:
07/07/2023 07:27:53 AM (2 years ago)
Author:
isabel_brison
Message:

Editor: rename sync_status and move it to top level.

Renames sync_status to wp_pattern_sync_status and moves it to top level field of wp_block post type.

Props glendaviesnz, aaronrobertshaw, mukesh27, peterwilsoncc.
Fixes 58677.

File:
1 edited

Legend:

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

    r56093 r56160  
    4141     *
    4242     * @since 5.0.0
     43     * @since 6.3 Adds the `wp_pattern_sync_status` postmeta property to the top level of response.
    4344     *
    4445     * @param array  $data    Response data to filter.
     
    5758        unset( $data['content']['rendered'] );
    5859
     60        // Add the core wp_pattern_sync_status meta as top level property to the response.
     61        $data['wp_pattern_sync_status'] = isset( $data['meta']['wp_pattern_sync_status'] ) ? $data['meta']['wp_pattern_sync_status'] : '';
     62        unset( $data['meta']['wp_pattern_sync_status'] );
    5963        return $data;
    6064    }
Note: See TracChangeset for help on using the changeset viewer.