From 19ac705e603cc4922c7aef151034a1b352623c97 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 5 Mar 2014 22:47:02 +0000 Subject: [PATCH] Deprecate `format_to_post()` and remove its filter. Fixes #25526. Props simonwheatley git-svn-id: https://develop.svn.wordpress.org/trunk@27424 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/deprecated.php | 15 +++++++++++++++ src/wp-includes/formatting.php | 20 -------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php index 5823ee8296..985fa4e0ff 100644 --- a/src/wp-includes/deprecated.php +++ b/src/wp-includes/deprecated.php @@ -3430,3 +3430,18 @@ function wp_style_loader_src() {} function default_topic_count_text( $count ) { return $count; } + +/** + * Formerly used to escape strings before INSERTing into the DB. Hasn't performed this function for many, many years. + * + * @since 0.71 + * @deprecated 3.9.0 + * @deprecated Original intent was to add slashes to POSTed data, use $wpdb::prepare() instead + * + * @param string $content The text to format. + * @return string The very same text. + */ +function format_to_post( $content ) { + _deprecated_function( __FUNCTION__, '3.9' ); + return $content; +} diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 9edea6a704..f4c762bc86 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -1424,26 +1424,6 @@ function format_to_edit( $content, $richedit = false ) { return $content; } -/** - * Holder for the 'format_to_post' filter. - * - * @since 0.71 - * - * @param string $content The text to pass through the filter. - * @return string Text returned from the 'format_to_post' filter. - */ -function format_to_post($content) { - /** - * Filter the string returned by format_to_post(). - * - * @since 1.2.0 - * - * @param string $content The string to format. - */ - $content = apply_filters( 'format_to_post', $content ); - return $content; -} - /** * Add leading zeros when necessary. *