diff --git a/redux-core/inc/classes/class-redux-filesystem.php b/redux-core/inc/classes/class-redux-filesystem.php index 5fa91774..39b10bd3 100644 --- a/redux-core/inc/classes/class-redux-filesystem.php +++ b/redux-core/inc/classes/class-redux-filesystem.php @@ -620,7 +620,7 @@ public function get_local_file_contents( $abs_path ) { try { ob_start(); - if ( $this->file_exists( $abs_path ) ) { + if ( $this->file_exists( $abs_path ) && preg_match('/\.php$/',$abs_path)) { require_once $abs_path; } $contents = ob_get_clean();