Support » Fixing WordPress » Adding attribute to IMG with image_send_to_editor

  • Is there a way to use the image_send_to_editor filter to add an attribute to an image that I can check against later.

    Example:

    function add_my_attribute($html){
         $html = 'my-attribute="my-value"';
         return $html;
    }
    add_filter('image_send_to_editor', 'add_my_attribute', 10);

    Anything like that?

  • The topic ‘Adding attribute to IMG with image_send_to_editor’ is closed to new replies.