Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 5453d6b

Browse files
committed
Fix prefixes when getting attributes in directives
1 parent 28dd2ad commit 5453d6b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Interactivity/directives/attributes/woo-bind.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function process_woo_bind( $tags, $context ) {
77
return;
88
}
99

10-
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'woo-bind:' );
10+
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'data-woo-bind:' );
1111

1212
foreach ( $prefixed_attributes as $attr ) {
1313
list( , $bound_attr ) = explode( ':', $attr );

src/Interactivity/directives/attributes/woo-class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function process_woo_class( $tags, $context ) {
77
return;
88
}
99

10-
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'woo-class:' );
10+
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'data-woo-class:' );
1111

1212
foreach ( $prefixed_attributes as $attr ) {
1313
list( , $class_name ) = explode( ':', $attr );

src/Interactivity/directives/attributes/woo-context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function process_woo_context_attribute( $tags, $context ) {
66
return;
77
}
88

9-
$value = $tags->get_attribute( 'woo-context' );
9+
$value = $tags->get_attribute( 'data-woo-context' );
1010
if ( null === $value ) {
1111
// No woo-context directive.
1212
return;

src/Interactivity/directives/attributes/woo-style.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function process_woo_style( $tags, $context ) {
77
return;
88
}
99

10-
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'woo-style:' );
10+
$prefixed_attributes = $tags->get_attribute_names_with_prefix( 'data-woo-style:' );
1111

1212
foreach ( $prefixed_attributes as $attr ) {
1313
list( , $style_name ) = explode( ':', $attr );

0 commit comments

Comments
 (0)