format_to_post

Formerly used to escape strings before inserting into the DB.

Description

(string) format_to_post( (string) $content ); 

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

Returns (string)

The very same text.

Parameters (1)

0. $content (string)
The text to format.

Usage

  1. if ( !function_exists( 'format_to_post' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The text to format. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = format_to_post($content); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function format_to_post( $content ) { 
  2. _deprecated_function( __FUNCTION__, '3.9.0' ); 
  3. return $content;