Skip to content

Instantly share code, notes, and snippets.

@jacquesletesson
Created March 14, 2015 08:36
Show Gist options
  • Save jacquesletesson/36bbf0e028ec984a46ec to your computer and use it in GitHub Desktop.
Save jacquesletesson/36bbf0e028ec984a46ec to your computer and use it in GitHub Desktop.
WPSL Load Custom Stylesheet
<?php
/**
* Load the required css styles
*
* @since 2.0
* @return void
*/
public function add_frontend_styles() {
$min = '';
$file = get_template_directory() . "/wp-store-locator/style.css";
if (file_exists($file)) {
wp_enqueue_style( 'wpsl-styles', get_template_directory_uri() . '/wp-store-locator/style'. $min .'.css', '', WPSL_VERSION_NUM );
} else {
wp_enqueue_style( 'wpsl-styles', WPSL_URL . 'css/styles'. $min .'.css', '', WPSL_VERSION_NUM );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment