PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / trunk
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vtrunk
4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 All 135 releases
← All changes | inc/conflicts/conflict_manager.php +4 -4 2.5.7 → trunk View file →
@@ -54,10 +54,10 @@
54 54 * @access public
55 55 * @param string $conflict A conflict class name.
56 56 */
57 57 public function watch( $conflict ) {
58 - if ( is_subclass_of( new $conflict, 'Optml_Abstract_Conflict' ) ) {
59 - array_push( $this->watched_conflicts, new $conflict );
58 + if ( is_subclass_of( new $conflict(), 'Optml_Abstract_Conflict' ) ) {
59 + array_push( $this->watched_conflicts, new $conflict() );
60 60 }
61 61 }
62 62
63 63 /**
@@ -140,9 +140,9 @@
140 140 * @access public
141 141 * @return int
142 142 */
143 143 public function get_conflict_count() {
144 - if ( empty( $this->watched_conflicts ) || sizeof( $this->watched_conflicts ) === 0 ) {
144 + if ( empty( $this->watched_conflicts ) ) {
145 145 return 0;
146 146 }
147 147
148 148 $count = 0;
@@ -152,9 +152,9 @@
152 152 * @var Optml_Abstract_Conflict $conflict
153 153 */
154 154 foreach ( $this->watched_conflicts as $conflict ) {
155 155 if ( $conflict->is_active( $this->dismissed_conflicts ) ) {
156 - $count++;
156 + ++$count;
157 157 }
158 158 }
159 159 return $count;
160 160 }