Ticket #48640: 48640.4.diff
File 48640.4.diff, 9.5 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 9cfbfdb5dc..883699d4a0 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|null $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..4b42704f6e 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|null $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 7687d2b931..74d532bb77 100644
a b class WP_Block_Type { 33 33 public $name; 34 34 35 35 /** 36 * Human-readable block type label. 37 * 36 38 * @since 5.5.0 37 39 * @var string 38 40 */ 39 41 public $title = ''; 40 42 41 43 /** 44 * Block type category classification, used in search interfaces 45 * to arrange block types by category. 46 * 42 47 * @since 5.5.0 43 48 * @var string|null 44 49 */ 45 50 public $category = null; 46 51 47 52 /** 53 * Setting parent lets a block require that it is only available 54 * when nested within the specified blocks. 55 * 48 56 * @since 5.5.0 49 57 * @var array|null 50 58 */ 51 59 public $parent = null; 52 60 53 61 /** 62 * Block type icon. 63 * 54 64 * @since 5.5.0 55 65 * @var string|null 56 66 */ 57 67 public $icon = null; 58 68 59 69 /** 70 * A detailed block type description. 71 * 60 72 * @since 5.5.0 61 73 * @var string 62 74 */ 63 75 public $description = ''; 64 76 65 77 /** 78 * Additional keywords to produce block type as result 79 * in search interfaces. 80 * 66 81 * @since 5.5.0 67 82 * @var array 68 83 */ 69 84 public $keywords = array(); 70 85 71 86 /** 87 * The translation textdomain. 88 * 72 89 * @since 5.5.0 73 90 * @var string|null 74 91 */ 75 92 public $textdomain = null; 76 93 77 94 /** 95 * Alternative block styles. 96 * 78 97 * @since 5.5.0 79 98 * @var array 80 99 */ 81 100 public $styles = array(); 82 101 83 102 /** 103 * Supported features. 104 * 84 105 * @since 5.5.0 85 106 * @var array|null 86 107 */ 87 108 public $supports = null; 88 109 89 110 /** 111 * Structured data for the block preview. 112 * 90 113 * @since 5.5.0 91 114 * @var array|null 92 115 */ … … class WP_Block_Type { 166 189 * @see register_block_type() 167 190 * 168 191 * @param string $block_type Block type name including namespace. 169 * @param array|string $args Optional. Array or string of arguments for registering a block type. 170 * Default empty array. 192 * @param array $args { 193 * Optional. Array of block type arguments. Any arguments may be defined, however the 194 * ones described below are supported by default. Default empty array. 195 * 196 * @type string $title Human-readable block type label. 197 * @type string|null $category Block type category classification, used in 198 * search interfaces to arrange block types by category. 199 * @type array|null $parent Setting parent lets a block require that it is only 200 * available when nested within the specified blocks. 201 * @type string|null $icon Block type icon. 202 * @type string $description A detailed block type description. 203 * @type array $keywords Additional keywords to produce block type as 204 * result in search interfaces. 205 * @type string|null $textdomain The translation textdomain. 206 * @type array $styles Alternative block styles. 207 * @type array|null $supports Supported features. 208 * @type array|null $example Structured data for the block preview. 209 * @type callable|null $render_callback Block type render callback. 210 * @type array|null $attributes Block type attributes property schemas. 211 * @type array $uses_context Context values inherited by blocks of this type. 212 * @type array|null $provides_context Context provided by blocks of this type. 213 * @type string|null $editor_script Block type editor script handle. 214 * @type string|null $script Block type front end script handle. 215 * @type string|null $editor_style Block type editor style handle. 216 * @type string|null $style Block type front end style handle. 217 * } 171 218 */ 172 219 public function __construct( $block_type, $args = array() ) { 173 220 $this->name = $block_type;