mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 02:22:25 +01:00
Add esc_sql(), for completeness.
git-svn-id: https://develop.svn.wordpress.org/trunk@11490 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8abf3d95f6
commit
d5c981b0ea
@ -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…
x
Reference in New Issue
Block a user