admin管理员组文章数量:1122832
I got the example straight out of the docs. brand new wp install, no plugins, no nuthin. It doesnt dump and it doesnt die().
functions.php:
function wpdocs_disable_upload_sizes( $sizes, $image_meta ) {
var_dump($sizes);
die('now im ded');
return $sizes;
}
add_filter( 'intermediate_image_sizes_advanced', 'wpdocs_disable_upload_sizes', 10, 2 );
I got the example straight out of the docs. brand new wp install, no plugins, no nuthin. It doesnt dump and it doesnt die().
functions.php:
function wpdocs_disable_upload_sizes( $sizes, $image_meta ) {
var_dump($sizes);
die('now im ded');
return $sizes;
}
add_filter( 'intermediate_image_sizes_advanced', 'wpdocs_disable_upload_sizes', 10, 2 );
Share
Improve this question
edited Jul 20, 2024 at 8:14
fuxia♦
107k38 gold badges255 silver badges459 bronze badges
asked Jul 20, 2024 at 2:48
Doug CassidyDoug Cassidy
5787 silver badges17 bronze badges
1 Answer
Reset to default 0Well, that sucked. Turns out those filters only run when you upload a media. So, if you want to see the $sizes, you need to upload something.
本文标签: imagesNeither intermediateimagesizesadvanced or intermediateimagesizes filter is firing
版权声明:本文标题:images - Neither intermediate_image_sizes_advanced or intermediate_image_sizes filter is firing 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300440a1930814.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论