PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
tier-pricing-table / src / Addons / LayoutConfigurator / LayoutConfiguratorAddon.php

LayoutConfiguratorAddon.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/LayoutConfigurator/LayoutConfiguratorAddon.php

41 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\LayoutConfigurator;
2
3 use TierPricingTable\Addons\AbstractAddon;
4
5 /**
6 * Layout configurator add-on: the visual editor for the product-page pricing layout with a live
7 * preview. Switched off, the settings page shows the classic layout rows instead.
8 */
9 class LayoutConfiguratorAddon extends AbstractAddon {
10
11 const SLUG = 'layout-configurator';
12
13 public function getName(): string {
14 return __( 'Layout Configurator', 'tier-pricing-table' );
15 }
16
17 public function getDescription(): string {
18 return __( 'Visual editor for the product page pricing layout with a live preview. Switch it off to get the classic layout settings rows back.', 'tier-pricing-table' );
19 }
20
21 public function getIcon(): string {
22 return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"/></svg>';
23 }
24
25 public function getSlug(): string {
26 return self::SLUG;
27 }
28
29 /**
30 * Whether the add-on is switched on. Same rule as isEnabled(), usable without an instance.
31 */
32 public static function isActive(): bool {
33 return self::isAddonEnabled( self::SLUG );
34 }
35
36 public function run() {
37 $this->getContainer()->add( 'settings.layout_preview', new LayoutPreview() );
38 $this->getContainer()->add( 'settings.layout_configurator', new LayoutConfigurator() );
39 }
40 }
41