<?php
namespace Wpupgrader\WordPress\Plugins\GdprConsentLite\Hooks\Actions;

class wp_footer extends \Wpupgrader\Libraries\WordPress\Plugins\Core\Hooks\AbstractAction
{
    /**
     * This method is invoked by Wordpress
     */
    static public function invoke()
    {
        static::addPermissionBar();
    }

    static protected function addPermissionBar()
    {
        $plugin = &\Wpupgrader\WordPress\Plugins\GdprConsentPlugin\GdprConsentPlugin::getInstance();
        if (!$plugin::$settingsOnPage) {
            $block = $plugin->getBlock('Permissionbar');
            echo $block->render();
        }
    }
}
