$59 GRAYBYTE WORDPRESS FILE MANAGER $14

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

/home/bravrvjk/itiministry.org/wp-content/plugins/give/src/API/Endpoints/Logs/

HOME
Current File : /home/bravrvjk/itiministry.org/wp-content/plugins/give/src/API/Endpoints/Logs//FlushLogs.php
<?php

namespace Give\API\Endpoints\Logs;

use Give\Log\LogRepository;
use WP_REST_Request;
use WP_REST_Response;

/**
 * Class FlushLogs
 * @package Give\API\Endpoints\Logs
 *
 * @since 2.10.0
 */
class FlushLogs extends Endpoint
{

    /** @var string */
    protected $endpoint = 'logs/flush-logs';

    /**
     * @var LogRepository
     */
    private $logRepository;

    /**
     * GetLogs constructor.
     *
     * @param LogRepository $repository
     */
    public function __construct(LogRepository $repository)
    {
        $this->logRepository = $repository;
    }

    /**
     * @inheritDoc
     */
    public function registerRoute()
    {
        register_rest_route(
            'give-api/v2',
            $this->endpoint,
            [
                [
                    'methods' => 'DELETE',
                    'callback' => [$this, 'handleRequest'],
                    'permission_callback' => [$this, 'permissionsCheck'],
                    'args' => [],
                ],
                'schema' => [$this, 'getSchema'],
            ]
        );
    }

    /**
     * @return array
     */
    public function getSchema()
    {
        return [
            '$schema' => 'http://json-schema.org/draft-04/schema#',
            'title' => 'logs',
            'type' => 'object',
            'properties' => [],
        ];
    }

    /**
     * @param WP_REST_Request $request
     *
     * @return WP_REST_Response
     */
    public function handleRequest(WP_REST_Request $request)
    {
        $this->logRepository->flushLogs();

        return new WP_REST_Response(['status' => 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
Endpoint.php
1.019 KB
28 Jan 2026 8.00 PM
bravrvjk / bravrvjk
0644
FlushLogs.php
1.592 KB
24 Nov 2021 4.55 AM
bravrvjk / bravrvjk
0644
GetLogs.php
5.751 KB
5 Jun 2024 11.47 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF