wp_filter_kses

The timeline below displays how wordpress function wp_filter_kses has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.1

/**
 * Sanitize content with allowed HTML KSES rules.
 *
 * This function expects slashed data.
 *
 * @since 1.0.0
 *
 * @param string $data Content to filter, expected to be escaped with slashes.
 * @return string Filtered content.
 */
function wp_filter_kses($data)
{
    return addslashes(wp_kses(stripslashes($data), current_filter()));
}

WordPress Version: 4.1

/**
 * Sanitize content with allowed HTML Kses rules.
 *
 * @since 1.0.0
 *
 * @param string $data Content to filter, expected to be escaped with slashes
 * @return string Filtered content
 */
function wp_filter_kses($data)
{
    return addslashes(wp_kses(stripslashes($data), current_filter()));
}

WordPress Version: 3.7

/**
 * Sanitize content with allowed HTML Kses rules.
 *
 * @since 1.0.0
 * @uses $allowedtags
 *
 * @param string $data Content to filter, expected to be escaped with slashes
 * @return string Filtered content
 */
function wp_filter_kses($data)
{
    return addslashes(wp_kses(stripslashes($data), current_filter()));
}