Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
fixes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
timelsass committed Mar 24, 2019
1 parent 1a990b7 commit f26882d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit f26882d

Please sign in to comment.