芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/fluent-smtp/app/Http/Controllers/Controller.php
app = App::getInstance(); $this->request = $this->app['request']; $this->response = $this->app['response']; } public function send($data = null, $code = 200) { return $this->response->send($data, $code); } public function sendSuccess($data = null, $code = 200) { return $this->response->sendSuccess($data, $code); } public function sendError($data = null, $code = 422) { return $this->response->sendError($data, $code); } public function verify() { $permission = 'manage_options'; if(!current_user_can($permission)) { wp_send_json_error([ 'message' => __('You do not have permission to do this action', 'fluent-smtp') ]); die(); } $nonce = $this->request->get('nonce'); if(!wp_verify_nonce($nonce, FLUENTMAIL)) { wp_send_json_error([ 'message' => __('Security Failed. Please reload the page', 'fluent-smtp') ]); die(); } return true; } }