You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
}
In case anyone needs to add Gutenbergs blocks to the plugin:
Gutenbergs_Loader.php content:
MyGutenberg.php content:
https://docs.carbonfields.net/learn/containers/gutenberg-blocks.html
Plugin.php content
// Load Gutenbergs new Gutenbergs\Gutenbergs_Loader();
at load_plugin()The text was updated successfully, but these errors were encountered: