PluginProbe
Property Hive / 2.3.1
Property Hive v2.3.1
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
← All changes | includes/libraries/class-emogrifier.php +12 -2 2.2.22.3.1 View file →
@@ -1,5 +1,9 @@
1 1 <?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit;
4 +}
5 +
2 6 /**
3 7 * This class provides functions for converting CSS styles into inline style attributes in your HTML code.
4 8 *
5 9 * For more information, please see the README.md file.
@@ -10,9 +14,10 @@
10 14 * @author Jaime Prado
11 15 * @author Oliver Klee <typo3-coding@oliverklee.de>
12 16 * @author Roman Ožana <ozana@omdesign.cz>
13 17 */
14 -class Emogrifier
18 +// Locally prefixed to avoid collisions with other plugins bundling this library.
19 +class PropertyHive_Emogrifier
15 20 {
16 21 /**
17 22 * @var int
18 23 */
@@ -431,8 +436,9 @@
431 436 self::CACHE_KEY_CSS_DECLARATIONS_BLOCK,
432 437 self::CACHE_KEY_COMBINED_STYLES,
433 438 );
434 439 if ( ! in_array($key, $allowedCacheKeys, true) ) {
440 + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Internal diagnostic; PH_Emails::style_inline() escapes caught exception messages before displaying them.
435 441 throw new InvalidArgumentException('Invalid cache key: ' . $key, 1391822035);
436 442 }
437 443
438 444 $this->caches[ $key ] = array();
@@ -1226,5 +1232,9 @@
1226 1232 }
1227 1233
1228 1234 return $excludedNodes;
1229 1235 }
1230 -}
1236 +}
1237 +// Keep direct consumers of the bundled library compatible without using another plugin's implementation.
1238 +if ( ! class_exists( 'Emogrifier', false ) ) {
1239 + class_alias( 'PropertyHive_Emogrifier', 'Emogrifier' );
1240 +}