From 8d7f96c459b2ca0a86a84b0a3dd4751f57597b85 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 5 Mar 2014 22:48:15 +0000 Subject: [PATCH] Deprecate `format_to_post()` and remove its filter. Fixes #25526. Props simonwheatley Built from https://develop.svn.wordpress.org/trunk@27424 git-svn-id: http://core.svn.wordpress.org/trunk@27271 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/deprecated.php | 15 +++++++++++++++ wp-includes/formatting.php | 20 -------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 5823ee8296..985fa4e0ff 100644 --- a/wp-includes/deprecated.php +++ b/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/wp-includes/formatting.php b/wp-includes/formatting.php index 9edea6a704..f4c762bc86 100644 --- a/wp-includes/formatting.php +++ b/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. *