Make WordPress Core

Changeset 56793

Timestamp:
10/06/2023 02:04:22 PM (10 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.

Location:
trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update-core.php

    r56727 r56793  
    868868    'wp-includes/wlwmanifest.xml',
    869869    'wp-includes/random_compat',
     870
     871
    870872);
    871873
  • trunk/src/wp-includes/class-wp-navigation-fallback.php

    r56559 r56793  
    1919
    2020    /**
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
    2165     * Gets (and/or creates) an appropriate fallback Navigation Menu.
    2266     *
     
    2670     */
    2771    public static function get_fallback() {
    28 
    2972        /**
    3073         * Filters whether or not a fallback should be created.
  • trunk/src/wp-includes/default-filters.php

    r56757 r56793  
    712712add_action( 'wp_loaded', '_add_template_loader_filters' );
    713713
     714
     715
     716
    714717// Fluid typography.
    715718add_filter( 'render_block', 'wp_render_typography_support', 10, 2 );
  • trunk/src/wp-settings.php

    r56614 r56793  
    355355require ABSPATH . WPINC . '/block-supports/typography.php';
    356356require ABSPATH . WPINC . '/block-supports/settings.php';
    357 require ABSPATH . WPINC . '/navigation-fallback.php';
    358357require ABSPATH . WPINC . '/style-engine.php';
    359358require ABSPATH . WPINC . '/style-engine/class-wp-style-engine.php';
  • trunk/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php

    r56548 r56793  
    153153     * @ticket 58557
    154154     *
    155      * @covers ::wp_add_fields_to_navigation_fallback_embedded_links
     155     * @covers
    156156     *
    157157     * @since 6.3.0 Added Navigation Fallbacks endpoint.
Note: See TracChangeset for help on using the changeset viewer.