Set image at center snippet doesn’t work after 6.4 update
-
I’ve been using below code snippet to set images automatically aligned at center upon upload, but after 6.4 update, I have an error on post edit page.
// changing default gutenberg image block alignment to "center" function change_default_gutenberg_image_block_options (){ $block_type = WP_Block_Type_Registry::get_instance()->get_registered( "core/image" ); $block_type->attributes['align']['default'] = 'center'; } add_action( 'init', 'change_default_gutenberg_image_block_options');
I guess one of the functions does not work with updated wordpress.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Set image at center snippet doesn’t work after 6.4 update’ is closed to new replies.