CoreFiles by mySites.guru
shortcode.php32 lines, 678 bytes, from wordpress-5.0-beta1.zip
Raw History Compare with 4.9.8-beta2
md5
71149fe371c25ca568a2602e002b3f08
sha1
1672bf756204951b2b6431d2ff24aaf75b7f4d62
sha256
0d897bc62901a484fadc0c83e4c1c2b8dba41ebc56d3e4bb2ee930d2fb363218
<?php
/**
 * Server-side rendering of the `core/shortcode` block.
 *
 * @package gutenberg
 */

/**
 * 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 6 releases, WordPress 5.0-beta1 to 5.0-RC1. See them all, or every version of this file.