Really a sad morning for me. Fast & Furious will never be the same without him. R.I.P.
Oh thanks a lot !! It worked. Although I had to add it via an action as the plugin was firing earlier than the theme.
Once again. Thanks for your help.
Yes the plugin is mine. I’m building a page builder for my WP themes in a plugin. So I need to tailor certain data according to themes. And it would be redundant if I keep making separate copies of the same plugin for every themes.
For example, by default the color schemes defined in the plugin for the buttons are blue, white and red. Now I need to change this from theme to add the color yellow. So basically there will be an array named $builder_config where the color schemes will be stored inside the plugin. And I would need to modify the $config from the theme.
Hope I made some sense.
I want to override some data that is used by plugin from the theme.
For example :
I have a variable in a plugin
$foo = 'bar';, that is required by the plugin to make some queries. Now I want to change the value of $foo from the theme.
I’m pretty sure that this can be done via filters. But I’m too confused with add_filter() and apply_filters(). Can someone help me with this confusion or suggest a better solution ?
Thanks in advance.
This is the best I can get for $20 in my country.