WordPress.org

Ready to get started?Download WordPress

Forums

MimeTypes Link Icons
[resolved] Problem with Images (8 posts)

  1. ThiloL
    Member
    Posted 1 year ago #

    Hi,

    I have images in my posts which link to pdf files.
    But I don't want to see an additional pdf-icon before this images, with your plug-in. Only text links should get a mime-type icon.

    Does that make sense?

    -Thilo

    http://wordpress.org/extend/plugins/mimetypes-link-icons/

  2. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    Yup, makes sense. Simplest way to do this would probably be adding a filter to the_content with a prio higher than 10 to remove the mime-type icons for image links.

  3. eagerterrier
    Member
    Plugin Author

    Posted 1 year ago #

    @ThiloL - you can try using the hidden_classname field in plugin admin.

    Let us know how you get on. We can always use a jquery wildcard selector instead of classname in a later version of the plugin, so

    jQuery(this).parents('.myexcludedclassname').length)

    becomes

    jQuery(this).parents('[class^=wp-image-]').length /* matches all images on my theme */

  4. ThiloL
    Member
    Posted 1 year ago #

    My image in the post has the following css-class:

    alignleft size-full wp-image-351

    So it's not easy to decide for one.

    Even if I use "alignleft" in the plug-in options it doesn't work.

    This is the page: http://s4000.heubisch.eu/

  5. eagerterrier
    Member
    Plugin Author

    Posted 1 year ago #

    @ThiloL - you can choose to change your hidden_classname to size-full or add the hidden_classname as a class of your image.

    I think that going forwards we will have a wildcard selector, but for the moment those are your options.

  6. jrf
    Member
    Plugin Contributor

    Posted 1 year ago #

    @ThiloL, in the new version (v3) you can add several classes to the exclude list. Hopefully this will give you more of the flexibility you are looking for.
    Also, have a look at the example I've added to the FAQ.

    If this is to your satisfaction, please mark the topic resolved.

    Thanks, Juliette

  7. ThiloL
    Member
    Posted 1 year ago #

    Perfect!

  8. eagerterrier
    Member
    Plugin Author

    Posted 1 year ago #

    @ThiloL woohoo!

    thanks @jrf for the fix.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.