get( 'Version' ) ); } endif; add_action( 'wp_enqueue_scripts', 'twentytwentyfive_enqueue_styles' ); // Registers custom block styles. if ( ! function_exists( 'twentytwentyfive_block_styles' ) ) : /** * Registers custom block styles. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_block_styles() { register_block_style( 'core/list', array( 'name' => 'checkmark-list', 'label' => __( 'Checkmark', 'twentytwentyfive' ), 'inline_style' => ' ul.is-style-checkmark-list { list-style-type: "\2713"; } ul.is-style-checkmark-list li { padding-inline-start: 1ch; }', ) ); } endif; add_action( 'init', 'twentytwentyfive_block_styles' ); // Registers pattern categories. if ( ! function_exists( 'twentytwentyfive_pattern_categories' ) ) : /** * Registers pattern categories. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_pattern_categories() { register_block_pattern_category( 'twentytwentyfive_page', array( 'label' => __( 'Pages', 'twentytwentyfive' ), 'description' => __( 'A collection of full page layouts.', 'twentytwentyfive' ), ) ); register_block_pattern_category( 'twentytwentyfive_post-format', array( 'label' => __( 'Post format', 'twentytwentyfive' ), 'description' => __( 'A collection of post format patterns.', 'twentytwentyfive' ), ) ); } endif; add_action( 'init', 'twentytwentyfive_pattern_categories' ); // Registers block binding sources. if ( ! function_exists( 'twentytwentyfive_register_block_bindings' ) ) : /** * Registers the copyright block binding source. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_register_block_bindings() { register_block_bindings_source( 'twentytwentyfive/copyright', array( 'label' => _x( '© YEAR', 'Label for the copyright placeholder in the editor', 'twentytwentyfive' ), 'get_value_callback' => 'twentytwentyfive_copyright_binding', ) ); } endif; // Registers block binding callback function for the copyright. if ( ! function_exists( 'twentytwentyfive_copyright_binding' ) ) : /** * Callback function for the copyright block binding source. * * @since Twenty Twenty-Five 1.0 * * @return string Copyright text. */ function twentytwentyfive_copyright_binding() { $copyright_text = sprintf( /* translators: 1: Copyright symbol or word, 2: Year */ esc_html__( '%1$s %2$s', 'twentytwentyfive' ), '©', wp_date( 'Y' ) ); return $copyright_text; } endif; add_action( 'init', 'twentytwentyfive_register_block_bindings' );