In version 1.4.21 of Property Hive we’re including a feature which has the potential to effect existing sites. In this post we look at the exact change and what to look out for.
A Bit Of Background
When we built Property Hive nearly 3 years ago we needed to include a plugin which handled lightbox functionality to do things such as displaying enquiry modals and the ability to expand photos. We looked at what was available, as well as what other large plugins in the WordPress repository were using, and settled on PrettyPhoto.
PrettyPhoto does have a few downfalls that came to light as we started to see it being used more and more:
– It’s support for responsiveness isn’t great meaning on smaller screens it won’t always adapt accordingly.
– It’s no longer maintained. It hasn’t been updated in a few years so it’s looks and functionality are now dated.
– It lacks community and support. Due to the fact it’s no longer maintained it’s hard to get help or advice should something go wrong.
The Forthcoming Change
A few years later and lightboxes have come on a long way. As such we’ve decided to upgrade to the latest in lightbox plugins and change over to Fancybox 3. Not only is it freshly released, it also looks and functions great across all devices.
We really don’t like making changes that might effect existing sites and we do all we can to avoid it. Sometimes however, for the future of the plugin, and to improve existing sites also, we feel it is in the interest of the plugin to make such changes. It’s a headache that every large plugin has to face every now and again and fortunately it’s the only time we’ve been put in such a position.
Will it Affect My Property Website?
If you’re using our free Honeycomb theme we’ve already released an update which fixes any potential issues with the styling of the enquiry form. You can simply upgrade through WordPress now to benefit.
If using a bespoke theme, whether or not it will effect you is hard to say. It’s likely that it won’t, but it all depends on how much customisation has been made to the default templates and styling. Before upgrading we recommend taking a backup (you’d do that anyway, right?), or test the update first on a staging site, then once upgraded just check anything that utilises a lightbox. This includes the enquiry form, photos and floorplans.
Should it cause something to not look right, if you have a license key then get in touch and we’ll be happy to assist with putting it right.
What To Look Out For
If it does cause an issue, it’s likely the default templates to handle things such as the Make Enquiry popup have been overwritten into your theme meaning they don’t inherit the changes required.
If for example the make-enquiry.php template has been overwritten, you’ll want to open /wp-content/themes/your-theme/propertyhive/global/make-enquiry.php and change:
[code]<a href="#makeEnquiry<?php echo $post->ID; ?>" data-rel="prettyPhoto"><?php _e( ‘Make Enquiry’, ‘propertyhive’ ); ?></a>[/code]
to
[code]<a data-fancybox data-src="#makeEnquiry<?php echo $post->ID; ?>" href="javascript:;"><?php _e( ‘Make Enquiry’, ‘propertyhive’ ); ?></a>[/code]
The above is just an example and might need tweaking according to any customisation previously made.
Version 1.4.21 of Property Hive will be released on Monday 9th June.