Blocks

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

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_Options

get_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
string

get_theme_slug()

Get the theme slug.

protected get_theme_slug() : string
Return values
string

        
On this page

Search results