Skip to content

Commit 5ecb4ce

Browse files
committed
Merge branch 'tree-6.8'
2 parents 26397ba + a33d328 commit 5ecb4ce

19 files changed

+227
-12
lines changed

data/blocks/fixtures/core__columns.server.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1 wp-block-columns-is-layout-flex">
2+
<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1d6595d7 wp-block-columns-is-layout-flex">
33

44
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
55

data/blocks/fixtures/core__columns__deprecated.server.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1 wp-block-columns-is-layout-flex">
2+
<div class="wp-block-columns has-3-columns is-layout-flex wp-container-1d6595d7 wp-block-columns-is-layout-flex">
33

44
<p class="layout-column-1">Column One, Paragraph One</p>
55

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
class Token_Counting_HTML_Processor extends WP_HTML_Processor {
4+
5+
/**
6+
* List of tokens that have already been seen.
7+
*
8+
* @var array<string, int>
9+
*/
10+
public $token_seen_count = array();
11+
12+
/**
13+
* Gets next token.
14+
*
15+
* @return bool Whether next token was matched.
16+
*/
17+
public function next_token(): bool {
18+
$result = parent::next_token();
19+
20+
if ( $this->get_token_type() === '#tag' ) {
21+
$token_name = ( $this->is_tag_closer() ? '-' : '+' ) . $this->get_tag();
22+
} else {
23+
$token_name = $this->get_token_name();
24+
}
25+
26+
if ( ! isset( $this->token_seen_count[ $token_name ] ) ) {
27+
$this->token_seen_count[ $token_name ] = 1;
28+
} else {
29+
++$this->token_seen_count[ $token_name ];
30+
}
31+
32+
return $result;
33+
}
34+
35+
}
24.3 KB
Loading
24.4 KB
Loading

data/images/png-tests/deskcat8.png

103 KB
Loading
196 KB
Loading
45.9 KB
Loading

data/images/png-tests/test8.png

44.2 KB
Loading

data/l10n/fa_IR.mo

-13 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)