Make WordPress Core

Changeset 39192


Ignore:
Timestamp:
11/10/2016 02:38:02 AM (9 years ago)
Author:
joehoyle
Message:

REST API: Use wp_slash rather than addslashes.

See #38726.
Props dd32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r39190 r39192  
    381381        $prepared_term = $this->prepare_item_for_database( $request );
    382382
    383         $term = wp_insert_term( addslashes( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) );
     383        $term = wp_insert_term( wp_slash( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) );
    384384        if ( is_wp_error( $term ) ) {
    385385            /*
Note: See TracChangeset for help on using the changeset viewer.