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
This commit is contained in:
John Blackbourn 2014-03-05 22:48:15 +00:00
parent 3a0a98205c
commit 8d7f96c459
2 changed files with 15 additions and 20 deletions

View File

@ -3430,3 +3430,18 @@ function wp_style_loader_src() {}
function default_topic_count_text( $count ) { function default_topic_count_text( $count ) {
return $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;
}

View File

@ -1424,26 +1424,6 @@ function format_to_edit( $content, $richedit = false ) {
return $content; 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. * Add leading zeros when necessary.
* *