Extracts the directive attribute name to separate and return the directive prefix and an optional suffix.
Description
The suffix is the string after the first double hyphen and the prefix is everything that comes before the suffix.
Example:
extract_prefix_and_suffix( 'data-wp-interactive' ) => array( 'data-wp-interactive', null )
extract_prefix_and_suffix( 'data-wp-bind--src' ) => array( 'data-wp-bind', 'src' )
extract_prefix_and_suffix( 'data-wp-foo--and--bar' ) => array( 'data-wp-foo', 'and--bar' )
Parameters
$directive_name
stringrequired- The directive attribute name.
Source
$p->skip_to_tag_closer();
continue;
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.