REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 2.01 KB
Close
//home/certprox/template.certproxywizard.com/wp-content/plugins/woolentor-addons/includes/traits/module-base.php
Text
Base64
<?php namespace WooLentor\Traits; trait ModuleBase { /** * Enabled. */ private static $_enabled = true; private static $_instance = null; /** * Get Instance */ public static function instance( $enabled = true ){ self::$_enabled = $enabled; if( is_null( self::$_instance ) ){ self::$_instance = new self(); } return self::$_instance; } /** * Check WooLentor Pro is active * @return bool */ private function is_pro(){ if( is_plugin_active('woolentor-addons-pro/woolentor_addons_pro.php') && defined( "WOOLENTOR_ADDONS_PL_PATH_PRO" ) ){ return true; }else{ return false; } } /** * Check if the current request is a REST API request. * @return bool */ private function is_rest_api_request() { if ( empty( $_SERVER['REQUEST_URI'] ) ) { return false; } $rest_prefix = trailingslashit( rest_get_url_prefix() ); $is_rest_api_request = ( false !== strpos( $_SERVER['REQUEST_URI'], $rest_prefix ) ); // phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized return $is_rest_api_request; } /** * What type of request is this? * * @param string $type admin, ajax, cron or frontend. */ private function is_request( $type ) { switch ( $type ) { case 'admin' : return is_admin(); case 'ajax' : return defined( 'DOING_AJAX' ); case 'rest' : return ( defined( 'REST_REQUEST' ) || $this->is_rest_api_request() ); case 'cron' : return defined( 'DOING_CRON' ); case 'frontend' : return ( ! is_admin() || defined( 'DOING_AJAX' ) || ( ! empty( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] ) ) && ! defined( 'DOING_CRON' ); } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
module-base.php
2.01 KB
lrw-r--r--
2026-06-11 12:51:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
singleton.php
306 B
lrw-r--r--
2026-06-11 12:51:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).