__NAMESPACE__ . '\render_block' )
);
}
add_action( 'init', __NAMESPACE__ . '\register_block' );
/**
* Revue block render callback.
*
* @param array $attributes Array containing the Revue block attributes.
*
* @return string
*/
function render_block( $attributes ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
if ( current_user_can( 'manage_options' ) ) {
$message = esc_html__( 'Revue is shutting down. The Revue signup form will no longer be displayed to your visitors and as such this block should be removed.', 'jetpack' );
$message .= '
';
$message .= sprintf(
' %2$s',
esc_url( 'https://wordpress.com/go/digital-marketing/migrate-from-revue-newsletter/' ),
esc_html__( 'You can migrate from Revue to the WordPress.com Newsletter - find out more here.', 'jetpack' )
);
return Jetpack_Gutenberg::notice(
$message,
'warning',
Blocks::classes( FEATURE_NAME, $attributes )
);
}
}