WordPress.org

Ready to get started?Download WordPress

Forums

Adding attribute to IMG with image_send_to_editor (1 post)

  1. iamdangavin
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic