Make WordPress Core


Ignore:
Timestamp:
05/29/2009 08:31:52 PM (16 years ago)
Author:
markjaquith
Message:

Add esc_sql(), for completeness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r11450 r11490  
    20632063
    20642064/**
     2065 * Escapes data for use in a MySQL query
     2066 *
     2067 * This is just a handy shortcut for $wpdb->escape(), for completeness' sake
     2068 *
     2069 * @since 2.8.0
     2070 * @param string $sql Unescaped SQL data
     2071 * @return string The cleaned $sql
     2072 */
     2073function esc_sql( $sql ) {
     2074    global $wpdb;
     2075    return $wpdb->escape( $sql );
     2076}
     2077
     2078
     2079/**
    20652080 * Checks and cleans a URL.
    20662081 *
Note: See TracChangeset for help on using the changeset viewer.