| 1 |
<?php |
| 2 |
|
| 3 |
namespace Codelight\GDPR\Components\PrivacyManager; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 6 |
|
| 7 |
use Codelight\GDPR\Admin\AdminTab; |
| 8 |
|
| 9 |
class AdminTabPrivacyManager extends AdminTab |
| 10 |
{ |
| 11 |
/* @var string */ |
| 12 |
protected $slug = 'privacy-manager'; |
| 13 |
|
| 14 |
/* @var PolicyGenerator */ |
| 15 |
protected $policyGenerator; |
| 16 |
|
| 17 |
public function __construct() |
| 18 |
{ |
| 19 |
$this->title = _x('Global Privacy Manager', '(Admin)', 'gdpr-framework'); |
| 20 |
|
| 21 |
add_action('gdpr/admin/action/PrivacyManager/generate', [$this, 'generatePrivacyManager']); |
| 22 |
} |
| 23 |
|
| 24 |
public function init() |
| 25 |
{ |
| 26 |
/** |
| 27 |
* General settings |
| 28 |
*/ |
| 29 |
$this->registerSettingSection( |
| 30 |
'gdpr_section_privacy_policy', |
| 31 |
_x('Privacy Manager', '(Admin)', 'gdpr-framework'), |
| 32 |
[$this, 'renderHeader'] |
| 33 |
); |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
public function renderHeader() |
| 38 |
{ |
| 39 |
echo gdpr('view')->render('admin/privacy-manager/header'); |
| 40 |
} |
| 41 |
|
| 42 |
public function renderSubmitButton() |
| 43 |
{ |
| 44 |
// submit_button(_x('Save', '(Admin)', 'gdpr-framework')); |
| 45 |
} |
| 46 |
|
| 47 |
} |
| 48 |
|