$50 GRAYBYTE WORDPRESS FILE MANAGER $72

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/hpgt.org/wp-content/plugins/elementor/modules/favorites/

HOME
Current File : /home/bravrvjk/hpgt.org/wp-content/plugins/elementor/modules/favorites//controller.php
<?php

namespace Elementor\Modules\Favorites;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

use Elementor\Data\V2\Base\Controller as Controller_Base;
use Elementor\Plugin;

class Controller extends Controller_Base {

	public function get_name() {
		return 'favorites';
	}

	public function create_item( $request ) {
		$module = $this->get_module();
		$type = $request->get_param( 'id' );
		$favorite = $request->get_param( 'favorite' );

		$module->update( $type, $favorite, $module::ACTION_MERGE );

		return $module->get( $type );
	}

	public function delete_item( $request ) {
		$module = $this->get_module();
		$type = $request->get_param( 'id' );
		$favorite = $request->get_param( 'favorite' );

		$module->update( $type, $favorite, $module::ACTION_DELETE );

		return $module->get( $type );
	}

	public function create_item_permissions_check( $request ) {
		return current_user_can( 'edit_posts' );
	}

	public function delete_item_permissions_check( $request ) {
		return $this->create_item_permissions_check( $request );
	}

	/**
	 * Get the favorites module instance.
	 *
	 * @return Module
	 */
	protected function get_module() {
		return Plugin::instance()->modules_manager->get_modules( 'favorites' );
	}

	public function register_endpoints() {
		$this->index_endpoint->register_item_route( \WP_REST_Server::CREATABLE, [
			'id_arg_type_regex' => '[\w]+',
			'id' => [
				'description' => 'Type of favorites.',
				'type' => 'string',
				'required' => true,
			],
			'favorite' => [
				'description' => 'The favorite slug to create.',
				'type' => 'string',
				'required' => true,
			],
		] );

		$this->index_endpoint->register_item_route( \WP_REST_Server::DELETABLE, [
			'id_arg_type_regex' => '[\w]+',
			'id' => [
				'description' => 'Type of favorites.',
				'type' => 'string',
				'required' => true,
			],
			'favorite' => [
				'description' => 'The favorite slug to delete.',
				'type' => 'string',
				'required' => true,
			],
		] );
	}
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
types
--
4 Apr 2026 1.57 AM
bravrvjk / bravrvjk
0755
controller.php
1.953 KB
23 Apr 2023 3.22 PM
bravrvjk / bravrvjk
0644
favorites-type.php
0.787 KB
23 Apr 2023 3.22 PM
bravrvjk / bravrvjk
0644
module.php
4.956 KB
21 Oct 2025 4.51 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF