Skip to content

Commit

Permalink
Cleaned up and commented SASS stylesheet inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpedia committed Sep 24, 2012
1 parent e5cf7f3 commit dc26e40
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions includes/styles.sass.on.php
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' );
}

0 comments on commit dc26e40

Please sign in to comment.