CLI
1 year ago
Core
1 month ago
DemoSites
1 month ago
AssetsDependencyInjector.php
1 year ago
Config.php
1 year ago
FileLog.php
1 year ago
Flags.php
1 year ago
GoogleFontsLocalLoader.php
1 year ago
GutenbergControls.php
1 year ago
Migrations.php
1 year ago
NotificationsManager.php
1 month ago
PluginsManager.php
2 years ago
GutenbergControls.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Kubio; |
| 5 | |
| 6 | class GutenbergControls { |
| 7 | private static $instance = null; |
| 8 | protected function __construct() { |
| 9 | add_action( 'after_setup_theme', array( $this, 'addGutenbergControls' ) ); |
| 10 | } |
| 11 | |
| 12 | public function addGutenbergControls() { |
| 13 | add_theme_support( 'border' ); |
| 14 | add_theme_support( 'custom-background', array() ); |
| 15 | add_theme_support( 'link-color' ); |
| 16 | add_theme_support( 'custom-spacing' ); |
| 17 | add_theme_support( 'custom-units' ); |
| 18 | add_theme_support( 'link-color' ); |
| 19 | } |
| 20 | |
| 21 | public static function getInstance() { |
| 22 | if ( ! static::$instance ) { |
| 23 | static::$instance = new static(); |
| 24 | } |
| 25 | |
| 26 | return static::$instance; |
| 27 | } |
| 28 | |
| 29 | public static function load() { |
| 30 | static::getInstance(); |
| 31 | } |
| 32 | } |
| 33 |