mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 20:15:08 +00:00
Update packages: - @wordpress/block-library@2.2.8 - @wordpress/components@7.0.3 - @wordpress/edit-post@3.1.3 - @wordpress/editor@9.0.3 - @wordpress/format-library@1.2.6 - @wordpress/list-reusable-blocks@1.1.16 - @wordpress/nux@3.0.4 Other changes: Fix a translator comment in edit-form-blocks.php. Rename the gutenberg_ functions in blocks/latest-comments.php. Props pento. Fixes #45145. Built from https://develop.svn.wordpress.org/branches/5.0@43949 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
33 lines
678 B
PHP
33 lines
678 B
PHP
<?php
|
|
/**
|
|
* Server-side rendering of the `core/shortcode` block.
|
|
*
|
|
* @package WordPress
|
|
*/
|
|
|
|
/**
|
|
* Performs wpautop() on the shortcode block content.
|
|
*
|
|
* @param array $attributes The block attributes.
|
|
* @param string $content The block content.
|
|
*
|
|
* @return string Returns the block content.
|
|
*/
|
|
function render_block_core_shortcode( $attributes, $content ) {
|
|
return wpautop( $content );
|
|
}
|
|
|
|
/**
|
|
* Registers the `core/shortcode` block on server.
|
|
*/
|
|
function register_block_core_shortcode() {
|
|
register_block_type(
|
|
'core/shortcode',
|
|
array(
|
|
'render_callback' => 'render_block_core_shortcode',
|
|
)
|
|
);
|
|
}
|
|
|
|
add_action( 'init', 'register_block_core_shortcode' );
|