Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Add 'OPTIONS /page' to preloaded paths #64890

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/compat/wordpress-6.7/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
if ( false !== $parts_key ) {
$paths[ $parts_key ] = '/wp/v2/types/wp_template_part?context=edit';
}

$page_options_path = array( rest_get_route_for_post_type_items( 'page' ), 'OPTIONS' );
$page_options_key = array_search( $page_options_path, $paths, true );
if ( false === $page_options_key ) {
$paths[] = $page_options_path;
};

Check warning on line 32 in lib/compat/wordpress-6.7/rest-api.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Empty PHP statement detected: superfluous semicolon.
Mamaduka marked this conversation as resolved.
Show resolved Hide resolved
}

if ( 'core/edit-post' === $context->name ) {
Expand Down
Loading