$91 GRAYBYTE WORDPRESS FILE MANAGER $38

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/dantho.rw/wp-content/plugins/elementor/core/editor/data/globals/endpoints/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/elementor/core/editor/data/globals/endpoints//base.php
<?php
namespace Elementor\Core\Editor\Data\Globals\Endpoints;

use Elementor\Data\V2\Base\Endpoint;
use Elementor\Data\V2\Base\Exceptions\Data_Exception;
use Elementor\Data\V2\Base\Exceptions\Error_404;
use Elementor\Plugin;

abstract class Base extends Endpoint {
	protected function register() {
		parent::register();

		$args = [
			'id_arg_type_regex' => '[\w]+',
		];

		$this->register_item_route( \WP_REST_Server::READABLE, $args );
		$this->register_item_route( \WP_REST_Server::CREATABLE, $args );
		$this->register_item_route( \WP_REST_Server::DELETABLE, $args );
	}

	public function get_items( $request ) {
		return $this->get_kit_items();
	}

	/**
	 * @inheritDoc
	 * @throws \Elementor\Data\V2\Base\Exceptions\Error_404 Not found.
	 */
	public function get_item( $id, $request ) {
		$items = $this->get_kit_items();

		if ( ! isset( $items[ $id ] ) ) {
			throw new Error_404( esc_html__( 'The Global value you are trying to use is not available.', 'elementor' ),
				'global_not_found'
			);
		}

		return $items[ $id ];
	}

	public function create_item( $id, $request ) {
		$item = $request->get_body_params();

		if ( ! isset( $item['title'] ) ) {
			return new Data_Exception( esc_html__( 'Invalid title', 'elementor' ), 'invalid_title' );
		}

		$kit = Plugin::$instance->kits_manager->get_active_kit();

		$item['id'] = $id;

		$db_item = $this->convert_db_format( $item );

		$kit->add_repeater_row( 'custom_' . $this->get_name(), $db_item );

		return $item;
	}

	abstract protected function get_kit_items();

	/**
	 * @param array $item frontend format.
	 * @return array backend format.
	 */
	abstract protected function convert_db_format( $item );
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
7 Nov 2025 6.34 AM
bravrvjk / bravrvjk
0755
base.php
1.636 KB
21 Oct 2025 3.45 PM
bravrvjk / bravrvjk
0644
colors.php
1.022 KB
13 Nov 2024 7.20 PM
bravrvjk / bravrvjk
0644
error_log
4.387 KB
7 Nov 2025 11.36 AM
bravrvjk / bravrvjk
0644
typography.php
1.593 KB
13 Nov 2024 7.20 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF