public function maybeUpdateStylesheets() {
		// If this is ajax/cron/404, don't update right now
		if ( wp_doing_ajax() || wp_doing_cron() || is_404() ) {
			return false;
		}

		// Compare current and previous Buckram versions
		$current_buckram_version = $this->getBuckramVersion();
		$last_buckram_version = get_option( 'pressbooks_buckram_version' );
		$buckram_updated = version_compare( $current_buckram_version, $last_buckram_version ) > 0;

		// Compare current and previous theme versions
		$theme = wp_get_theme();
		$current_theme_version = $theme->get( 'Version' );
		$last_theme_version = get_option( 'pressbooks_theme_version' );
		$theme_updated = version_compare( $current_theme_version, $last_theme_version ) > 0;

		// If either Buckram or the theme were updated, rebuild the web and editor stylesheets.
		if ( $buckram_updated || $theme_updated ) {
			// Try to stop a Cache Stampede, Dog-Pile, Cascading Failure...
			if ( ! get_transient( 'pressbooks_updating_stylesheet' ) ) {
				set_transient( 'pressbooks_updating_stylesheet', 1, 5 * MINUTE_IN_SECONDS );
				( new Modules\ThemeOptions\Admin() )->clearCache();
				$this->updateWebBookStyleSheet();
				update_editor_style();
				if ( $buckram_updated ) {
					update_option( 'pressbooks_buckram_version', $current_buckram_version );
				}
				if ( $theme_updated ) {
					update_option( 'pressbooks_theme_version', $current_theme_version );
				}
				delete_transient( 'pressbooks_updating_stylesheet' );
				return true;
			}
		}

		return false;
	}
public function maybeUpdateStylesheets() {
		// If this is ajax/cron/404, don't update right now
		if ( wp_doing_ajax() || wp_doing_cron() || is_404() ) {
			return false;
		}

		// Compare current and previous Buckram versions
		$current_buckram_version = $this->getBuckramVersion();
		$last_buckram_version = get_option( 'pressbooks_buckram_version' );
		$buckram_updated = version_compare( $current_buckram_version, $last_buckram_version ) > 0;

		// Compare current and previous theme versions
		$theme = wp_get_theme();
		$current_theme_version = $theme->get( 'Version' );
		$last_theme_version = get_option( 'pressbooks_theme_version' );
		$theme_updated = version_compare( $current_theme_version, $last_theme_version ) > 0;

		// If either Buckram or the theme were updated, rebuild the web and editor stylesheets.
		if ( $buckram_updated || $theme_updated ) {
			// Try to stop a Cache Stampede, Dog-Pile, Cascading Failure...
			if ( ! get_transient( 'pressbooks_updating_stylesheet' ) ) {
				set_transient( 'pressbooks_updating_stylesheet', 1, 5 * MINUTE_IN_SECONDS );
				( new Modules\ThemeOptions\Admin() )->clearCache();
				$this->updateWebBookStyleSheet();
				update_editor_style();
				if ( $buckram_updated ) {
					update_option( 'pressbooks_buckram_version', $current_buckram_version );
				}
				if ( $theme_updated ) {
					update_option( 'pressbooks_theme_version', $current_theme_version );
				}
				delete_transient( 'pressbooks_updating_stylesheet' );
				return true;
			}
		}

		return false;
	}
public function maybeUpdateStylesheets ( ) { // If this is ajax/cron/404, don't update right now if ( wp_doing_ajax ( ) || wp_doing_cron ( ) || is_404 ( ) ) { return false ; } // Compare current and previous Buckram versions $ current_buckram_version = $ this -> getBuckramVersion ( ) ; $ last_buckram_version = get_option ( 'pressbooks_buckram_version' ) ; $ buckram_updated = version_compare ( $ current_buckram_version , $ last_buckram_version ) > 0 ; // Compare current and previous theme versions $ theme = wp_get_theme ( ) ; $ current_theme_version = $ theme -> get ( 'Version' ) ; $ last_theme_version = get_option ( 'pressbooks_theme_version' ) ; $ theme_updated = version_compare ( $ current_theme_version , $ last_theme_version ) > 0 ; // If either Buckram or the theme were updated, rebuild the web and editor stylesheets. if ( $ buckram_updated || $ theme_updated ) { // Try to stop a Cache Stampede, Dog-Pile, Cascading Failure... if ( ! get_transient ( 'pressbooks_updating_stylesheet' ) ) { set_transient ( 'pressbooks_updating_stylesheet' , 1 , 5 * MINUTE_IN_SECONDS ) ; ( new Modules \ ThemeOptions \ Admin ( ) ) -> clearCache ( ) ; $ this -> updateWebBookStyleSheet ( ) ; update_editor_style ( ) ; if ( $ buckram_updated ) { update_option ( 'pressbooks_buckram_version' , $ current_buckram_version ) ; } if ( $ theme_updated ) { update_option ( 'pressbooks_theme_version' , $ current_theme_version ) ; } delete_transient ( 'pressbooks_updating_stylesheet' ) ; return true ; } } return false ; }
If the current theme's version or Buckram's version has increased, do SCSS stuff

@return bool
If the current theme s version or Buckram s version has increased do SCSS stuff