HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/studis.kauko.lt/wp-content/plugins/wp-statistics/src/Abstracts/UnlockedTabView.php
<?php
namespace WP_Statistics\Abstracts;

abstract class UnlockedTabView
{
    protected $tab;
    protected $page;

    public function __construct()
    {
        add_filter("wp_statistics_{$this->page}_{$this->tab}_locked", '__return_false');
        add_filter("wp_statistics_{$this->page}_{$this->tab}_tooltip", [$this, 'getTooltip']);
        add_action("wp_statistics_{$this->page}_{$this->tab}_template", [$this, 'view']);
        add_action("wp_statistics_{$this->page}_{$this->tab}_data", [$this, 'getData']);
    }

    /**
     * Returns the tooltip for the unlocked tab
     * @return string
     */
    abstract public function getTooltip();

    /**
     * Returns the data for the unlocked tab
     * @return array
     */
    public function getData()
    {
        return [];
    }

    /**
     * Render the view
     * @param mixed $args
     * @return void
     */
    abstract public function view($args);
}