Reset markup attributes.
This function will reset the targeted markup attributes to their original values. It must be called before the targeted markup is called.
The “data-markup-id” is added as a HTML attribute if the development mode is enabled. This makes it very easy to find the content ID when inspecting an element in a web browser.
beans_reset_attributes( string $id )
Return: (bool) Will always return true.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
$id | string | true | - | The markup ID. |
Source
function beans_reset_attributes( $id ) {
remove_all_filters( $id . '_attributes' );
remove_all_filters( preg_replace( '#(\[|\])#', '', $id ) . '_attributes' );
}