This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_filter_do_shortcode_context()
Filter the wp_get_attachment_image_context
hook during shortcode rendering.
Description
When wp_get_attachment_image() is called during shortcode rendering, we need to make clear that the context is a shortcode and not part of the theme’s template rendering logic.
Return
(string) The filtered context value for wp_get_attachment_images when doing shortcodes.
Source
File: wp-includes/shortcodes.php
global $shortcode_tags;
if ( empty( $tagnames ) ) {
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |