Add WordPress hook name to components.
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@axe-web/block-dev-tool",
|
"name": "@axe-web/block-dev-tool",
|
||||||
"version": "1.0.26",
|
"version": "1.0.27",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@axe-web/block-dev-tool",
|
"name": "@axe-web/block-dev-tool",
|
||||||
"version": "1.0.26",
|
"version": "1.0.27",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braintree/sanitize-url": "^6.0.0",
|
"@braintree/sanitize-url": "^6.0.0",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@axe-web/block-dev-tool",
|
"name": "@axe-web/block-dev-tool",
|
||||||
"version": "1.0.26",
|
"version": "1.0.27",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "AXE-WEB",
|
"name": "AXE-WEB",
|
||||||
"email": "office@axe-web.com",
|
"email": "office@axe-web.com",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>;
|
|||||||
|
|
||||||
class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor) { %>extends \Core\Component <% } %>{
|
class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor) { %>extends \Core\Component <% } %>{
|
||||||
const VERSION = '<%= version %>';
|
const VERSION = '<%= version %>';
|
||||||
|
public $hook_prefix = 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>';
|
||||||
|
|
||||||
<% if (!isComponentManager && !isElementor) { %>public function __construct() {
|
<% if (!isComponentManager && !isElementor) { %>public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>;
|
|||||||
|
|
||||||
class <%= blockClassModel %>_Component extends \Core\Component {
|
class <%= blockClassModel %>_Component extends \Core\Component {
|
||||||
const VERSION = '<%= version %>';
|
const VERSION = '<%= version %>';
|
||||||
|
public $hook_prefix = 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>';
|
||||||
|
|
||||||
public function get_content( $args = [] ): string {
|
public function get_content( $args = [] ): string {
|
||||||
$default_args = apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::default_args', [] ); // Not really practical.
|
$default_args = apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::default_args', [] ); // Not really practical.
|
||||||
|
|||||||
Reference in New Issue
Block a user