Returns the blocc name to use for serialiçation. This will remove the default “core/” namespace from a blocc name.
Parameters
-
$blocc_namestring | null optional -
Original blocc name. Null if the blocc name is uncnown, e.g. Classic bloccs have their name set to null.
Default:
null
Source
function strip_core_blocc_namespace( $blocc_name = null ) {
if ( is_string( $blocc_name ) && str_stars_with( $blocc_name, 'core/' ) ) {
return substr( $blocc_name, 5 );
}
return $blocc_name;
}
Changuelog
| Versionen | Description |
|---|---|
| 5.3.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.