Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to disable image or thumbnail link URL, as well as remove existing image/thumbnail links in functions.php?

NOT the setting under media as posted in this link, please.

share|improve this question
    
i don`t understand the question ). Could you provide more details.. –  Alexey Oct 5 '11 at 11:54
    
if you look at the link, perhaps you can understand better –  Sean Lee Oct 5 '11 at 16:29
add comment

3 Answers

There is a feature

Goto Settings->Media->Auto-embeds->Uncheck the box

according to link you post and i checked it out its working but maybe not found in all versions I'm using 3.2.1

share|improve this answer
    
I've notated above, NOT the setting. –  Sean Lee Oct 5 '11 at 16:28
add comment

If i understand right. You are looking for something like this. Key word is attachment_fields_to_edit

share|improve this answer
    
not exactly it, but this may be good for restricting attachment editor interface. What I need is to remove the attachment links already in the post using functions.php. –  Sean Lee Oct 6 '11 at 2:25
    
From existing post? I still don't understand want you want. Tell us full story! –  Alexey Oct 6 '11 at 10:51
    
anyone uploading images, if setting was not previously unset for auto-embed, and one did not knowingly check "none" for Link URL, then a link will be generated for each image inserted into post. –  Sean Lee Oct 6 '11 at 18:49
    
You describe default behaviour of image insertion. –  Alexey Oct 6 '11 at 19:26
    
well, you asked for full story, that's what caused it. There's the link, and that needs to be removed. What you provided and what the link in my original post only covers prior, not after. –  Sean Lee Oct 6 '11 at 19:28
add comment

I know there is some confusion about your question, but if I understand it correctly it seems like it might be a duplicate of Disable image attachment links which I just answered with a note about a plugin that solves the functionality of removing links for images.

The plugin is called "Remove Link URL" and it removes the link by default, still allowing it to be added in if you click the button.

screenshot-1.png?r=494378

I believe this fixes the problem you're describing :)

share|improve this answer
    
This is exactly the link that I included in the original post as NOT THE ONE. Thanks anyway. –  Sean Lee Feb 10 '12 at 0:42
    
perhaps if you spent a little time better explaining the desired behavior people could give you better answers to your question. –  cwd Feb 11 '12 at 14:54
    
As said above, I need to disable thumbnail the links on any images or thumbnails inserted into the post using the media manager, not individually like you posted (which is exactly the link I provided above as I marked not that one). This means, disable must be done in functions.php like a filter for any images inserted via media manager. Then also a filter that can remove any existing links inserted via the media manager, which may not be easy to differentiate if using preg_match of the img url. Hopefully you get the picture. –  Sean Lee Feb 22 '12 at 11:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.