public/wordpress/wp-content/plugins/wp-courseware/includes/emails/email.php
/**
	 * Apply inline styles to dynamic content.
	 *
	 * @since 4.3.0
	 *
	 * @param string The content of the email.
	 *
	 * @return string The modified content of the email.
	 */
Apply inline styles to dynamic content.

@param string The content of the email.

@return string The modified content of the email.
Apply inline styles to dynamic content . @param string The content of the email . @return string The modified content of the email .
public function style_inline( $content ) {
		if ( in_array( $this->get_content_type(), array( 'text/html', 'multipart/alternative' ) ) && class_exists( 'DOMDocument' ) ) {
			ob_start();
			wpcw_get_template( 'emails/email-styles.php' );
			$css = apply_filters( 'wpcw_email_styles', ob_get_clean() );
			if ( ! class_exists( 'Emogrifier' ) ) {
				include_once( WPCW_LIB_PATH . 'emogrifier.php' );
			}
			try {
				$emogrifier = new \Emogrifier( $content, $css );
				$content    = $emogrifier->emogrify();
			} catch ( Exception $e ) {
				$e->getMessage();
			}
		}
		return $content;
	}
public function style_inline ( $ content ) { if ( in_array ( $ this -> get_content_type ( ) , array ( 'text/html' , 'multipart/alternative' ) ) && class_exists ( 'DOMDocument' ) ) { ob_start ( ) ; wpcw_get_template ( 'emails/email-styles.php' ) ; $ css = apply_filters ( 'wpcw_email_styles' , ob_get_clean ( ) ) ; if ( ! class_exists ( 'Emogrifier' ) ) { include_once ( WPCW_LIB_PATH . 'emogrifier.php' ) ; } try { $ emogrifier = new \ Emogrifier ( $ content , $ css ) ; $ content = $ emogrifier -> emogrify ( ) ; } catch ( Exception $ e ) { $ e -> getMessage ( ) ; } } return $ content ; }
Apply inline styles to dynamic content.
Apply inline styles to dynamic content .
// apply CSS styles inline for picky email clients