Version 2.40 of Photonic is now out. This has been the biggest rewrite of Photonic since its beginning, though the changes are mostly under the hood here unlike version 2.00 that focused on adding the Gallery Wizard.
So, let’s get the details out of the way
- Fully OO
In coding parlance OO stands for Object Oriented, and OOP stands for Object Oriented Programming. If you don’t get this right, you go straight from OOP to OOPS!
I have been wanting to move Photonic to being OO for a long time, but the main hurdle here was that WordPress itself was operating on a very old PHP version (5.2.x) that didn’t support several new features. A couple of releases back WP finally changed its minimum PHP version requirement to 5.6.x. And I typically undertake such big changes when such an underlying WP change has been in place for 2 WP releases. With the WP requirement now firmly in place, I was able to make use of several modern PHP features (actually as far as programming concepts go they are from the previous century, but PHP has been slow to pick them up), and now this completes the shift to PHP 5.6+.
Going fully OO let me remove a lot of deadweight from the code, and overall this has helped make Photonic a lot faster. These are the underlying code changes:
- Gallery code is now loaded into memory as required. Earlier, if you had Photonic activated, it would load the code for all gallery sources into memory. Now, it will only load the code for the source that you are using. E.g. If you have an Instagram gallery, only the Instagram-specific code will load, reducing the processing load on your server.
- The Gallery Wizard (i.e. the “Add / Edit Photonic Gallery” workflow) is now considerably faster.
- All admin pages are a lot faster, but from my testing, you will notice significant gains on PHP 7.0+. The gains are not that significant if you are on PHP 5.6.x.
- All Photonic classes and functions are now namespaced under
Photonic_Plugin. This is to avoid namespace conflicts with a theme from a different author that exists on ThemeForest
- Dedicated Gallery Pages
Over the past few months one particular feature request seemed to be gaining some traction. When Photonic started out, if you had a collection of albums, clicking on an album would show an overlay. Then, in version 1.50 back in December 2015 I added the ability to bypass the overlay altogether and directly show photos in a lightbox.
In this release, there is a third option: to get the gallery to show up on a dedicated page. Instructions will be posted on the Layouts documentation shortly.
- A Widget
As Photonic has always relied on a shortcode, and up until 1.5 years back had no concept of a wizard, I never offered a widget for it. But with version 2.40 you now have a widget.
Before you shrug this off as a “So what?” item, this has a very simple benefit: common page builders support native WordPress widgets! So, you can now use the Photonic Gallery Wizard in a layout generated by Elementor or Beaver Builder!! Instructions will be posted in the Gallery Creation documentation. Before you ask, no, I have not tested this for Divi Builder – apart from generally loathing something that takes up 128MB of RAM to run, an add-on for Divi Builder takes more pain to create than one for the other two.
- Other Changes / Fixes
- I Added a parameter
carousel_handlingto prevent recursion of carousels in Instagram. So far, if you were trying to show an Instagram gallery and the gallery included carousels, Photonic automatically fetched each photo from within the carousel. This option changes this behaviour. Documentation will be updated on the Instagram page shortly.
- I have removed options for “Front-end authentication”. Front-end authentication refers to the concept where a user could log into Flickr / SmugMug from your site to see galleries that they were authorized to see. Apart from having a very limited use-case, this needed a ton of code, and I wasn’t aware of any users who had this feature.
- I fixed the behaviour of tile images for Flickr photoset displays. Some sizes were broken.
- I Added a parameter
Hope you enjoy this release! As always, if you like my work, please review it well!
there is a bug in your latest release. while your plugin in activated. and if i am working on classic editorin backend then , clicking on image doesnt work on post page
Not following you – I use the Classic Editor all the time and have never come across this.
Please start a thread on the support forum and provide a screenshot.