Warning: This function has been deprecated.

format_to_post() WordPress Function

The format_to_post() function is used to format a string for use in a WordPress post. This function can be used to clean up text or to make sure that certain characters are properly encoded for use in a post.

format_to_post( string $content ) #

Formerly used to escape strings before inserting into the DB.


Description

Has not performed this function for many, many years. Use wpdb::prepare() instead.


Top ↑

Parameters

$content

(string)(Required)The text to format.


Top ↑

Return

(string) The very same text.


Top ↑

Source

File: wp-includes/deprecated.php

function format_to_post( $content ) {
	_deprecated_function( __FUNCTION__, '3.9.0' );
	return $content;
}


Top ↑

Changelog

Changelog
VersionDescription
3.9.0This function has been deprecated.
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More