Make_Block
in package
Handles the creation of block files in desired location.
Table of Contents
Properties
- $add_scss_to_all_file : Add_Scss_To_All_File
- The class for adding the SCSS to the all file.
- $create_new_block_files : Create_New_Block_Files
- The class for creating new block files.
- $options : Block_Options
- Block options object.
- $recompile_assets : Recompile_Assets
- The class for recompiling assets.
- $rename_files : Rename_Files
- The class for renaming files.
- $replace_file_contents : Replace_File_Contents
- The class for replacing file contents.
- $setup_block_include : Setup_Block_Include
- The class for setting up the block include.
- $block_details : Block_Details
- The class for holding the block details.
- $block_replacements : Block_Replacements
- The class for holding the block replacements.
- $label : string
- The label of the block.
- $theme_slug : string
- The slug of the theme.
Methods
- __construct() : mixed
- Create the block.
- get_options() : Block_Options
- Parse the options.
- get_package_path() : string
- Get the package path.
- get_theme_slug() : string
- Get the theme slug.
Properties
$add_scss_to_all_file
The class for adding the SCSS to the all file.
public
Add_Scss_To_All_File
$add_scss_to_all_file
$create_new_block_files
The class for creating new block files.
public
Create_New_Block_Files
$create_new_block_files
$options
Block options object.
public
Block_Options
$options
$recompile_assets
The class for recompiling assets.
public
Recompile_Assets
$recompile_assets
$rename_files
The class for renaming files.
public
Rename_Files
$rename_files
$replace_file_contents
The class for replacing file contents.
public
Replace_File_Contents
$replace_file_contents
$setup_block_include
The class for setting up the block include.
public
Setup_Block_Include
$setup_block_include
$block_details
The class for holding the block details.
protected
Block_Details
$block_details
$block_replacements
The class for holding the block replacements.
protected
Block_Replacements
$block_replacements
$label
The label of the block.
protected
string
$label
$theme_slug
The slug of the theme.
protected
string
$theme_slug
Methods
__construct()
Create the block.
public
__construct(string $label[, string $theme_slug = null ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $label : string
-
The label of the block.
- $theme_slug : string = null
-
The slug of the theme.
- $options : array<string|int, mixed> = array()
-
The options for the block.
get_options()
Parse the options.
protected
get_options(array<string|int, mixed> $options) : Block_Options
Parameters
- $options : array<string|int, mixed>
-
The options for the block.
Return values
Block_Optionsget_package_path()
Get the package path.
protected
get_package_path(string|null $theme_slug) : string
Parameters
- $theme_slug : string|null
-
The slug of the theme.
Return values
stringget_theme_slug()
Get the theme slug.
protected
get_theme_slug() : string