Ticket #48640: 48640-2.diff
File 48640-2.diff, 9.4 KB (added by , 4 years ago) |
---|
-
src/wp-includes/blocks.php
diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index dfe642ab82..95a3198df3 100644
a b 16 16 * a complete WP_Block_Type instance. In case a WP_Block_Type 17 17 * is provided, the $args parameter will be ignored. 18 18 * @param array $args { 19 * Optional. Array of block type arguments. Accepts any public property of `WP_Block_Type`. 20 * Any arguments may be defined, however the ones described below are supported by default. 21 * Default empty array. 22 * 23 * @type callable $render_callback Callback used to render blocks of this block type. 19 * Optional. Array of block type arguments. Any arguments may be defined, however the 20 * ones described below are supported by default. Default empty array. 21 * 22 * @type string $title Human-readable block type label. 23 * @type string|null $category Block type category classification, used in 24 * search interfaces to arrange block types by category. 25 * @type array|null $parent Setting parent lets a block require that it is only 26 * available when nested within the specified blocks. 27 * @type string|null $icon Block type icon. 28 * @type string $description A detailed block type description. 29 * @type array $keywords Additional keywords to produce block type as 30 * result in search interfaces. 31 * @type string|null $textdomain The translation textdomain. 32 * @type array $styles Alternative block styles. 33 * @type array|null $supports Supported features. 34 * @type array|null $example Structured data for the block preview. 35 * @type callable $render_callback Block type render callback. 36 * @type array|null $attributes Block type attributes property schemas. 37 * @type array $uses_context Context values inherited by blocks of this type. 38 * @type array|null $provides_context Context provided by blocks of this type. 39 * @type string|null $editor_script Block type editor script handle. 40 * @type string|null $script Block type front end script handle. 41 * @type string|null $editor_style Block type editor style handle. 42 * @type string|null $style Block type front end style handle. 24 43 * } 25 44 * @return WP_Block_Type|false The registered block type on success, or false on failure. 26 45 */ -
src/wp-includes/class-wp-block-type-registry.php
diff --git a/src/wp-includes/class-wp-block-type-registry.php b/src/wp-includes/class-wp-block-type-registry.php index e11cb9911a..a2bcb605ef 100644
a b final class WP_Block_Type_Registry { 38 38 * a complete WP_Block_Type instance. In case a WP_Block_Type 39 39 * is provided, the $args parameter will be ignored. 40 40 * @param array $args { 41 * Optional. Array of block type arguments. Accepts any public property of `WP_Block_Type`. 42 * Any arguments may be defined, however the ones described below are supported by default. 43 * Default empty array. 44 * 45 * @type callable $render_callback Callback used to render blocks of this block type. 46 * @type array $attributes Block attributes mapping, property name to schema. 41 * Optional. Array of block type arguments. Any arguments may be defined, however the 42 * ones described below are supported by default. Default empty array. 43 * 44 * @type string $title Human-readable block type label. 45 * @type string|null $category Block type category classification, used in 46 * search interfaces to arrange block types by category. 47 * @type array|null $parent Setting parent lets a block require that it is only 48 * available when nested within the specified blocks. 49 * @type string|null $icon Block type icon. 50 * @type string $description A detailed block type description. 51 * @type array $keywords Additional keywords to produce block type as 52 * result in search interfaces. 53 * @type string|null $textdomain The translation textdomain. 54 * @type array $styles Alternative block styles. 55 * @type array|null $supports Supported features. 56 * @type array|null $example Structured data for the block preview. 57 * @type callable $render_callback Block type render callback. 58 * @type array|null $attributes Block type attributes property schemas. 59 * @type array $uses_context Context values inherited by blocks of this type. 60 * @type array|null $provides_context Context provided by blocks of this type. 61 * @type string|null $editor_script Block type editor script handle. 62 * @type string|null $script Block type front end script handle. 63 * @type string|null $editor_style Block type editor style handle. 64 * @type string|null $style Block type front end style handle. 47 65 * } 48 66 * @return WP_Block_Type|false The registered block type on success, or false on failure. 49 67 */ -
src/wp-includes/class-wp-block-type.php
diff --git a/src/wp-includes/class-wp-block-type.php b/src/wp-includes/class-wp-block-type.php index 572c3c39c1..1b91ad9652 100644
a b class WP_Block_Type { 25 25 public $name; 26 26 27 27 /** 28 * Human-readable block type label. 29 * 28 30 * @since 5.5.0 29 31 * @var string 30 32 */ 31 33 public $title = ''; 32 34 33 35 /** 36 * Block type category classification, used in search interfaces 37 * to arrange block types by category. 38 * 34 39 * @since 5.5.0 35 40 * @var string|null 36 41 */ 37 42 public $category = null; 38 43 39 44 /** 45 * Setting parent lets a block require that it is only available 46 * when nested within the specified blocks. 47 * 40 48 * @since 5.5.0 41 49 * @var array|null 42 50 */ 43 51 public $parent = null; 44 52 45 53 /** 54 * Block type icon. 55 * 46 56 * @since 5.5.0 47 57 * @var string|null 48 58 */ 49 59 public $icon = null; 50 60 51 61 /** 62 * A detailed block type description. 63 * 52 64 * @since 5.5.0 53 65 * @var string 54 66 */ 55 67 public $description = ''; 56 68 57 69 /** 70 * Additional keywords to produce block type as result 71 * in search interfaces. 72 * 58 73 * @since 5.5.0 59 74 * @var array 60 75 */ 61 76 public $keywords = array(); 62 77 63 78 /** 79 * The translation textdomain. 80 * 64 81 * @since 5.5.0 65 82 * @var string|null 66 83 */ 67 84 public $textdomain = null; 68 85 69 86 /** 87 * Alternative block styles. 88 * 70 89 * @since 5.5.0 71 90 * @var array 72 91 */ 73 92 public $styles = array(); 74 93 75 94 /** 95 * Supported features. 96 * 76 97 * @since 5.5.0 77 98 * @var array|null 78 99 */ 79 100 public $supports = null; 80 101 81 102 /** 103 * Structured data for the block preview. 104 * 82 105 * @since 5.5.0 83 106 * @var array|null 84 107 */ … … class WP_Block_Type { 158 181 * @see register_block_type() 159 182 * 160 183 * @param string $block_type Block type name including namespace. 161 * @param array|string $args Optional. Array or string of arguments for registering a block type. 162 * Default empty array. 184 * @param array $args { 185 * Optional. Array of block type arguments. Any arguments may be defined, however the 186 * ones described below are supported by default. Default empty array. 187 * 188 * @type string $title Human-readable block type label. 189 * @type string|null $category Block type category classification, used in 190 * search interfaces to arrange block types by category. 191 * @type array|null $parent Setting parent lets a block require that it is only 192 * available when nested within the specified blocks. 193 * @type string|null $icon Block type icon. 194 * @type string $description A detailed block type description. 195 * @type array $keywords Additional keywords to produce block type as 196 * result in search interfaces. 197 * @type string|null $textdomain The translation textdomain. 198 * @type array $styles Alternative block styles. 199 * @type array|null $supports Supported features. 200 * @type array|null $example Structured data for the block preview. 201 * @type callable $render_callback Block type render callback. 202 * @type array|null $attributes Block type attributes property schemas. 203 * @type array $uses_context Context values inherited by blocks of this type. 204 * @type array|null $provides_context Context provided by blocks of this type. 205 * @type string|null $editor_script Block type editor script handle. 206 * @type string|null $script Block type front end script handle. 207 * @type string|null $editor_style Block type editor style handle. 208 * @type string|null $style Block type front end style handle. 209 * } 163 210 */ 164 211 public function __construct( $block_type, $args = array() ) { 165 212 $this->name = $block_type;