Make WordPress Core

Ticket #25526: 25526.diff

File 25526.diff, 1.7 KB (added by simonwheatley, 13 years ago)

Deprecates formt_to_post. Adds docs for hook within deprecated function.

  • wp-includes/deprecated.php

     
    33903390        _deprecated_function( __FUNCTION__, '3.7' );
    33913391        return trim( $t, "\"'\n\r " );
    33923392}
     3393
     3394/**
     3395 * Formerly used to escape strings before INSERTing
     3396 * into the DB.
     3397 *
     3398 * @since 0.71
     3399 *
     3400 * @deprecated 3.7.0
     3401 * @deprecated Original intent was to add slashes to POSTed data, use $wpdb::prepare instead
     3402 *
     3403 * @param string $content The text to pass through the filter.
     3404 * @return string Text returned from the 'format_to_post' filter.
     3405 */
     3406function format_to_post($content) {
     3407        _deprecated_function( __FUNCTION__, '3.7', '$wpdb::prepare' );
     3408        /**
     3409         * Filter the string passed to format_to_post
     3410         *
     3411         * @since 0.71
     3412         *
     3413         * @deprecated 3.7.0
     3414         * @deprecated Original intent was to add slashes to POSTed data, use $wpdb::prepare instead
     3415         *
     3416         * @param string $content The content to format.
     3417         */
     3418        $content = apply_filters('format_to_post', $content);
     3419        return $content;
     3420}
  • wp-includes/formatting.php

     
    13271327}
    13281328
    13291329/**
    1330  * Holder for the 'format_to_post' filter.
    1331  *
    1332  * @since 0.71
    1333  *
    1334  * @param string $content The text to pass through the filter.
    1335  * @return string Text returned from the 'format_to_post' filter.
    1336  */
    1337 function format_to_post($content) {
    1338         $content = apply_filters('format_to_post', $content);
    1339         return $content;
    1340 }
    1341 
    1342 /**
    13431330 * Add leading zeros when necessary.
    13441331 *
    13451332 * If you set the threshold to '4' and the number is '10', then you will get