and . * * @param string $input * * @return string */ public static function textarea( $input ) { global $allowedposttags; return wp_kses( $input, $allowedposttags ); } /** * Sanitize nothing. * * @param string $input * * @return string */ public static function raw( $input ) { return $input; } /** * Sanitize URL * * Remove all characters except letters, digits and !#$%&'*+-=?^_`{|}~@.[]. * * @param string $url * * @return string */ public static function url( $url ) { return filter_var( $url, FILTER_SANITIZE_URL ); } /** * Sanitize Number int * * Remove all characters except digits, plus and minus sign. * * @param string $input * * @return string */ public static function int( $input ) { return absint( filter_var( $input, FILTER_SANITIZE_NUMBER_INT ) ); } /** * Sanitize Attribute. * * @param string $input * * @return string */ public static function attribute( $input ) { return esc_attr( $input ); } /** * Sanitize SQL * * @param string $input * * @return string */ public static function sql( $input ) { return esc_sql( $input ); } /** * Sanitize text as plaintext. * * @param string $input * * @return string */ public static function plaintext( $input ) { return wp_kses( $input, [] ); } /** * Sanitizes a string from user input or from the database. * * @param string $input * * @return string */ public static function textfield( $input ) { return sanitize_text_field( $input ); } /** * Strips out all characters that are not allowable in an email. * * @param string $input * * @return string */ public static function email( $input ) { return sanitize_email( $input ); } /** * Sanitizes an HTML classname to ensure it only contains valid characters. * * @param string $input * * @return string */ public static function htmlClass( $input ) { return sanitize_html_class( $input ); } /** * Sanitizes a string key. * * Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes, and underscores are allowed. * * @param string $input * * @return string */ public static function key( $input ) { return sanitize_key( $input ); } /** * Sanitize editor data. Much like textarea remove