Make WordPress Core

Changeset 27424


Ignore:
Timestamp:
03/05/2014 10:47:02 PM (10 years ago)
Author:
johnbillion
Message:

Deprecate format_to_post() and remove its filter. Fixes #25526. Props simonwheatley

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/deprecated.php

    r27376 r27424  
    34313431    return $count;
    34323432}
     3433
     3434/**
     3435 * Formerly used to escape strings before INSERTing into the DB. Hasn't performed this function for many, many years.
     3436 *
     3437 * @since 0.71
     3438 * @deprecated 3.9.0
     3439 * @deprecated Original intent was to add slashes to POSTed data, use $wpdb::prepare() instead
     3440 *
     3441 * @param string $content The text to format.
     3442 * @return string The very same text.
     3443 */
     3444function format_to_post( $content ) {
     3445    _deprecated_function( __FUNCTION__, '3.9' );
     3446    return $content;
     3447}
  • trunk/src/wp-includes/formatting.php

    r27344 r27424  
    14221422    if ( ! $richedit )
    14231423        $content = esc_textarea( $content );
    1424     return $content;
    1425 }
    1426 
    1427 /**
    1428  * Holder for the 'format_to_post' filter.
    1429  *
    1430  * @since 0.71
    1431  *
    1432  * @param string $content The text to pass through the filter.
    1433  * @return string Text returned from the 'format_to_post' filter.
    1434  */
    1435 function format_to_post($content) {
    1436     /**
    1437      * Filter the string returned by format_to_post().
    1438      *
    1439      * @since 1.2.0
    1440      *
    1441      * @param string $content The string to format.
    1442      */
    1443     $content = apply_filters( 'format_to_post', $content );
    14441424    return $content;
    14451425}
Note: See TracChangeset for help on using the changeset viewer.