Best Sharing Plugins for WordPress
Extract All Image Sources from a WordPress Post

Here’s a handy piece of code that extracts all the images from a WordPress post:
1 2 3 4 5 6 7 8 |
global $post; if ( preg_match_all('/<img (.+?)>/', $post->post_content, $matches) ) { foreach ($matches[1] as $match) { foreach ( wp_kses_hair($match, array('http')) as $attr) $img[$attr['name']] = $attr['value']; echo $img['src']; } } |
The resulting output will be in this form:
1 2 3 4 5 6 7 |
Array ( [src] => test.jpg [class] => testclass another [id] => testid [fake] => ) |
About Jean GaleaJean Galea is a WordPress developer, entrepreneur and padel player. He is the founder of WP Mayor, the plugins WP RSS Aggregator and EDD Bookings, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.
How to Check if Category is a Subcategory
How to Display Archives for a Particular Category

The functionality to display archives for a particular category is strangely not part of WordPress default functionality, despite a Google search revealing many questions relating to this functionality.
If you’re one of these people asking for help on this topic, you’ve come to the right place as we have finally found the solution in the form of a plugin aptly named Archives for a Category.
Best Flickr Plugin For WordPress
Change TinyMCE Editor Class
Best ‘Related Posts’ Plugins for WordPress
Best Google Maps Plugins for WordPress
Provide a Shortcut to Your Settings Page with Plugin Action Links

When you use this code in your plugin, it will add a ‘Settings’ link to your plugin’s listing under ‘Plugins’. The link will take you to the plugin’s options page.
The benefit of the plugin action link is that users see it immediately after they activate the plugin, thus adding to the overall experience.
Publish Posts to RSS At a Later Time

This hack delays posting to the RSS feeds for 10 minutes (you can customise it). This can be useful as it gives you some leeway to re-read the live post and make any minor changes before it goes to the RSS feeds. Using this hack you can also keep content exclusive to your site for a day or a week before pushing it out to your RSS readers.