Skip to content

Commit 2b131d6

Browse files
srdjan-jccvukvukovich
authored andcommitted
Added sorting attributes by name
1 parent 4355081 commit 2b131d6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

inc/class-mltools-shortcode-attribute-filter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ private function add_tag( $tag, $attributes ) {
8383
$this->captured_values[ $tag ]['attributes'][ $attr_name ] = $attr_value;
8484
}
8585

86-
$this->captured_tags[ $tag ] = $config->get_props();
86+
ksort( $this->captured_values[ $tag ]['attributes'] );
87+
88+
$props = $config->get_props();
89+
ksort( $props['attributes'] );
90+
91+
$this->captured_tags[ $tag ] = $props;
8792
}
8893

8994
public function save_tags() {

0 commit comments

Comments
 (0)