diff --git a/src/directives/attributes/wp-show.php b/src/directives/attributes/wp-show.php index 8970ae98..89ed6126 100644 --- a/src/directives/attributes/wp-show.php +++ b/src/directives/attributes/wp-show.php @@ -4,13 +4,13 @@ function process_wp_show( $tags, $context ) { if ( ! $tags->is_tag_closer() ) { // TODO: Exclude void and self-closing! - set_bookmark_for_tag( $tags, 'wp-show' ); + set_bookmark_for_directive( $tags, 'wp-show' ); return; } $end = 'wp-show-closer'; $tags->set_bookmark( 'wp-show-closer' ); - $start = seek_bookmark_for_tag( $tags, 'wp-show' ); + $start = seek_bookmark_for_directive( $tags, 'wp-show' ); $value = $tags->get_attribute( 'wp-show' ); if ( null !== $value ) { diff --git a/src/directives/utils.php b/src/directives/utils.php index 50ffbe1c..e69132d0 100644 --- a/src/directives/utils.php +++ b/src/directives/utils.php @@ -50,24 +50,24 @@ function set_style( $style, $name, $value ) { return implode( ';', $style_assignments ); } -function count_bookmarks_for_tag( $tags, $tag ) { +function count_bookmarks_for_directive( $tags, $directive ) { $i = 0; - while ( $tags->has_bookmark( $tag . '-' . $i ) ) { + while ( $tags->has_bookmark( $directive . '-' . $i ) ) { ++$i; } return $i; } -function set_bookmark_for_tag( $tags, $tag ) { - $i = count_bookmarks_for_tag( $tags, $tag ); - $bookmark = $tag . '-' . $i; +function set_bookmark_for_directive( $tags, $directive ) { + $i = count_bookmarks_for_directive( $tags, $directive ); + $bookmark = $directive . '-' . $i; $tags->set_bookmark( $bookmark ); return $bookmark; } -function seek_bookmark_for_tag( $tags, $tag ) { - $i = count_bookmarks_for_tag( $tags, $tag ) - 1; - $bookmark = $tag . '-' . $i; +function seek_bookmark_for_directive( $tags, $directive ) { + $i = count_bookmarks_for_directive( $tags, $directive ) - 1; + $bookmark = $directive . '-' . $i; $tags->seek( $bookmark ); return $bookmark; } \ No newline at end of file