WP_HTML_Tag_Processor::sort_start_ascending( WP_HTML_Text_Replacement $a, WP_HTML_Text_Replacement $b ): int

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Compare two WP_HTML_Text_Replacement objects.

Parameters

$aWP_HTML_Text_Replacementrequired
First attribute update.
$bWP_HTML_Text_Replacementrequired
Second attribute update.

Return

int Comparison value for string order.

Source

	return $this->next_token();
}

/**
 * Compare two WP_HTML_Text_Replacement objects.
 *
 * @since 6.2.0
 * @ignore
 *
 * @param WP_HTML_Text_Replacement $a First attribute update.
 * @param WP_HTML_Text_Replacement $b Second attribute update.
 * @return int Comparison value for string order.
 */
private static function sort_start_ascending( WP_HTML_Text_Replacement $a, WP_HTML_Text_Replacement $b ): int {
	$by_start = $a->start - $b->start;
	if ( 0 !== $by_start ) {
		return $by_start;

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.