-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled laterUsed to indicate that the issue at hand isn't a top priority to address and can be handled later[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
Really minor issue but the option image_default_link_type isn't applied to the media & block.
The site-wide option image_default_link_type; when its value is set to file, the image block (and the gallery block) automatically links to the full-size file immediately after the image is selected in the media library or uploaded; without any further action by the content editor, as shown below.
This behavior doesn't happen in the media & text block although you could expect it to.
This discrepancy is probably a result of the media & text block not being an image block inside of it.
Step-by-step reproduction instructions
- set the option so that images are automatically linked to the full image file by default:
in wp-cliwp option update image_default_link_type file
could be done in a theme
with (I didn't verify that this callback function works)
add_action( 'after_setup_theme', function() {
update_option( 'image_default_link_type', 'file' );
});
- add media and text block;
- within it, upload a new image or select image from image library
- go to the block's toolbar and open the link button
Screenshots, screen recording, code snippet
No response
Environment info
WP 6.4;
Gutenberg 17.9
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled laterUsed to indicate that the issue at hand isn't a top priority to address and can be handled later[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
