Last active
December 27, 2015 19:09
-
-
Save dovy/7374430 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 | |
array( | |
'id'=>'text', | |
'type' => 'text', | |
'title' => __('Test Compiler', 'redux-framework-demo'), | |
'subtitle' => __('This is to test the compiler hook.', 'redux-framework-demo'), | |
'desc' => __('Each time this field is set, a flag is set. On save, that flag initates a compiler hook!', 'redux-framework-demo'), | |
'compiler' => true, | |
'default' => 'Test Compiler' | |
), |
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 | |
/** | |
This is a test function that will let you see when the compiler hook occurs. | |
It only runs if a field set with compiler=>true is changed. | |
**/ | |
function testCompiler() { | |
echo "Compiler hook!"; | |
} | |
add_action('redux-compiler-redux_demo-sample-file', 'testCompiler'); | |
// This hook assumes your opt_name is redux_demo. Replace with your own. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should be updated as "-sample-file" isn't needed.