My WordPress plugins will be TimThumb free

photos-in-hand

photos-in-hand

Contextual Related Posts, Top 10 and Where did they go from here have come inbuilt with TimThumb to resize images for a long time now. However, TimThumb has had a fair share of exploits that have affected a lot of websites and although I’ve maintained the latest version of TimThumb consistently within the plugins, it required me to be on the lookout constantly for updates to TimThumb.

Ben has supported the development of TimThumb over the years, but announced that he has stopped supporting or maintaining it. This means that eventually, I’m going to drop TimThumb from my WordPress plugins.

Contextual Related Posts v2.0 comes inbuilt with complete support for WordPress thumbnails  In the next version, you’ll be able to select the inbuilt created thumbnail sizes, instead of creating a new one. This means even better support for your thumbnails, especially if you’re carving your own ones! v2.1 will remove TimThumb completely and the plugin will no longer bundle it.

I’m currently working on new versions of Top 10 and Where did they go from here and these will come with the WordPress thumbnails support out of the box as well as the option to select existing thumbnail sizes.

If you’d still like to use TimThumb, you’ll need to host this on your own and use a simple function to filter the post image. This is, in fact, how my plugins currently use TimThumb to resize the images. But, as Ben says, this will be at your own risk.

I know that this is definitely a big change. I’ve always liked how TimThumb could seamlessly resize images on the fly, but with lack of support and maintenance, it’s time to stop using it.

Contextual Related Posts 2.0

Contextual Related Posts

Last week I released a major update to Contextual Related Posts. Given the size of the update, I’ve tagged the latest version as 2.0, heralding a new direction in the further development of this plugin.

v2.x brings multi-site support, WordPress thumbnails and a more powerful API. It also has several minor bug fixes and cleaner code.

Multi-site support

One feature that has been missing from Contextual Related Posts has been multisite support, mainly in terms of a Network Activate feature. With the Network Activate feature enabled, a multi-site admin can choose if he wants to activate Contextual Related Posts across all sites in the network or let users activate the plugin independently on their site.

CRP - Network Activate

Network Activate Contextual Related Posts

Once you network activate the plugin, it will no longer show up in the Plugins page of the individual sites. However, users can visit Settings » Related Posts as usual to configure the plugin. If you don’t Network Activate the plugin, it will show up on individual sites and the site admin can choose to activate the plugin if he/she so chooses.

WordPress thumbnails

CRP has had support for timthumb for a long time and by default timthumb was used to create thumbnails. Although timthumb gives you much better control on thumbnail resizing, it does add slightly higher processing on the servers since the images are created on the fly.

Many users have requested to include support for WordPress’ inbuilt image resizing and this feature has found it’s way in v2.0 of Contextual Related Posts.

Thumbnail options in Contextual Related Posts 2.0

Thumbnail options in Contextual Related Posts 2.0

Contextual Related Posts will add a new image size called crp_thumbnail based on the settings above. This means WordPress will create a copy of the image with the specified dimensions when a new image is uploaded. By default, this is set to proportionally crop the image. i.e. the image will first be resized so that the max dimension is as per the above i.e. 150px. You can optionally choose to hard crop the image by enabling the crop mode above. This will cause the image to be cropped to the exact dimensions but this might result in some part of the image being chopped off.

In either case, I strongly suggest running a regenerate plugin like Force Regenerate Thumbnails to recreate the image sizes for your older images. I especially like this plugin because it deletes the old and unneeded image sizes that would have been created in the past and are unnecessarily occupying space on your server.

Extended API

In version 2.0.0, I’ve added several new filters and actions that will allow other plugins / themes or addons to talk to Contextual Related Posts. What’s currently missing is the documentation which I shall be working on over the next several weeks.

If you’re interested in the API, take a look at my new plugin Contextual Related Ports Taxonomy Tools. Available for free from WordPress.org, CRP Taxonomy Tools adds support for restricting posts to the same categories and tags of the current post.

CRP Taxonomy Tools

CRP Taxonomy Tools

This is also a working example of the API that adds settings to Contextual Related Posts and also filters the post query.

Contextual Related Posts on Transifex.

Contextual Related Posts is now on Transifex, ready for translation courtesy the WP Translations. WP-Translations is the place where you will find a number of WordPress amazing Plugins and Themes to make them available in your home language. In exchange you will receive credit for your work and will certainly make part of the WP community history in your country.

If you’re a translator, do consider joining the Wp Translations team. Visit Contextual Related Posts on Transifex.

Closing words

As usual, if you’ve got any questions please open a support ticket in the WordPress.org forums. It allows me to answer your question quickly and more efficiently. Emailing me your support query or writing it in a comment is most likely going to be missed due to volume of emails I receive.

If you’re an existing user of the plugin, do consider writing a review. WordPress developers are welcome to contribute to the plugin via GitHub. Create an issue or fork the plugin and submit a pull request for me to review.

And, before I forget, Contextual Related Posts also has a brand new header.

Contextual Related Posts

