Last active
December 26, 2015 22:28
-
-
Save dovy/7222834 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function useReduxVariables() { | |
// Redux does some nifty setup things. To use the variables inside your functions.php file you will need to run your | |
// code inside a function run at the init hook or later. | |
// In this example we assume that demo mode is turned on. You can sub your variable name here to get your values. | |
global $redux_demo; | |
print_r($redux_demo); | |
} | |
add_action( 'init', 'useReduxVariables'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Due to a limitations of variables and functions, you must globally define | |
// variables inside functions. | |
global $redux_demo; // This is your opt_name. | |
print_r($redux_demo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment