CoreFiles by mySites.guru
site-tagline.php37 lines, 923 bytes, from wordpress-5.8-beta1.zip
Raw History Compare with 5.7-beta3
md5
6e079c64f435371764c4342fb62ad482
sha1
894b9ade9fb3d7648b4eba3732ff8d5ebe912308
sha256
c46d1d0a2e797474df0c2d18c2753b92130eb22cfc8f27cd86675944a85dec9f
<?php
/**
 * Server-side rendering of the `core/site-tagline` block.
 *
 * @package WordPress
 */

/**
 * Renders the `core/site-tagline` block on the server.
 *
 * @param array $attributes The block attributes.
 *
 * @return string The render.
 */
function render_block_core_site_tagline( $attributes ) {
	$align_class_name   = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );

	return sprintf(
		'<p %1$s>%2$s</p>',
		$wrapper_attributes,
		get_bloginfo( 'description' )
	);
}

/**
 * Registers the `core/site-tagline` block on the server.
 */
function register_block_core_site_tagline() {
	register_block_type_from_metadata(
		__DIR__ . '/site-tagline',
		array(
			'render_callback' => 'render_block_core_site_tagline',
		)
	);
}
add_action( 'init', 'register_block_core_site_tagline' );

The same content is in 2 releases, WordPress 5.8-beta1 to 5.8-beta2. See them all, or every version of this file.