Add esc_sql(), for completeness.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c652a8f9e3
commit
cacfffd068
|
@ -2061,6 +2061,21 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
|
|||
return apply_filters('clean_url', $url, $original_url, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes data for use in a MySQL query
|
||||
*
|
||||
* This is just a handy shortcut for $wpdb->escape(), for completeness' sake
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @param string $sql Unescaped SQL data
|
||||
* @return string The cleaned $sql
|
||||
*/
|
||||
function esc_sql( $sql ) {
|
||||
global $wpdb;
|
||||
return $wpdb->escape( $sql );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks and cleans a URL.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue