Title: format_to_post
Published: April 25, 2014
Last modified: April 28, 2025

---

# format_to_post( string $content ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#wp--skip-link--target)

This function has been deprecated since 3.9.0.

Formerly used to escape strings before inserting into the DB.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#description)󠁿

Has not performed this function for many, many years. Use [wpdb::prepare()](https://developer.wordpress.org/reference/classes/wpdb/prepare/)
instead.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#parameters)󠁿

 `$content`stringrequired

The text to format.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#return)󠁿

 string The very same text.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/deprecated.php#L3448)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/deprecated.php#L3448-L3451)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#related)󠁿

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/format_to_post/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.9.0](https://developer.wordpress.org/reference/since/3.9.0/) | Deprecated.  | 
| [0.71](https://developer.wordpress.org/reference/since/0.71/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fformat_to_post%2F)
before being able to contribute a note or feedback.