Make WordPress Core

Changeset 47176


Ignore:
Timestamp:
02/04/2020 08:14:50 PM (5 years ago)
Author:
jorgefilipecosta
Message:

Block Editor: Include navigation block server logic.

Core did not include the navigation block PHP files.
This commit fixes the issue referred, and now the navigation block is executed on the frontend. The block still does not work as expected and throws an error during frontend execution. That problem is going to be fixed on the next WordPress package update.
This commit adds the file as it is on the npm package used.

Props gziolo.
Fixes #49348.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r47149 r47176  
    264264require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
    265265require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
     266require( ABSPATH . WPINC . '/blocks/navigation.php' );
    266267require( ABSPATH . WPINC . '/blocks/rss.php' );
    267268require( ABSPATH . WPINC . '/blocks/search.php' );
  • trunk/tests/phpunit/includes/functions.php

    r47122 r47176  
    302302    remove_action( 'init', 'register_block_core_latest_comments' );
    303303    remove_action( 'init', 'register_block_core_latest_posts' );
     304    remove_action( 'init', 'register_block_core_navigation' );
    304305    remove_action( 'init', 'register_block_core_rss' );
    305306    remove_action( 'init', 'register_block_core_search' );
  • trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php

    r46586 r47176  
    127127            '/wp/v2/block-renderer/(?P<name>core/latest-comments)',
    128128            '/wp/v2/block-renderer/(?P<name>core/latest-posts)',
     129            '/wp/v2/block-renderer/(?P<name>core/navigation)',
    129130            '/wp/v2/block-renderer/(?P<name>core/rss)',
    130131            '/wp/v2/block-renderer/(?P<name>core/search)',
  • trunk/tests/qunit/fixtures/wp-api-generated.js

    r47035 r47176  
    46224622                            "default": [],
    46234623                            "description": "Attributes for core/latest-posts block",
     4624                            "type": "object"
     4625                        },
     4626                        "post_id": {
     4627                            "required": false,
     4628                            "description": "ID of the post context.",
     4629                            "type": "integer"
     4630                        }
     4631                    }
     4632                }
     4633            ]
     4634        },
     4635        "/wp/v2/block-renderer/(?P<name>core/navigation)": {
     4636            "namespace": "wp/v2",
     4637            "methods": [
     4638                "GET"
     4639            ],
     4640            "endpoints": [
     4641                {
     4642                    "methods": [
     4643                        "GET"
     4644                    ],
     4645                    "args": {
     4646                        "name": {
     4647                            "required": false,
     4648                            "description": "Unique registered name for the block.",
     4649                            "type": "string"
     4650                        },
     4651                        "context": {
     4652                            "required": false,
     4653                            "default": "view",
     4654                            "enum": [
     4655                                "edit"
     4656                            ],
     4657                            "description": "Scope under which the request is made; determines fields present in response.",
     4658                            "type": "string"
     4659                        },
     4660                        "attributes": {
     4661                            "required": false,
     4662                            "default": [],
     4663                            "description": "Attributes for core/navigation block",
    46244664                            "type": "object"
    46254665                        },
  • trunk/tools/webpack/packages.js

    r47168 r47176  
    102102        'latest-comments',
    103103        'latest-posts',
     104        'navigation',
    104105        'rss',
    105106        'search',
Note: See TracChangeset for help on using the changeset viewer.