admin管理员组文章数量:1130349
Sorry for the repeated questions but I didn't get any solution yet!
I'm stuck with that!!
I mange a multi writers blog, and all our users uploading some gallery images, and they didn't know the difference between (attachment, media file or none). I found solution to hide the linking panel, but I am editing all the published posts to change the gallery images link to file "manually". :(
Before WordPress version 5 I was linked all gallery images to "file" automatically by using this filter below.
add_filter( 'shortcode_atts_gallery',
function( $out ){
$out['link'] = 'file';
return $out;
}
);
But after WP 5+ how can I make it to work again? I really need to link all gallery images to "media file" automatically!
I hope someone will help me or even giving me the right way.
Thanks for your time.
Sorry for the repeated questions but I didn't get any solution yet!
I'm stuck with that!!
I mange a multi writers blog, and all our users uploading some gallery images, and they didn't know the difference between (attachment, media file or none). I found solution to hide the linking panel, but I am editing all the published posts to change the gallery images link to file "manually". :(
Before WordPress version 5 I was linked all gallery images to "file" automatically by using this filter below.
add_filter( 'shortcode_atts_gallery',
function( $out ){
$out['link'] = 'file';
return $out;
}
);
But after WP 5+ how can I make it to work again? I really need to link all gallery images to "media file" automatically!
I hope someone will help me or even giving me the right way.
Thanks for your time.
本文标签: phpHow to return output of the new wp gallery block for automatically Link images To Media file
版权声明:本文标题:php - How to return output of the new wp gallery block for automatically Link images To Media file 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749069328a2311328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论