Add hook_prefix to Component object.
This commit is contained in:
@@ -9,7 +9,7 @@ const {isDev, developmentBlockName} = getConfigs();
|
|||||||
const blockName = !isDev && config.has('blockName') ? config.get('blockName') : developmentBlockName;
|
const blockName = !isDev && config.has('blockName') ? config.get('blockName') : developmentBlockName;
|
||||||
|
|
||||||
export const PLATFORM_OPTIONS = [{
|
export const PLATFORM_OPTIONS = [{
|
||||||
name: 'wordpress-blocks',
|
name: 'wordpress-acf-block',
|
||||||
title: 'WordPress AFC Block'
|
title: 'WordPress AFC Block'
|
||||||
}, {
|
}, {
|
||||||
name: 'wordpress',
|
name: 'wordpress',
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>;
|
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>;
|
||||||
|
|
||||||
class <%= blockClassModel %>_Component <% if (isComponentManager) { %>extends \Core\Component <% } %>{
|
class <%= blockClassModel %>_Component <% if (isComponentManager) { %>extends \Core\Component <% } %>{
|
||||||
const VERSION = '<%= version %>';
|
const VERSION = '<%= version %>';<% if (isComponentManager) { %>
|
||||||
|
public $hook_prefix = 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>';<% } %>
|
||||||
|
|
||||||
<% if (!isComponentManager) { %>public function __construct() {
|
<% if (!isComponentManager) { %>public function __construct() {
|
||||||
// add_action( 'wp_enqueue_scripts', [ $this, 'register_assets' ] );
|
// add_action( 'wp_enqueue_scripts', [ $this, 'register_assets' ] );
|
||||||
|
|||||||
Reference in New Issue
Block a user