save code changes in a safe waycode
Posted 25 January 2013 - 02:36 PM
I had to make hardcode changes in the class.shortcodes.php file.
I wanted my popover window to work with click instead of hover and tried to put some html in it.
Okay, my question is how to save this little piece of code in a way it will not be overwritten with pagelines updates.
I don't have a child theme installed but work with the customization plugin. and work with version 2.4 on a client website.
What is the best solution here?
Posted 25 January 2013 - 02:51 PM
You can 'overload' a class and change the function quite easily in PHP
See this post, i provided a plugin that overloaded another shortcode, the code you need will be similar.
Posted 25 January 2013 - 03:01 PM
Hi Simon, before i forget another thing. You wrote in the forum that in version 2.4.1 the popover will have option for html. Is it possible to add the option for changing the trigger from hover to click because of Ipad issues? You know what i mean...!
Now to the above answer of yours: Does this provide that my code changes will be saved from updates overwritten-ness? I see a modal and a second modal. That's not my point.
Please could be a little more precise?
Posted 25 January 2013 - 03:05 PM
I looked at the zip. It seems to me a bit overloaded to do it this way by means of an extra plugin and files in my solution because i just changed 2 lines of code in a part of class.shortcodes.php the part which deals with popovers. Is there a simpler way to do this in my situation?
Posted 25 January 2013 - 05:43 PM
Posted 25 January 2013 - 06:35 PM Best Answer
Can you still give me à clue About saving snippets of code. Add to functions.php?