403Webshell
Server IP : 185.143.234.131  /  Your IP : 185.215.232.195
Web Server : LiteSpeed
System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
User : renecafe ( 1327)
PHP Version : 8.1.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/elementor-pro/modules/notes/data/endpoints/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/elementor-pro/modules/notes/data/endpoints/summary-endpoint.php
<?php
namespace ElementorPro\Modules\Notes\Data\Endpoints;

use Elementor\Data\V2\Base\Endpoint;
use ElementorPro\Modules\Notes\User\Capabilities;
use ElementorPro\Modules\Notes\Database\Models\Note_Summary;

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

class Summary_Endpoint extends Endpoint {
	public function get_name() {
		return 'summary';
	}

	public function get_format() {
		return 'notes/summary';
	}

	/**
	 * Register the endpoint routes.
	 *
	 * @return void
	 */
	protected function register() {
		$this->register_items_route(
			\WP_REST_Server::READABLE,
			$this->get_controller()->get_collection_params()
		);
	}

	/**
	 * Index route.
	 *
	 * GET `/notes/summary`
	 *
	 * @param \WP_REST_Request $request
	 *
	 * @return array
	 */
	protected function get_items( $request ) {
		$user_id = get_current_user_id();

		$query = Note_Summary::query()
			->only_visible( $user_id )
			->only_visible_posts( $user_id );

		foreach ( $this->get_controller()->get_filters() as $param => $callback ) {
			if ( $request->has_param( $param ) ) {
				call_user_func( $callback, $query, $request->get_param( $param ) );
			}
		}

		return [
			'data' => $query->get(),
			'meta' => [],
		];
	}

	/**
	 * @inheritDoc
	 */
	public function get_permission_callback( $request ) {
		return current_user_can( Capabilities::READ_NOTES );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit