1 block.module | _block_custom_block_name_exists($value) |
Render API callback: Checks if a custom block machine name is taken.
@since 1.32.1 Function added.
Parameters
string $value: The machine name.
Return value
bool|null: Whether or not the custom block machine name is taken, or null if $value is empty.
File
- core/
modules/ block/ block.module, line 364 - Provides the ability to create reusable custom blocks.
Code
function _block_custom_block_name_exists($value) {
if (!empty($value)) {
return (bool) block_custom_block_load($value);
}
}