Created
December 23, 2013 03:31
-
-
Save BeardedGinger/8091311 to your computer and use it in GitHub Desktop.
Set front-end styles for WooCommerce on theme activation
This file contains 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
//* Set the default WooCommerce front-end styles | |
global $pagenow; | |
if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' ) { | |
add_action( 'admin_init', 'woocommerce_default_frontend_styles' ); | |
} | |
/** | |
* Define default WooCommerce frontend styles | |
*/ | |
function woocommerce_default_frontend_styles() { | |
$colors = array( | |
'primary' => '#aaa', | |
'secondary' => '#888', | |
'highlight' => '#fc0000', | |
'content_bg' => '#111', | |
'subtext' => '#fff' | |
); | |
// Front-end Colors | |
update_option( 'woocommerce_frontend_css_colors', $colors ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment