Cant get `get_image_tag` hook working

Im so confussed, can some one tell me why this isnt doing anything ? I’ve put this in the functions.php file but no matter what hook i try, it doesnt work. I’ve spent almost 2 days now on this and im left with no ideas.

function lightbox_image( $html, $id, $alt, $title, $align, $size ) {
    return $html."<span>The function is working</span>";
}
add_filter('get_image_tag', 'lightbox_image', 10, 6);

Any help would be greatly appreciated!

Read More

Thank you!

Related posts

Leave a Reply

1 comment

  1. I found the problem, it was working fine, but this function is ran when you include an image in the text editor. Its not called as the page loads.