Changeset 46111 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 09/14/2019 06:20:58 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r45393 r46111 357 357 return has_blocks( $content ) ? 1 : 0; 358 358 } 359 360 /** 361 * Registers a new block style. 362 * 363 * @since 5.3.0 364 * 365 * @param string $block_name Block type name including namespace. 366 * @param array $style_properties Array containing the properties of the style name, label, style (name of the stylesheet to be enqueued), inline_style (string containing the CSS to be added). 367 * 368 * @return boolean True if the block style was registered with success and false otherwise. 369 */ 370 function register_block_style( $block_name, $style_properties ) { 371 return WP_Block_Styles_Registry::get_instance()->register( $block_name, $style_properties ); 372 } 373 374 /** 375 * Unregisters a block style. 376 * 377 * @since 5.3.0 378 * 379 * @param string $block_name Block type name including namespace. 380 * @param array $block_style_name Block style name. 381 * 382 * @return boolean True if the block style was unregistered with success and false otherwise. 383 */ 384 function unregister_block_style( $block_name, $block_style_name ) { 385 return WP_Block_Styles_Registry::get_instance()->unregister( $block_name, $block_style_name ); 386 }
Note: See TracChangeset
for help on using the changeset viewer.