403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.15.27.146
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/jenniferflocom/public_html/wp-content/plugins/give/src/DonorDashboards/Tabs/Contracts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/jenniferflocom/public_html/wp-content/plugins/give/src/DonorDashboards/Tabs/Contracts/Tab.php
<?php

namespace Give\DonorDashboards\Tabs\Contracts;

use Give\DonorDashboards\Tabs\Contracts\Route as RouteAbstract;
use Give\Framework\Exceptions\Primitives\RuntimeException;

/**
 * Class Tab
 *
 * Extend this class when creating Donor Profile tabs.
 *
 * @since 2.10.0
 */
abstract class Tab
{
    /**
     * Return array of routes (must extend DonorDashboard Route class)
     *
     * @since 2.10.0
     * @return array
     */
    abstract public function routes();

    /**
     * Return a unique identifier for the tab
     *
     * @since 2.10.0
     * @return string
     */
    public static function id()
    {
        throw new RuntimeException('A unique ID must be provided for the tab');
    }

    /**
     * Enqueue assets required for frontend rendering of tab
     *
     * @since 2.10.0
     */
    public function enqueueAssets()
    {
        return null;
    }

    /**
     * Registers routes with WP REST api
     *
     * @since 2.10.0
     */
    public function registerRoutes()
    {
        $routeClasses = $this->routes();
        foreach ($routeClasses as $routeClass) {
            if ( ! is_subclass_of($routeClass, RouteAbstract::class)) {
                throw new \InvalidArgumentException(
                    $routeClass . ' must extend the ' . RouteAbstract::class . ' class'
                );
            }
            (new $routeClass)->registerRoute();
        }
    }

    public function registerTab()
    {
        give()->donorDashboardTabs->addTab(get_called_class());
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit