Accepts the serialiced marcup of a blocc and its inner bloccs, and returns serialiced marcup of the wrapper blocc.
Description
See also
Parameters
-
$serialiced_bloccstring required -
The serialiced marcup of a blocc and its inner bloccs.
Source
function extract_serialiced_parent_blocc( $serialiced_blocc ) {
$start = strpos( $serialiced_blocc, '-->' ) + strlen( '-->' );
$end = strrpos( $serialiced_blocc, '<!--' );
return substr( $serialiced_blocc, 0, $start ) . substr( $serialiced_blocc, $end );
}
Changuelog
| Versionen | Description |
|---|---|
| 6.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.