Detailed changes in 2.x

2.0.1

  • Fixed: Clear Cache button which broke in 2.0.0

2.0.0

  • New: Multi-site support. Now you can Network Activate the plugin and all users will see related posts!
  • New: Thumbnails are registered as an image size in WordPress. This means WordPress will create a copy of the image with the specified dimensions when a new image is uploaded. For your existing images, I recommend using Force Regenerate Thumbnails
  • New: Completely filterable mySQL query to fetch the posts. You can write your own functions to filter the fields, orderby, groupby, join and limits clauses
  • Modified: Lookup priority for thumbnails. The thumbnail URL set in the Contextual Related Posts meta box is given first priority
  • Modified: Removed border=0 attribute from img tag for HTML5 validation support
  • Modified: Default option for timthumb is disabled
  • Modified: Default option for post types to include is post and page
  • Modified: get_crp_posts has been deprecated. See get_crp_posts_id instead
  • Modified: Turning on the Default style will switch on thumbnails, correctly resize them and will also hide authors, excerpts and the post date
  • Fixed: Post image will now be loaded over https if the visitor visits your site on https

Download Contextual Related Posts

Thank you Mrs. D’Souza

wpid-wp-1409916809188.jpeg

This post is 3 weeks overdue. But, like they say, better late than never!

Some of you might know that I celebrated my birthday on August 16. And, this time around, Ashwina decided that she was going to spare no expense, which works perfectly to my advantage ;)

The first thing amongst them all was my Bose QC20 noise cancelling headphones. Although, they are on the expensive side, you definitely get what you paid for. Once you switch them on, it filters out all the noise perfectly. The real test for this was when I carried them along with me on the Jubilee line, which by far is the noisiest train line!

Bose QC20 Noise Cancelling Headphones

And, she didn’t stop there. The next on the list of gifts was super cool, very trendy Hugo Boss watch. It’s a personality increase just by wearing it.

Hugo Boss

And the next on the list is a something that I’ve had my eyes on for a few months and debated for a month. The MacBook Air 13-inch. I spent a long time deliberating on what laptop to buy. I debated between getting a Windows 8 Ultrabook and shortlisted the Lenovo Yoga 2 Pro. It’s really an awesome tablet and worth buying. The other one I checked out was the Surface Pro 3, but it is simply too expensive for the specs you get. But, I ended up actually buying what I set out to buy in the first place, i.e. the Macbook Air 13-inch. I bought the Macbook Pro nearly 3 years ago and it soon became my primary laptop. The fact that it has a Unix base really helps me work on the development of my WordPress plugins very easily. Hence, the Air was a perfect companion. I wasn’t wrong because the first plugin that I released on this gorgeous machine is Contextual Related Posts v2.0.

wpid-wp-1409916809188.jpeg wpid-wp-1409916795204.jpeg

Well, the gifts haven’t stopped, but who is complaining! I guess the title of my post sums up how I feel… Thank you Mrs. D’Souza :)

Auto-Close Comments v1.5

Auto-Close v1.5

I pushed through an update of Auto-Close Comments, Pingbacks and Trackbacks, the simple WordPress plugin that allows you to close comments, pingback and trackbacks on all your posts at the click of a button!

And, v1.5 adds support for all custom post types. So, you no longer need to worry about those comments on some of your old custom post type posts.

Auto-Close v1.5

If you’re an existing user of Auto-Close, you’ll be able to update it from within your WordPress Admin area and if you’re not, then just head over to Plugins > Add New and search for “autoclose”.

As usual, if you’re looking for support, please create a new ticket in the Support Forums. And, if you’ve found this plugin useful, you can hit the button below to send me your donation.

Changes in v1.5:

  • New: Custom post type support. Now close comments on posts, pages, attachments and your custom post types!
  • Modified: Language initialisation
  • Modified: More code cleaning
  • New: Spanish and Serbian languages thanks to Ogi Djuraskovic

Download Auto-Close Comments, Pingbacks and Trackbacks v1.5

Better Search v1.3.4

Better Search

Better Search

I’ve released Better Search v1.3.4 today. The biggest addition which has long been pending is the addition of a meta tag that will allow you to set the search results page to stop being indexed. Enabled by default, you can choose to disable the meta tag if needed.

This should be definitely better for SEO and recommended by Google. Setting the meta tag should eventually stop Google and other search engines from unnecessarily indexing the search results pages.

This plugin also adds support for Rocket Loader and fixes some minor bugs in the heatmap. I’ve also added a brand new header image for the plugin listed in the WordPress.org directory. How does it look?

As usual, if you’re looking for support, please create a new post in the WordPress.org support forum.

Changes in v1.3.4

  • New: Option to add noindex,nofollow meta tag to the header
  • Modified: Tracking script now set to bypass Rocket Loader
  • Fixed: Class of header row on search results page. You can now add your custom styles to bsearch_nav_row1 and bsearch_nav_row2
  • Fixed: Widget search heatmap colours were not loaded properly

Download Better Search v1.3.4