WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code | 
|---|---|
| 1861 |                /** | 
| 1862 |                 * Filters an img tag within the content for a given context. | 
| 1863 |                 * | 
| 1864 |                 * @since 6.0.0 | 
| 1865 |                 * | 
| 1866 |                 * @param string $filtered_image Full img tag with attributes that will replace the source img tag. | 
| 1867 |                 * @param string $context        Additional context, like the current filter name or the function name from where this was called. | 
| 1868 |                 * @param int    $attachment_id  The image attachment ID. May be 0 in case the image is not an attachment. | 
| 1869 |                 */ | 
| 1870 |                $filtered_image = apply_filters( 'wp_content_img_tag', $filtered_image, $context, $attachment_id ); | 
| 1871 |  | 
| 1872 |                if ( $filtered_image !== $match[0] ) { | 
| 1873 |                     $content = str_replace( $match[0], $filtered_image, $content ); | 
| 1874 |                } | 
| 1875 |  | 
| 1876 |                /* | 
| 1877 |                 * Unset image lookup to not run the same logic again unnecessarily if the same image tag is used more than | 
| 1878 |                 * once in the same blob of content. | 
| 1879 |                 */ |