-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In case anyone needs to add Gutenbergs blocks to the plugin:
- Create the folder "Gutenbergs".
- Create a file inside: Gutenbergs_Loader.php
- Create a file inside: MyGutenberg.php
- Change Plugin.php file.
Gutenbergs_Loader.php content:
<?php
namespace VendorName\PluginName\Gutenbergs;
use VendorName\PluginName\Plugin;
class Gutenbergs_Loader extends Plugin
{
public function __construct()
{
new MyGutenberg();
}
}
MyGutenberg.php content:
<?php
namespace VendorName\PluginName\Gutenbergs;
use VendorName\PluginName\Plugin;
use Carbon_Fields\Block;
use Carbon_Fields\Field;
class MyGutenberg extends Plugin {
public function __construct() {
CARBON FIELDS BLOCK CODE
}
}
https://docs.carbonfields.net/learn/containers/gutenberg-blocks.html
Plugin.php content
// Load Gutenbergs new Gutenbergs\Gutenbergs_Loader();
at load_plugin()
Metadata
Metadata
Assignees
Labels
No labels