Changeset 50419
- Timestamp:
- 02/23/2021 07:16:26 PM (4 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r49982 r50419 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 * @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. 24 * } 18 * @param array $args Optional. Array of block type arguments. Accepts any public property 19 * of `WP_Block_Type`. See WP_Block_Type::__construct() for information 20 * on accepted arguments. Default empty array. 25 21 * @return WP_Block_Type|false The registered block type on success, or false on failure. 26 22 */ … … 191 187 * @param string $file_or_folder Path to the JSON file with metadata definition for 192 188 * the block or path to the folder where the `block.json` file is located. 193 * @param array $args { 194 * Optional. Array of block type arguments. Accepts any public property of `WP_Block_Type`. 195 * Any arguments may be defined, however the ones described below are supported by default. 196 * Default empty array. 197 * 198 * @type callable $render_callback Callback used to render blocks of this block type. 199 * } 189 * @param array $args Optional. Array of block type arguments. Accepts any public property 190 * of `WP_Block_Type`. See WP_Block_Type::__construct() for information 191 * on accepted arguments. Default empty array. 200 192 * @return WP_Block_Type|false The registered block type on success, or false on failure. 201 193 */ -
trunk/src/wp-includes/class-wp-block-type-registry.php
r48629 r50419 35 35 * @since 5.0.0 36 36 * 37 * @see WP_Block_Type::__construct() 38 * 37 39 * @param string|WP_Block_Type $name Block type name including namespace, or alternatively 38 40 * a complete WP_Block_Type instance. In case a WP_Block_Type 39 41 * is provided, the $args parameter will be ignored. 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. 47 * } 42 * @param array $args Optional. Array of block type arguments. Accepts any public property 43 * of `WP_Block_Type`. See WP_Block_Type::__construct() for information 44 * on accepted arguments. Default empty array. 48 45 * @return WP_Block_Type|false The registered block type on success, or false on failure. 49 46 */ -
trunk/src/wp-includes/class-wp-block-type.php
r49224 r50419 34 34 35 35 /** 36 * Human-readable block type label. 37 * 36 38 * @since 5.5.0 37 39 * @var string … … 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 … … 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 … … 52 60 53 61 /** 62 * Block type icon. 63 * 54 64 * @since 5.5.0 55 65 * @var string|null … … 58 68 59 69 /** 70 * A detailed block type description. 71 * 60 72 * @since 5.5.0 61 73 * @var string … … 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 … … 70 85 71 86 /** 87 * The translation textdomain. 88 * 72 89 * @since 5.5.0 73 90 * @var string|null … … 76 93 77 94 /** 95 * Alternative block styles. 96 * 78 97 * @since 5.5.0 79 98 * @var array … … 82 101 83 102 /** 103 * Supported features. 104 * 84 105 * @since 5.5.0 85 106 * @var array|null … … 88 109 89 110 /** 111 * Structured data for the block preview. 112 * 90 113 * @since 5.5.0 91 114 * @var array|null … … 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|string $args { 193 * Optional. Array or string of arguments for registering a block type. Any arguments may be defined, 194 * however the ones described below are supported by default. Default empty array. 195 * 196 * 197 * @type string $title Human-readable block type label. 198 * @type string|null $category Block type category classification, used in 199 * search interfaces to arrange block types by category. 200 * @type array|null $parent Setting parent lets a block require that it is only 201 * available when nested within the specified blocks. 202 * @type string|null $icon Block type icon. 203 * @type string $description A detailed block type description. 204 * @type array $keywords Additional keywords to produce block type as 205 * result in search interfaces. 206 * @type string|null $textdomain The translation textdomain. 207 * @type array $styles Alternative block styles. 208 * @type array|null $supports Supported features. 209 * @type array|null $example Structured data for the block preview. 210 * @type callable|null $render_callback Block type render callback. 211 * @type array|null $attributes Block type attributes property schemas. 212 * @type array $uses_context Context values inherited by blocks of this type. 213 * @type array|null $provides_context Context provided by blocks of this type. 214 * @type string|null $editor_script Block type editor script handle. 215 * @type string|null $script Block type front end script handle. 216 * @type string|null $editor_style Block type editor style handle. 217 * @type string|null $style Block type front end style handle. 218 * } 171 219 */ 172 220 public function __construct( $block_type, $args = array() ) { … … 260 308 * 261 309 * @param array|string $args Array or string of arguments for registering a block type. 310 * See WP_Block_Type::__construct() for information on accepted arguments. 262 311 */ 263 312 public function set_props( $args ) {
Note: See TracChangeset
for help on using the changeset viewer.