wp_make_content_images_responsive
函数
wp_make_content_images_responsive ( $content )
- 参数
-
-
(string)
$content
The raw post content to be filtered.- Required: 是
-
(string)
- 返回值
-
- (string) Converted content with ‘srcset’ and ‘sizes’ attributes added to images.
- 相关
-
- wp_image_add_srcset_and_sizes()
- 定义位置
-
-
wp-includes/deprecated.php
, line 3995
-
wp-includes/deprecated.php
- 引入
- 4.4.0
- 弃用
- 5.5.0
过滤文章内容中的’img’元素,添加’srcset’和’size’属性。
function wp_make_content_images_responsive( $content ) { _deprecated_function( __FUNCTION__, '5.5.0', 'wp_filter_content_tags()' ); // This will also add the `loading` attribute to `img` tags, if enabled. return wp_filter_content_tags( $content ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。