PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.1
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.1
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
imagify / classes / ThirdParty / Hostings / Extendify.php

Extendify.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.1, at classes/ThirdParty/Hostings/Extendify.php

41 lines 782 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 declare( strict_types=1 );
3
4 namespace Imagify\ThirdParty\Hostings;
5
6 use Imagify\EventManagement\SubscriberInterface;
7
8 /**
9 * Extendify compatibility class
10 */
11 class Extendify implements SubscriberInterface {
12 /**
13 * Returns an array of events that this subscriber wants to listen to.
14 *
15 * @return array
16 */
17 public static function get_subscribed_events(): array {
18 return [
19 // @filter
20 'imagify_hide_plugin_family' => 'hide_plugin_family',
21 ];
22 }
23
24 /**
25 * Hide the plugin family if the Extendify site ID option is present.
26 *
27 * @param bool $hide Current value.
28 *
29 * @return bool
30 */
31 public function hide_plugin_family( $hide ) {
32 $option = get_option( 'extendify_site_id', false );
33
34 if ( false === $option ) {
35 return $hide;
36 }
37
38 return true;
39 }
40 }
41