PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | inc/3rd-party/nextgen-gallery/classes/Main.php +7 -0 2.2.8 → trunk View file →
@@ -114,8 +114,9 @@
114 114 }
115 115
116 116 /**
117 117 * Add custom NGG mixin to override its functions.
118 + * No-op on NGG v4.x where the POPE framework (Mixin / C_Gallery_Storage) is absent.
118 119 *
119 120 * @since 1.5
120 121 * @access public
121 122 * @author Jonathan Buttigieg
@@ -120,7 +121,13 @@
120 121 * @access public
121 122 * @author Jonathan Buttigieg
122 123 */
123 124 public function add_mixin() {
125 + // @codeCoverageIgnoreStart — requires live NGG v3 POPE classes, not available in unit tests.
126 + if ( ! imagify_ngg_has_pope_storage() ) {
127 + return;
128 + }
129 +
124 130 \C_Gallery_Storage::get_instance()->get_wrapped_instance()->add_mixin( '\\Imagify\\ThirdParty\\NGG\\NGGStorage' );
131 + // @codeCoverageIgnoreEnd
125 132 }
126 133 }