From f26882d28098008e04bece7465ae6c6d0ad60b03 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 24 Mar 2019 00:23:55 -0400 Subject: [PATCH] fixes #149 --- src/class-plugin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/class-plugin.php b/src/class-plugin.php index 4cb2e8a..5174b48 100644 --- a/src/class-plugin.php +++ b/src/class-plugin.php @@ -53,6 +53,11 @@ public function __construct( Assets_Handler $assets_handler = null ) { * @throws Exception\Plugin_Activation_Failure If a condition for plugin activation isn't met. */ public function activate() { + if ( ! is_callable( 'shell_exec' ) || false !== stripos( ini_get( 'disable_functions' ), 'shell_exec' ) ) { + $error_message = esc_html__( 'Theme Sniffer requires shell_exec to be enabled to function.', 'theme-sniffer' ); + throw Exception\Plugin_Activation_Failure::activation_message( $error_message ); + }; + if ( ! function_exists( 'is_plugin_active_for_network' ) ) { include_once ABSPATH . '/wp-admin/includes/plugin.php'; }