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
This commit is contained in:
John Blackbourn 2014-03-05 22:47:02 +00:00
parent 54ea3a0cfd
commit 19ac705e60
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.
* *