1,860 reputation
1313
bio website maxyudin.com
location Riga, Latvia
age
visits member for 2 years, 3 months
seen Apr 17 at 13:03

Mar
2
comment Link post images to post
@toscho have a nice array('night' => 'Europe', 'day' => 'USA or near'). I'm falling asleep.
Mar
2
comment Link post images to post
Yes, @toscho. I agree, but how can we avoid XY? Nobody is reading FAQ, which is not full and is under construction for months.
Mar
2
comment Remove rel=“attachment wp-att-XX”
Take care of attributes, they are in different order sometimes.
Mar
2
comment Remove rel=“attachment wp-att-XX”
Here you are:$pattern = '{(<a\s[^>]+>).?(<img\s[^>]+>).?(</a>)+}Ui'; $output = preg_replace($pattern, '$2', $image_inside_link);
Mar
2
comment Link post images to post
@toscho I disagree. Original Poster already got the answer here:. This is not a place to fight. But I don't see regexes as part of WordPress. It's PERL legacy and so on.
Mar
2
revised Writing a plugin that notify my friends of new post that mentions(@) them
may be better English
Mar
2
comment How To Download WordPress Audio Attachments
Please supply your question with more information about clicking as it will be useful for other users and will be searchable also. What do you have already tried? We need some code to think on.
Mar
2
comment Writing a plugin that notify my friends of new post that mentions(@) them
@brasofilo,thanks a lot for all suggestions. Unfortunately I was unable to get WP_User_Query to work in this case. I know, built-in is better than regular.
Mar
2
revised Writing a plugin that notify my friends of new post that mentions(@) them
Replacement for unsecure version
Mar
2
comment Link post images to post
It's not about WordPress, it's about regexes.
Mar
2
comment Remove rel=“attachment wp-att-XX”
You need different pattern for preg_replace(). But I'm not a guru in regular expressions. Also it's off-topic here.
Mar
2
revised Writing a plugin that notify my friends of new post that mentions(@) them
Alternative edition added
Mar
2
answered Enqueue AWS Script
Mar
2
comment Remove rel=“attachment wp-att-XX”
See birgire's answer for better add_filter().
Mar
2
answered Writing a plugin that notify my friends of new post that mentions(@) them
Mar
2
comment Enqueue AWS Script
Check page source code for jQuery is loaded. AWS scripts too.
Mar
2
answered How To Download WordPress Audio Attachments
Mar
2
comment WPML wp_query not working properly in one language
Your question is about commercial plugin. Most likely your problem is described in WPML docs or it's a WPML bug, not Wordpress's. Have you tried WPML support?
Mar
1
comment Remove rel=“attachment wp-att-XX”
Yes, you are right. It's better to hook to image_send_to_editor. But I still prefer preg_replace against messing with $id.
Mar
1
answered Remove rel=“attachment wp-att-XX”