| 1 |
<?php namespace TierPricingTable\Addons\CustomColumns; |
| 2 |
|
| 3 |
use TierPricingTable\Addons\AbstractAddon; |
| 4 |
use TierPricingTable\Addons\CustomColumns\Admin\CustomColumnsAdmin; |
| 5 |
use TierPricingTable\Addons\CustomColumns\API\CustomColumnsEndpoints; |
| 6 |
|
| 7 |
class CustomColumnsAddon extends AbstractAddon { |
| 8 |
|
| 9 |
/** |
| 10 |
* Columns Manager |
| 11 |
* |
| 12 |
* @var CustomColumnsManager |
| 13 |
*/ |
| 14 |
public $columnsManager; |
| 15 |
|
| 16 |
public function getName(): string { |
| 17 |
return __( 'Custom table columns', 'tier-pricing-table' ); |
| 18 |
} |
| 19 |
|
| 20 |
public function getDescription(): string { |
| 21 |
return __( 'Add custom columns to your pricing table.', 'tier-pricing-table' ); |
| 22 |
} |
| 23 |
|
| 24 |
public function getIcon(): string { |
| 25 |
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 3h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1zm0 2v3h16V5H4zm0 5v10h4V10H4zm6 0v10h4V10h-4zm6 0v10h4V10h-4z"/></svg>'; |
| 26 |
} |
| 27 |
|
| 28 |
public function getSlug(): string { |
| 29 |
return 'custom-columns'; |
| 30 |
} |
| 31 |
|
| 32 |
public function run() { |
| 33 |
$this->columnsManager = CustomColumnsManager::getInstance(); |
| 34 |
|
| 35 |
new CustomColumnsEndpoints(); |
| 36 |
new CustomColumnsAdmin(); |
| 37 |
} |
| 38 |
} |
| 39 |
|