GRAYBYTE WORDPRESS FILE MANAGER2974

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/metform/base/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/metform/base//api.php
<?php

namespace MetForm\Base;

defined('ABSPATH') || exit;

abstract class Api
{

    public $prefix = '';
    public $param = '';
    public $request = null;

    public function __construct()
    {
        $this->config();
        $this->init();
    }

    public abstract function config();

    public function init()
    {
        add_action('rest_api_init', function () {
            register_rest_route(untrailingslashit('metform/v1/' . $this->prefix), '/(?P<action>\w+)/' . ltrim($this->param, '/'), array(
                'methods' => \WP_REST_Server::ALLMETHODS,
                'callback' => [$this, 'action'],
                'permission_callback' => '__return_true',
            ));
        });
    }

    public function action($request)
    {
        $this->request = $request;
        $action_class = strtolower($this->request->get_method()) . '_' . $this->request['action'];

        if (method_exists($this, $action_class)) {

            return $this->{$action_class}();
            
        }
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
inteuuod / inteuuod
0644
api.php
1.041 KB
August 19 2020 11:58:10
inteuuod / inteuuod
0644
common.php
0.575 KB
March 04 2020 18:44:26
inteuuod / inteuuod
0644
cpt.php
0.381 KB
January 08 2023 15:19:54
inteuuod / inteuuod
0644
shortcode.php
7.474 KB
March 04 2024 16:09:22
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF