芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/elementor/modules/checklist/data/endpoints/user-progress.php
register_items_route( \WP_REST_Server::EDITABLE ); } public function get_name() : string { return 'user-progress'; } public function get_format() : string { return 'checklist'; } public function get_items( $request ) { return $this->get_checklist_data(); } public function update_items( $request ) { Checklist_Module::instance()->update_user_progress( $request->get_json_params() ); return [ 'data' => 'success', ]; } private function get_checklist_data(): array { $checklist_module = Checklist_Module::instance(); $progress_data = $checklist_module->get_user_progress_from_db(); return [ 'data' => $progress_data, ]; } }