wp_link_category_checklist

Definition:
function wp_link_category_checklist( $link_id = 0 ) {}

Parameters

  • unknown_type $link_id

Defined filters

  • the_category
    apply_filters( 'the_category', $category->name )

Source code

function wp_link_category_checklist( $link_id = 0 ) {

	$default = 1;



	if ( $link_id ) {

		$checked_categories = wp_get_link_cats( $link_id );

		// No selected categories, strange

		if ( ! count( $checked_categories ) )

			$checked_categories[] = $default;

	} else {

		$checked_categories[] = $default;

	}



	$categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );



	if ( empty( $categories ) )

		return;



	foreach ( $categories as $category ) {

		$cat_id = $category->term_id;

		$name = esc_html( apply_filters( 'the_category', $category->name ) );

		$checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';

		echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";

	}

}

3849

wp_kses_version

Definition:
function wp_kses_version() {}

This function returns kses’ version number.

Return values

returns:KSES Version Number

Source code

function wp_kses_version() {

	return '0.2.2';

}

3847

wp_kses_stripslashes

Definition:
function wp_kses_stripslashes($string) {}

Strips slashes from in front of quotes.
This function changes the character sequence \" to just ". It leaves all other slashes alone. It’s really weird, but the quoting from preg_replace(//e) seems to require this.

Parameters

  • string $string: String to strip slashes

Return values

returns:Fixed string with quoted slashes

Source code

function wp_kses_stripslashes($string) {

	return preg_replace('%\\\\"%', '"', $string);

}

3845

wp_kses_split

Definition:
function wp_kses_split($string, $allowed_html, $allowed_protocols) {}

Searches for HTML tags, no matter how malformed.
It also matches stray ">" characters.

Parameters

  • string $string: Content to filter
  • array $allowed_html: Allowed HTML elements
  • array $allowed_protocols: Allowed protocols to keep

Return values

returns:Content with fixed HTML tags

Source code

function wp_kses_split($string, $allowed_html, $allowed_protocols) {

	global $pass_allowed_html, $pass_allowed_protocols;

	$pass_allowed_html = $allowed_html;

	$pass_allowed_protocols = $allowed_protocols;

	return preg_replace_callback( '%(<!--.*?(-->|$))|(<[^>]*(>|$)|>)%', '_wp_kses_split_callback', $string );

}

3843

wp_kses_post

Definition:
function wp_kses_post($data) {}

Sanitize content for allowed HTML tags for post content.
Post content refers to the page contents of the ‘post’ type and not $_POST data from forms.

Parameters

  • string $data: Post content to filter

Return values

returns:Filtered post content with allowed HTML tags and attributes intact.

Source code

function wp_kses_post($data) {

	global $allowedposttags;

	return wp_kses( $data , $allowedposttags );

}

3841