Hi guys —
Love the theme, using it to set up a client WP site right now. WP3.9, Dante 2.53.
They’ve asked me to customize the theme (I’m a developer) to provide a piece of functionality that the theme doesn’t support, and I’m wondering what the recommended way is to interface with your code. I’ve read through the theme code and your developer docs, and I think I mostly understand what’s going on.
The requirement is to provide an additional “Thumbnail Link Type” for Portfolio items, to allow it to link to a light-box with custom content (beyond just the image).
From what I can tell, I need to extend the functionality in the following files:
– swift-framework/meta-boxes.php — under “THUMBNAIL LINK TYPE”, register a new type of link
– includes/sf-portfolio.php — under the section “LINK TYPE CONFIG”, look for my new type of link and build an appropriate $link_config that triggers a new type of lightbox
– includes/sf-portfolio.php — somewhere in the main while loop, render out a hidden DIV lightbox to be able to be triggered by the $link_config above
– There’s some files in swift-framework/page-builder/builder/shortcodes/* that seem relevant, but I think I can safely ignore them if I don’t care about updating the Page Builder WYSIWYG editor in the admin screen?
– There’s also some relevant looking code in js/sf-admin.js, but not sure I understand what it’s doing? Is this just for the admin screen?
Questions:
– Do I have this mostly right? Am I misunderstanding or missing any pieces? Is there a better way to do this?
– Ideally, I’d extend your functionality, not override it, so that future theme updates don’t break. There don’t appear to be any real hooks though, so I think I’d have to define the same functions myself in the child them, copy your code, and make my tweaks. Or am I missing something?
– It looks like your lightbox support comes from View.js, which doesn’t support HTML content. I can integrate another lightbox plugin/library, are there any ones that you recommend as working well with the theme, being responsive, etc?
Thanks!
Ankur