/** * What encoding types to accept and their priority values. * * @since 2.8.0 * * @param string $url * @param array $args * @return string Types of encoding to accept. */ public static function accept_encoding( $url, $args ) { $type = array(); $compression_enabled = self::is_available(); if ( ! $args['decompress'] ) { // Decompression specifically disabled. $compression_enabled = false; } elseif ( $args['stream'] ) { // Disable when streaming to file. $compression_enabled = false; } elseif ( isset( $args['limit_response_size'] ) ) { // If only partial content is being requested, we won't be able to decompress it. $compression_enabled = false; } if ( $compression_enabled ) { if ( function_exists( 'gzinflate' ) ) { $type[] = 'deflate;q=1.0'; } if ( function_exists( 'gzuncompress' ) ) { $type[] = 'compress;q=0.5'; } if ( function_exists( 'gzdecode' ) ) { $type[] = 'gzip;q=0.5'; } } /** * Filters the allowed encoding types. * * @since 3.6.0 * * @param string[] $type Array of what encoding types to accept and their priority values. * @param string $url URL of the HTTP request. * @param array $args HTTP request arguments. */ $type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args ); return implode( ', ', $type ); } /** * What encoding the content used when it was compressed to send in the headers. * * @since 2.8.0 * * @return string Content-Encoding string to send in the header. */ public static function content_encoding() { return 'deflate'; } /** * Whether the content be decoded based on the headers. * * @since 2.8.0 * * @param array|string $headers All of the available headers. * @return bool */ public static function should_decode( $headers ) { if ( is_array( $headers ) ) { if ( array_key_exists( 'content-encoding', $headers ) && ! empty( $headers['content-encoding'] ) ) { return true; } } elseif ( is_string( $headers ) ) { return ( stripos( $headers, 'content-encoding:' ) !== false ); } return false; } /** * Whether decompression and compression are supported by the PHP version. * * Each function is tested instead of checking for the zlib extension, to * ensure that the functions all exist in the PHP version and aren't * disabled. * * @since 2.8.0 * * @return bool */ public static function is_available() { return ( function_exists( 'gzuncompress' ) || function_exists( 'gzdeflate' ) || function_exists( 'gzinflate' ) ); } } $paragraph->cellpadding = 0; $nextElement = $paragraph->getNextSibling(); // unless this is the last element in column, add double line breaks $lineBreaks = ($nextElement && !trim($nextElement->text())) ? '

' : ''; // if this element is followed by a list, add single line break $lineBreaks = ($nextElement && preg_match('/
  • getOuterText())) ? '
    ' : $lineBreaks; if ($paragraph->hasClass(PostContentManager::WP_POST_CLASS)) { $paragraph->removeClass(PostContentManager::WP_POST_CLASS); // if this element is followed by a paragraph or heading, add double line breaks $lineBreaks = ($nextElement && preg_match('/<(p|h[1-6]{1})/i', $nextElement->getOuterText())) ? '

    ' : $lineBreaks; } $paragraph->html(' ' . $contents . $lineBreaks . ' '); } return $DOM->__toString(); } public function styleLists($html) { $dOMParser = new pQuery(); $DOM = $dOMParser->parseStr($html); $lists = $DOM->query('ol, ul, li'); if (!$lists->count()) return $html; foreach ($lists as $list) { if ($list->tag === 'li') { $list->setInnertext($list->toString(true, true, 1)); $list->class = 'mailpoet_paragraph'; } else { $list->class = 'mailpoet_paragraph'; $list->style = StylesHelper::joinStyles($list->style, 'padding-top:0;padding-bottom:0;margin-top:10px;'); } $list->style = StylesHelper::applyTextAlignment($list->style); $list->style = StylesHelper::joinStyles($list->style, 'margin-bottom:10px;'); $list->style = EHelper::escapeHtmlStyleAttr($list->style); } return $DOM->__toString(); } public function styleHeadings($html) { $dOMParser = new pQuery(); $DOM = $dOMParser->parseStr($html); $headings = $DOM->query('h1, h2, h3, h4'); if (!$headings->count()) return $html; foreach ($headings as $heading) { $heading->style = StylesHelper::applyTextAlignment($heading->style); $heading->style = StylesHelper::joinStyles($heading->style, 'padding:0;font-style:normal;font-weight:normal;'); $heading->style = EHelper::escapeHtmlStyleAttr($heading->style); } return $DOM->__toString(); } public function removeLastLineBreak($html) { return preg_replace('/(^)?(]*?\/?>)+$/i', '', $html); } public function insertLineBreak($element) { $element->parent->insertChild( [ 'tag_name' => 'br', 'self_close' => true, 'attributes' => [], ], $element->index() + 1 ); return $element; } }
    Fatal error: Uncaught Error: Class "MailPoet\Newsletter\Renderer\Blocks\Text" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:3991 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4001): MailPoetGenerated\FreeCachedContainer->getRenderer4Service() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4031): MailPoetGenerated\FreeCachedContainer->getBodyRendererService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5088): MailPoetGenerated\FreeCachedContainer->getRenderer6Service() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5098): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailCustomizerService() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5198): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailMailerService() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5368): MailPoetGenerated\FreeCachedContainer->getSubscriberActionsService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getCommentService() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #8 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #9 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #10 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #11 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #12 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #13 /htdocs/wp-settings.php(545): include_once('/htdocs/wp-cont...') #14 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #15 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #16 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #17 /htdocs/index.php(17): require('/htdocs/wp-blog...') #18 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 3991