wp-includes/wp-db.php
/**
	 * Strips any invalid characters from the string for a given table and column.
	 *
	 * @since 4.2.0
	 * @access public
	 *
	 * @param string $table  Table name.
	 * @param string $column Column name.
	 * @param string $value  The text to check.
	 * @return string|WP_Error The converted string, or a WP_Error object if the conversion fails.
	 */
Strips any invalid characters from the string for a given table and column.

@param string $table  Table name.
@param string $column Column name.
@param string $value  The text to check.
@return string|WP_Error The converted string, or a WP_Error object if the conversion fails.
Strips any invalid characters from the string for a given table and column . @param string $table Table name . @param string $column Column name . @param string $value The text to check . @return string|WP_Error The converted string or a WP_Error object if the conversion fails .
public function strip_invalid_text_for_column( $table, $column, $value ) {
		if ( ! is_string( $value ) ) {
			return $value;
		}
		$charset = $this->get_col_charset( $table, $column );
		if ( ! $charset ) {
			return $value;
		} elseif ( is_wp_error( $charset ) ) {
			return $charset;
		}
		$data = array(
			$column => array(
				'value'   => $value,
				'charset' => $charset,
				'length'  => $this->get_col_length( $table, $column ),
			)
		);
		$data = $this->strip_invalid_text( $data );
		if ( is_wp_error( $data ) ) {
			return $data;
		}
		return $data[ $column ]['value'];
	}
public function strip_invalid_text_for_column ( $ table , $ column , $ value ) { if ( ! is_string ( $ value ) ) { return $ value ; } $ charset = $ this -> get_col_charset ( $ table , $ column ) ; if ( ! $ charset ) { return $ value ; } elseif ( is_wp_error ( $ charset ) ) { return $ charset ; } $ data = array ( $ column => array ( 'value' => $ value , 'charset' => $ charset , 'length' => $ this -> get_col_length ( $ table , $ column ) , ) ) ; $ data = $ this -> strip_invalid_text ( $ data ) ; if ( is_wp_error ( $ data ) ) { return $ data ; } return $ data [ $ column ] [ 'value' ] ; }
Strips any invalid characters from the string for a given table and column.
Strips any invalid characters from the string for a given table and column .
// Not a string column. // Bail on real errors.