PluginProbe
Image Source Control Lite – Show Image Credits and Captions / trunk
Image Source Control Lite – Show Image Credits and Captions vtrunk
3.12.0 3.11.0 trunk 1.1 1.1.1 1.1.2 1.1.2.1 1.1.3 1.10 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.2 1.2.0.1 1.2.0.2 1.2.0.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.4.1 1.3.5 All 110 releases
image-source-control-isc / includes / plugin.php

plugin.php in Image Source Control Lite – Show Image Credits and Captions trunk, at includes/plugin.php

38 lines 680 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ISC;
4
5 /**
6 * Plugin class
7 */
8 class Plugin {
9 use Options;
10
11 /**
12 * Check if this is the pro version
13 *
14 * @return bool
15 */
16 public static function is_pro(): bool {
17 return defined( 'ISCPRO' );
18 }
19
20 /**
21 * Return true if the mentioned module is enabled
22 *
23 * @param string $module module name.
24 *
25 * @return bool
26 */
27 public static function is_module_enabled( string $module ) {
28 $options = self::get_options();
29
30 // all modules are enabled by default; i.e., when the option is not set
31 if ( ! isset( $options['modules'] ) ) {
32 return true;
33 }
34
35 return ( is_array( $options['modules'] ) && in_array( $module, $options['modules'], true ) );
36 }
37 }
38