How to get variables from fucntion.php to my plugin files
There is three way to use function.php file variable into plugin file. Using global. Make sure you globalize it first. global $my_variable; echo $my_variable; I recommend is using WordPress built-in filter mechanism add_filter. You add the filter in your functions.php file and apply it where needed. In functions.php: add_filter( ‘my_variable’, ‘return_my_variable’ ); function return_my_variable( $arg … Read more