diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index 696c5431e4f51..91c9ecbb8adad 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -624,3 +624,25 @@ function twentysixteen_widget_tag_cloud_args( $args ) { return $args; } add_filter( 'widget_tag_cloud_args', 'twentysixteen_widget_tag_cloud_args' ); + +/** + * Registers Custom Block Styles. + * + * @since Twenty Sixteen 3.9 + */ +if ( function_exists( 'register_block_style' ) ) { + function twentysixteen_register_block_styles() { + + // Add a control for the user to select text alignment. + // @ticket 65111 + register_block_style( + 'core/image', + array( + 'name' => 'caption-center', + 'label' => __( 'Text align center', 'twentysixteen' ), + 'inline_style' => '.wp-block-image.is-style-caption-center figcaption { text-align: center; }', + ) + ); + } + add_action( 'init', 'twentysixteen_register_block_styles' ); +}