44 *
55 * @package WordPress
66 * @subpackage HTML-API
7- * @since 7.0 .0
7+ * @since 7.1 .0
88 */
99
1010class WP_HTML_Template {
1111 /**
1212 * The template string.
1313 *
14- * @since 7.0 .0
14+ * @since 7.1 .0
1515 *
1616 * @var string
1717 */
@@ -20,7 +20,7 @@ class WP_HTML_Template {
2020 /**
2121 * The replacement values for placeholders.
2222 *
23- * @since 7.0 .0
23+ * @since 7.1 .0
2424 *
2525 * @var array<string, string|self|true|false|null>
2626 */
@@ -38,7 +38,7 @@ private function __construct( string $template_string, array $replacements ) {
3838 * without parsing or processing. Processing happens when the parent template
3939 * is rendered, which provides the correct parsing context.
4040 *
41- * @since 7.0 .0
41+ * @since 7.1 .0
4242 *
4343 * @param string $template The template string with placeholders.
4444 * @param array $replacements The replacement values for placeholders.
@@ -59,7 +59,7 @@ public static function template( string $template, array $replacements = array()
5959 * parent's parsing context, enabling correct handling of table elements and
6060 * other context-dependent HTML.
6161 *
62- * @since 7.0 .0
62+ * @since 7.1 .0
6363 *
6464 * @param string $template The template string with placeholders.
6565 * @param array $replacements The replacement values for placeholders.
@@ -82,7 +82,7 @@ public static function render( string $template, array $replacements = array() )
8282 /**
8383 * Creates an extended WP_HTML_Processor that exposes internals needed for template processing.
8484 *
85- * @since 7.0 .0
85+ * @since 7.1 .0
8686 *
8787 * @param string $html The HTML fragment to parse.
8888 * @return WP_HTML_Processor|null The processor, or null on failure.
@@ -166,7 +166,7 @@ function () use ( $html ) {
166166 * Walks all tokens in the processor, serializing each one. Placeholders in
167167 * text context (funky comments) and attribute values are detected and replaced.
168168 *
169- * @since 7.0 .0
169+ * @since 7.1 .0
170170 *
171171 * @param self $template The template with replacements.
172172 * @param WP_HTML_Processor $processor The processor to walk.
@@ -229,7 +229,7 @@ private static function process( self $template, WP_HTML_Processor $processor ):
229229 'Unused replacement key: %s ' ,
230230 $ key
231231 ),
232- '7.0 .0 '
232+ '7.1 .0 '
233233 );
234234 }
235235 }
@@ -242,7 +242,7 @@ private static function process( self $template, WP_HTML_Processor $processor ):
242242 /**
243243 * Attempts to process a funky comment as a placeholder.
244244 *
245- * @since 7.0 .0
245+ * @since 7.1 .0
246246 *
247247 * @param WP_HTML_Processor $processor The processor positioned at a funky comment.
248248 * @param self $template The template with replacements.
@@ -281,7 +281,7 @@ private static function process_placeholder(
281281 'Missing replacement for placeholder: %s ' ,
282282 $ placeholder
283283 ),
284- '7.0 .0 '
284+ '7.1 .0 '
285285 );
286286 return false ;
287287 }
@@ -324,7 +324,7 @@ private static function process_placeholder(
324324 'Invalid replacement type for text placeholder: %s ' ,
325325 $ placeholder
326326 ),
327- '7.0 .0 '
327+ '7.1 .0 '
328328 );
329329 return false ;
330330 }
@@ -335,7 +335,7 @@ private static function process_placeholder(
335335 * If no attribute contains a placeholder, delegates to serialize_token().
336336 * Otherwise, builds the tag manually with placeholder replacements.
337337 *
338- * @since 7.0 .0
338+ * @since 7.1 .0
339339 *
340340 * @param WP_HTML_Processor $processor The processor positioned at an opening tag.
341341 * @param self $template The template with replacements.
@@ -465,7 +465,7 @@ private static function process_tag(
465465 /**
466466 * Processes an attribute value that contains placeholder(s).
467467 *
468- * @since 7.0 .0
468+ * @since 7.1 .0
469469 *
470470 * @param string $raw_value The raw attribute value from the HTML.
471471 * @param object $attribute The attribute token object.
@@ -514,7 +514,7 @@ private static function process_attribute_value(
514514 'Missing replacement for placeholder: %s ' ,
515515 $ placeholder
516516 ),
517- '7.0 .0 '
517+ '7.1 .0 '
518518 );
519519 return false ;
520520 }
@@ -530,7 +530,7 @@ private static function process_attribute_value(
530530 'Template cannot be used in attribute context: %s ' ,
531531 $ placeholder
532532 ),
533- '7.0 .0 '
533+ '7.1 .0 '
534534 );
535535 return false ;
536536 }
@@ -560,7 +560,7 @@ private static function process_attribute_value(
560560 'Invalid replacement type for attribute placeholder: %s ' ,
561561 $ placeholder
562562 ),
563- '7.0 .0 '
563+ '7.1 .0 '
564564 );
565565 return false ;
566566 }
@@ -591,7 +591,7 @@ private static function process_attribute_value(
591591 /**
592592 * Serializes all tokens from a processor into a string.
593593 *
594- * @since 7.0 .0
594+ * @since 7.1 .0
595595 *
596596 * @param WP_HTML_Processor $processor The processor to serialize.
597597 * @return string The serialized HTML.
0 commit comments