AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/elementor-pro/modules/notes/data/endpoints/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/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 );
	}
}

Anon7 - 2022
AnonSec Team