WordPress.org

Ready to get started?Download WordPress

Forums

stop filter deleting id-tags from image-tags (3 posts)

  1. nullpointer
    Member
    Posted 7 years ago #

    hi

    iam trying to stop wordpress to filter out id-tags from image or href-tags posted by autors

    so after publishing a post '<img id="image11" becomes '<img src='
    this doesent happen with posts by admins or editors
    i tryed to remove the filter wptexturize on the publish_post event
    but it doesent work
    i also not shure if wptexturize is the reponsible filter

    how can i switch this filter off ?

    thanx for helping

  2. nullpointer
    Member
    Posted 7 years ago #

    is this problem so unkown ?
    any answers ?
    any help ?
    any hints ?
    ...
    ..
    .

  3. Colin_Lewis
    Member
    Posted 7 years ago #

    Open upload-js.php (in the wp-admin folder)

    Find the 3 "<img" tags: lines 88, 166 and 239. They look like this:

    <img src='" + ( this.currentImage.thumb ...(etc.)

    You need to put an id in front of the src, like this:

    <img id='" + this.currentImage.ID + "' src='" + ( this.currentImage.thumb ...(etc.)

    This will give you the id values that you need. I've tested this and it works fine.
    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags