|
plugin_path() . '/assets/css/woocommerce-base.less';
$css_file = $woocommerce->plugin_path() . '/assets/css/woocommerce.css';
if ( is_writable( $base_file ) && is_writable( $css_file ) ) {
// Get settings
$colors = array_map( 'esc_attr', (array) get_option( 'woocommerce_frontend_css_colors' ) );
// Defaults
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#ad74a2';
if ( empty( $colors['secondary'] ) ) $colors['secondary'] = '#f7f6f7';
if ( empty( $colors['highlight'] ) ) $colors['highlight'] = '#85ad74';
if ( empty( $colors['content_bg'] ) ) $colors['content_bg'] = '#ffffff';
if ( empty( $colors['subtext'] ) ) $colors['subtext'] = '#777777';
// Show inputs
woocommerce_frontend_css_color_picker( __( 'Primary', 'woocommerce' ), 'woocommerce_frontend_css_primary', $colors['primary'], __( 'Call to action buttons/price slider/layered nav UI', 'woocommerce' ) );
woocommerce_frontend_css_color_picker( __( 'Secondary', 'woocommerce' ), 'woocommerce_frontend_css_secondary', $colors['secondary'], __( 'Buttons and tabs', 'woocommerce' ) );
woocommerce_frontend_css_color_picker( __( 'Highlight', 'woocommerce' ), 'woocommerce_frontend_css_highlight', $colors['highlight'], __( 'Price labels and Sale Flashes', 'woocommerce' ) );
woocommerce_frontend_css_color_picker( __( 'Content', 'woocommerce' ), 'woocommerce_frontend_css_content_bg', $colors['content_bg'], __( 'Your themes page background - used for tab active states', 'woocommerce' ) );
woocommerce_frontend_css_color_picker( __( 'Subtext', 'woocommerce' ), 'woocommerce_frontend_css_subtext', $colors['subtext'], __( 'Used for certain text and asides - breadcrumbs, small text etc.', 'woocommerce' ) );
} else {
echo '' . __( 'To edit colours woocommerce/assets/css/woocommerce-base.less and woocommerce.css need to be writable. See the Codex for more information.', 'woocommerce' ) . '';
}
?> |