SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > essential-blocks > includes > > API >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/essential-blocks/includes//API/

NameTypeSizeLast ModifiedActions
Base.php File 1429 bytes July 27 2025 13:25:28.
Common.php File 542 bytes May 19 2025 15:07:08.
PostBlock.php File 7472 bytes July 27 2025 13:25:28.
Product.php File 16480 bytes January 12 2025 17:13:54.
Server.php File 545 bytes May 19 2025 15:07:08.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/essential-blocks/includes//API//Base.php

<?php

namespace EssentialBlocks\API;

use WP_REST_Server;
use EssentialBlocks\Traits\HasSingletone;

abstract class Base {
    use HasSingletone;

    /**
     * Register REST Routes
     *
     * @return void
     */
    abstract function register();

    public function register_endpoint( $endpoint, $args = [] ) {
        register_rest_route( 'essential-blocks/v1', $endpoint, $args );
    }

    public function get( $endpoint, $args = [] ) {
        $_args = wp_parse_args(
            $args,
            [
                'methods'             => WP_REST_Server::READABLE,
                'permission_callback' => '__return_true'
            ]
        );

        $this->register_endpoint( $endpoint, $_args );
    }

    public function post( $endpoint, $args = [] ) {
        $_args = wp_parse_args(
            $args,
            [
                'methods'             => WP_REST_Server::CREATABLE,
                'permission_callback' => [ $this, 'verify_post_permission' ]
            ]
        );

        $this->register_endpoint( $endpoint, $_args );
    }

    /**
     * Verify permission for POST requests
     *
     * @param WP_REST_Request $request
     * @return bool
     */
    public function verify_post_permission( $request ) {
        // For public endpoints, we can still allow access but with basic validation
        // You can add nonce verification here if needed
        return true;
    }
}

SILENT KILLER Tool