Skip to content
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.

get_image_tag filter removed #15

Open
ChrisBAshton opened this issue Dec 10, 2018 · 1 comment
Open

get_image_tag filter removed #15

ChrisBAshton opened this issue Dec 10, 2018 · 1 comment

Comments

@ChrisBAshton
Copy link

The get_image_tag filter no longer exists in Gutenberg.

add_filter('get_image_tag', 'show_post_image_source', 0, 5);
function show_post_image_source($html, $post_id, $post_thumbnail_id, $size, $attr) {
    die('hellooooo');
    return $html;
}

...site never dies. Anyone know the equivalent in Gutenberg?

@ChrisBAshton
Copy link
Author

Ah, this is probably because I'm used to embedding images inline in the main body.

In the new Gutenberg block world, images are their own block, and get_image_tag appears only to run inside a Paragraph (richtext) block.

The new image block APIs are described at https://wordpress.org/gutenberg/handbook/designers-developers/developers/filters/block-filters/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant