forked from jeffstacey/swa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up and commented SASS stylesheet inclusion
- Loading branch information
Showing
1 changed file
with
24 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
<?php | ||
|
||
|
||
|
||
|
||
/**************************************************** | ||
SASS | ||
Do not deactivate this or the stylesheet will not load! | ||
****************************************************/ | ||
|
||
|
||
|
||
// Include the class (unless you are using the script as a plugin) | ||
// require_once( get_template_directory() . '/wp-sass/wp-sass.php' ); | ||
// require_once( realpath(dirname(__FILE__)) . '/wp-sass/wp-sass.php' ); | ||
|
||
$wpSassPluginLocation = realpath(dirname(__FILE__)) . '/_plugins/wp-sass/wp-sass.php'; | ||
if (file_exists($wpSassPluginLocation)) { | ||
/** | ||
* Include SASS stylesheets, which then get compiled on the fly by WP-Sass and PHPSass | ||
* | ||
* @since 2012-09-24 07:28:26 | ||
* @uses WP-Sass Wordpress plugin for PHPSass | ||
* @link https://github.com/sanchothefat/wp-sass | ||
* @uses PHPSass Sass compiler for PHP | ||
* @link https://github.com/richthegeek/phpsass | ||
* | ||
*/ | ||
|
||
/** | ||
* Include the WP-Sass plugin. We do this manually since we are not using WP-Sass as a traditional plugin. | ||
*/ | ||
$wpSassPluginLocation = realpath(dirname(__FILE__)) . '/+plugins/wp-sass/wp-sass.php'; | ||
if ( file_exists($wpSassPluginLocation) ) { | ||
require_once( $wpSassPluginLocation ); | ||
} | ||
|
||
|
||
// Enqueue the SASS stylesheets | ||
/** | ||
* Enqueue the SASS stylesheets. Their filenames must end in .scss, .sass, .scss.php, or .sass.php. | ||
*/ | ||
if ( ! is_admin() ) { | ||
wp_enqueue_style( 'sass_main', get_stylesheet_directory_uri() . '/sass.scss.css' ); | ||
wp_enqueue_style( 'sass_main', get_stylesheet_directory_uri() . '/sass.scss' ); | ||
// wp_enqueue_style( 'sass_main', get_stylesheet_directory_uri() . '/sass.php' ); | ||
} else { | ||
// wp_enqueue_style( 'admin', get_stylesheet_directory_uri() . '/admin.sass.php' ); | ||
} | ||
|
||
// If you want to use a SASS file as a TinyMCE stylesheet | ||
// add_editor_style( 'editor-style.sass' ); | ||
// wp_enqueue_style( 'admin', get_stylesheet_directory_uri() . '/admin.sass.php' ); | ||
// If you want to use a SASS file as a TinyMCE stylesheet | ||
// add_editor_style( 'editor-style.sass' ); | ||
} |