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

Commit

Permalink
Merge pull request #153 from timelsass/fix/149
Browse files Browse the repository at this point in the history
fixes #149
  • Loading branch information
dingo-d authored Mar 25, 2019
2 parents 24ef64d + f26882d commit 8dc3ccb
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 8dc3ccb

Please sign in to comment.