Bring Your Business to Life › Support › Image Store › Overriding functions
Tagged: hooks
- AuthorPosts
- December 3, 2015 at 2:11 pm #452342johnhParticipant
I disabled ‘Show photo links’ but sadly whilst the gallery shows as a slideshow, the favorites does not. However, I found that by making a very small change to the gallery_shortcode function in store.php I could fix this and easily get the favorites to show in a slideshow as well. My problem is that I don’t want to make changes to the core code and really need to override that function in my themes function.php file but can’t find a suitable hook.
Can you please tell me if it is even possible to override this function, and if so what hook I should use?
Thank you.
December 5, 2015 at 12:15 am #453395Xpark MediaKeymasterDecember 6, 2015 at 5:03 pm #454573johnhParticipantI think you may have missed something when you read my original post.
Your suggestion works fine for the gallery page but not the favorites page, which always shows the photo gallery and not a slideshow regardless of the settings for ‘Show photo links’. If you look at the gallery_shortcode function in store.php you will see that it cannot do anything else as it is currently coded.
That’s why I need to know the hook to overwrite this function. Or will you be fixing this bug in a later release?
Thanks.
December 7, 2015 at 12:18 am #454799Xpark MediaKeymasterThis is not a bug, it is by design. The slideshow is only for presentation and the favorites pages is displayed always as a grid.
You could use the “ims_before_galleries” filter to change the display. Include the favorites layout by using
include( IMSTORE_ABSPATH . '/_store/slideshow.php' );
December 7, 2015 at 9:57 am #455566johnhParticipantMany thanks.
- AuthorPosts
- You must be logged in to reply to this topic.