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_namestringrequired- The directive attribute name.
Source
*/
public function add_load_on_client_navigation_attribute_to_script_modules( $attributes ) {
if (
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.