CoreFiles by mySites.guru
shortcode.php32 lines, 678 bytes, from wordpress-5.2.30.zip
Raw History Compare with 5.2.29
md5
6da2b6fc9b79aac7a88ba1fcaf8e4533
sha1
44af4b066cdf07b3e533a9650bbe979db853b32e
sha256
2581d34b1e33c0e8f7298f8f373becb5edd9867e0420943c5fa548734f4c24b2
<?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' );

The same content is in 112 releases, WordPress 5.0-RC2 to 5.2.30. See them all, or every version of this file.