Last active
December 22, 2015 16:49
-
-
Save dovy/6502088 to your computer and use it in GitHub Desktop.
Showing you how to add to or override the Redux CSS values.
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 addAndOverridePanelCSS() { | |
wp_dequeue_style( 'redux-css' ); | |
wp_register_style( | |
'redux-custom-css', | |
'http://urltomyfile', | |
array( 'farbtastic' ), // Notice redux-css is removed and the wordpress standard farbtastic is included instead | |
time(), | |
'all' | |
); | |
wp_enqueue_style('redux-custom-css'); | |
} | |
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value | |
add_action('redux-enqueue-redux_demo', 'addAndOverridePanelCSS'); |
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 addPanelCSS() { | |
wp_register_style( | |
'redux-custom-css', | |
'http://urltomyfile', | |
array( 'redux-css' ), // Be sure to include redux-css so it's appended after the core css is applied | |
time(), | |
'all' | |
); | |
wp_enqueue_style('redux-custom-css'); | |
} | |
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value | |
add_action('redux-enqueue-redux_demo', 'addPanelCSS'); |
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 removePanelCSS() { | |
wp_dequeue_style( 'redux-css' ); | |
} | |
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value | |
add_action('redux-enqueue-redux_demo', 'removePanelCSS'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment