public function updateWebBookStyleSheet( $stylesheet = null ) {

		if ( CustomCss::isCustomCss() ) {
			// Compile pressbooks-book web stylesheet when using the *DEPRECATED* Custom CSS theme
			$theme = wp_get_theme( 'pressbooks-book' );
		} else {
			$theme = wp_get_theme( $stylesheet );
		}

		// Populate $url-base variable so that links to images and other assets remain intact
		$overrides = [ '$url-base: "' . $theme->get_stylesheet_directory_uri() . '";' ];
		if ( $this->isCurrentThemeCompatible( 1 ) ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/style.scss' ) );
		} elseif ( $this->isCurrentThemeCompatible( 2 ) || CustomCss::isCustomCss() ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/assets/styles/web/style.scss' ) );
		} else {
			return;
		}

		$custom_styles = $this->getWebPost();
		if ( $custom_styles && ! empty( $custom_styles->post_content ) ) {
			// append the user's custom styles to the theme stylesheet prior to compilation
			$scss .= "\n" . $custom_styles->post_content;
		}

		$css = $this->customize( 'web', $scss, $overrides );

		$css = normalize_css_urls( $css );

		$css_file = $this->sass->pathToUserGeneratedCss() . '/style.css';
		\Pressbooks\Utility\put_contents( $css_file, $css );
	}
public function updateWebBookStyleSheet( $stylesheet = null ) {

		if ( CustomCss::isCustomCss() ) {
			// Compile pressbooks-book web stylesheet when using the *DEPRECATED* Custom CSS theme
			$theme = wp_get_theme( 'pressbooks-book' );
		} else {
			$theme = wp_get_theme( $stylesheet );
		}

		// Populate $url-base variable so that links to images and other assets remain intact
		$overrides = [ '$url-base: "' . $theme->get_stylesheet_directory_uri() . '";' ];
		if ( $this->isCurrentThemeCompatible( 1 ) ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/style.scss' ) );
		} elseif ( $this->isCurrentThemeCompatible( 2 ) || CustomCss::isCustomCss() ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/assets/styles/web/style.scss' ) );
		} else {
			return;
		}

		$custom_styles = $this->getWebPost();
		if ( $custom_styles && ! empty( $custom_styles->post_content ) ) {
			// append the user's custom styles to the theme stylesheet prior to compilation
			$scss .= "\n" . $custom_styles->post_content;
		}

		$css = $this->customize( 'web', $scss, $overrides );

		$css = normalize_css_urls( $css );

		$css_file = $this->sass->pathToUserGeneratedCss() . '/style.css';
		\Pressbooks\Utility\put_contents( $css_file, $css );
	}
public function updateWebBookStyleSheet ( $ stylesheet = null ) { if ( CustomCss :: isCustomCss ( ) ) { // Compile pressbooks-book web stylesheet when using the *DEPRECATED* Custom CSS theme $ theme = wp_get_theme ( 'pressbooks-book' ) ; } else { $ theme = wp_get_theme ( $ stylesheet ) ; } // Populate $url-base variable so that links to images and other assets remain intact $ overrides = [ '$url-base: "' . $ theme -> get_stylesheet_directory_uri ( ) . '";' ] ; if ( $ this -> isCurrentThemeCompatible ( 1 ) ) { $ scss = \ Pressbooks \ Utility \ get_contents ( realpath ( $ this -> getDir ( $ theme ) . '/style.scss' ) ) ; } elseif ( $ this -> isCurrentThemeCompatible ( 2 ) || CustomCss :: isCustomCss ( ) ) { $ scss = \ Pressbooks \ Utility \ get_contents ( realpath ( $ this -> getDir ( $ theme ) . '/assets/styles/web/style.scss' ) ) ; } else { return ; } $ custom_styles = $ this -> getWebPost ( ) ; if ( $ custom_styles && ! empty ( $ custom_styles -> post_content ) ) { // append the user's custom styles to the theme stylesheet prior to compilation $ scss .= "\n" . $ custom_styles -> post_content ; } $ css = $ this -> customize ( 'web' , $ scss , $ overrides ) ; $ css = normalize_css_urls ( $ css ) ; $ css_file = $ this -> sass -> pathToUserGeneratedCss ( ) . '/style.css' ; \ Pressbooks \ Utility \ put_contents ( $ css_file , $ css ) ; }
Update and save the supplementary webBook stylesheet which incorporates user options, etc.

@param string $stylesheet Directory name for the theme. Defaults to current theme.
@return void
Update and save the supplementary webBook stylesheet which incorporates user options etc .