Tips and tricks

Global variables should be used restrictively - a way to resolve

If you need to use global variables restrictively and do not crowd the global variable namespace, you can have a single object.

A way to get around this is just find and replace all entries of the variables, and convert them in the object

 

Find

\$qucreative_([a-z|_]*?)( |=|,|\)|\!|\[|\.|-|;)

and replace with

\$qucreative_theme_data['$1']$2

 

regex

  • you can do it in IDEs as PHPStorm

Leave a comment

Your email address will not be published

{"type":"main_options","images_arr":"'#ffffff'","bg_slideshow_time":"0","site_url":"https:\/\/digitalzoomstudio.net","theme_url":"https:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","is_customize_preview":"off","gallery_w_thumbs_autoplay_videos":"off","base_url":"https:\/\/digitalzoomstudio.net"}