Skip to content

Block Registrations Utilize Full Use Statements #99

@tarecord

Description

@tarecord

Our block registrations utilize full use statements so that we only use the Block's classname:

public function define(): array {
    return [
      self::TYPES => DI\add( [
        DI\get( Accordion::class ),
        // etc.
    ]
}

We should update this to match:

$definer_path = $this->src_path . 'Blocks/Blocks_Definer.php';
$type_registration = "\t\t\t\t" . sprintf( 'DI\get( Types\%1$s\%1$s::class ),', $class_name ) . "\n";
$allowlist_registration = "\t\t\t\t" . sprintf( "'acf/%s',", $type_name ) . "\n";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions