[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/interactivity-api/ -> class-wp-interactivity-api-directives-processor.php (summary)

Interactivity API: WP_Interactivity_API_Directives_Processor class.

File Size: 277 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  get_content_between_balanced_template_tags()
  set_content_between_balanced_tags()
  append_content_after_template_tag_closer()
  get_after_opener_tag_and_before_closer_tag_positions()
  get_balanced_tag_bookmarks()
  skip_to_tag_closer()
  next_balanced_tag_closer_tag()
  has_and_visits_its_closer_tag()

Functions
Functions that are not part of a class:

get_content_between_balanced_template_tags()   X-Ref
Returns the content between two balanced template tags.

It positions the cursor in the closer tag of the balanced template tag,
if it exists.

return: string|null The content between the current opener template tag and its matching closer tag or null if it

set_content_between_balanced_tags( string $new_content )   X-Ref
Sets the content between two balanced tags.

param: string $new_content The string to replace the content between the matching tags.
return: bool Whether the content was successfully replaced.

append_content_after_template_tag_closer( string $new_content )   X-Ref
Appends content after the closing tag of a template tag.

It positions the cursor in the closer tag of the balanced template tag,
if it exists.

param: string $new_content The string to append after the closing template tag.
return: bool Whether the content was successfully appended.

get_after_opener_tag_and_before_closer_tag_positions( bool $rewind = false )   X-Ref
Gets the positions right after the opener tag and right before the closer
tag in a balanced tag.

By default, it positions the cursor in the closer tag of the balanced tag.
If $rewind is true, it seeks back to the opener tag.

param: bool $rewind Optional. Whether to seek back to the opener tag after finding the positions. Defaults to false.
return: array|null Start and end byte position, or null when no balanced tag bookmarks.

get_balanced_tag_bookmarks()   X-Ref
Returns a pair of bookmarks for the current opener tag and the matching
closer tag.

It positions the cursor in the closer tag of the balanced tag, if it
exists.

return: array|null A pair of bookmarks, or null if there's no matching closing tag.

skip_to_tag_closer()   X-Ref
Skips processing the content between tags.

It positions the cursor in the closer tag of the foreign element, if it
exists.

This function is intended to skip processing SVG and MathML inner content
instead of bailing out the whole processing.

return: bool Whether the foreign content was successfully skipped.

next_balanced_tag_closer_tag()   X-Ref
Finds the matching closing tag for an opening tag.

When called while the processor is on an open tag, it traverses the HTML
until it finds the matching closer tag, respecting any in-between content,
including nested tags of the same name. Returns false when called on a
closer tag, a tag that doesn't have a closer tag (void), a tag that
doesn't visit the closer tag, or if no matching closing tag was found.

return: bool Whether a matching closing tag was found.

has_and_visits_its_closer_tag()   X-Ref
Checks whether the current tag has and will visit its matching closer tag.

return: bool Whether the current tag has a closer tag.



Generated : Fri May 10 08:20:01 2024 Cross-referenced by PHPXref