WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/01/2020 12:25:34 PM (17 months ago)
Author:
gziolo
Message:

Add fields to WP_Block_Type

As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them.

Props spacedmonkey, aduth.

Fixes #48529.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r47122 r47875  
    826826        $name     = 'core/test';
    827827        $settings = array(
     828            'category'        => 'common',
    828829            'icon'            => 'text',
    829830            'render_callback' => 'foo',
     
    837838
    838839        $this->assertArrayHasKey( $name, $blocks );
    839         $this->assertSame( array( 'icon' => 'text' ), $blocks[ $name ] );
     840        $this->assertEquals( array(
     841            'title'       => '',
     842            'description' => '',
     843            'category'    => 'common',
     844            'icon'        => 'text',
     845            'keywords'    => array(),
     846            'supports'    => array(),
     847            'styles'      => array(),
     848        ), $blocks[ $name ] );
    840849    }
    841850
Note: See TracChangeset for help on using the changeset viewer.