mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-14 16:24:26 +00: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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user