Available on: Newspaper V11+
This api call is used to delete one of the existing blocks.
It has more an internal meaning, because a component can’t be deleted if it’s already on use. The main purpose of the delete method is to unset a registered component that’s not already used on page, and which is not used any more on page until a component with the same $id is registered again.
Usage:
<?php td_api_block::delete( $id ) ?>
Parameters:
$id (string) (required)
- the block id – has to match with one of the blocks which are already registered in the theme
Examples:
In the following example we’ll delete the existing <em>Flex Block 1</em> , you can see how the code looks on plugin:
td_api_block::delete('td_flex_block_1');