admin管理员组

文章数量:1392105

The new version of WP wraps all images put into a post with a figure element, instead of a href. I tried to use this hook in my functions.php

if( is_admin() ) {
add_filter( 'image_send_to_editor', 'wp_link_wrap', 10, 8 );  
function wp_link_wrap( $html, $id, $caption, $title, $align, $url, $size, $alt ) {
    return '<a href="'. $url .'">'. $html .'</a>';
}}

but it changed nothing.

本文标签: hooksWrap post images with a linknot figure (imagesendtoeditor doesn39t work)