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

wp_kses_bad_protocol_once2( string $string, string $allowed_protocols )

Callback for wp_kses_bad_protocol_once() regular expression.

Description Description

This function processes URL protocols, checks to see if they’re in the whitelist or not, and returns different data depending on the answer.

Top ↑

Parameters Parameters


(string) (Required) URI scheme to check against the whitelist


(string) (Required) Allowed protocols

Top ↑

Return Return

(string) Sanitized content

Top ↑

Source Source

File: wp-includes/kses.php

	// Split it.
	$attrarr = wp_kses_hair_parse( $attr );
	if ( false === $attrarr ) {
		return false;

	// Make sure all input is returned by adding front and back matter.
	array_unshift( $attrarr, $begin . $slash . $elname );
	array_push( $attrarr, $xhtml_slash . $end );

	return $attrarr;

 * Builds an attribute list from string containing attributes.
 * Does not modify input.  May return "evil" output.

Top ↑

Changelog Changelog

Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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