Make WordPress Core


Ignore:
Timestamp:
10/06/2023 02:04:22 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Editor: Move wp_navigation schema updating to WP_Navigation_Fallback class.

This aims to better align the navigation fallback implementation with core architecture and best practices.

The function that updates the wp_navigation post response schema is now a public method of the WP_Navigation_Fallback class, so an extra file previously used for that specific function is no longer necessary.

Follow-up to [56052].

Props ramonopoly, scruffian, isabel_brison, mukesh27, swissspidy, rajinsharwar, afercia, audrasjb, mikeschroder, JeffPaul, johnjamesjacoby, TimothyBlynJacobs, oglekler, SergeyBiryukov.
Fixes #58910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r56757 r56793  
    712712add_action( 'wp_loaded', '_add_template_loader_filters' );
    713713
     714// wp_navigation post type.
     715add_filter( 'rest_wp_navigation_item_schema', array( 'WP_Navigation_Fallback', 'update_wp_navigation_post_schema' ) );
     716
    714717// Fluid typography.
    715718add_filter( 'render_block', 'wp_render_typography_support', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.