format_to_edit
Filter HookDescription
Filters the text to be formatted for editing.Hook Information
| File Location | 
                                wp-includes/formatting.php
                                
                                    View on GitHub
                                
                             | 
                        
| Hook Type | Filter | 
| Line Number | 2756 | 
                        
Hook Parameters
| Type | Name | Description | 
|---|---|---|
                                    string
                                 | 
                                
                                    $content
                                 | 
                                The text, prior to formatting for editing. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into format_to_edit
add_filter('format_to_edit', 'my_custom_filter', 10, 1);
function my_custom_filter($content) {
    // Your custom filtering logic here
    return $content;
}
                        
                    Source Code Context
                        wp-includes/formatting.php:2756
                        - How this hook is used in WordPress core
                    
                    <?php
2751  	 *
2752  	 * @since 1.2.0
2753  	 *
2754  	 * @param string $content The text, prior to formatting for editing.
2755  	 */
2756  	$content = apply_filters( 'format_to_edit', $content );
2757  	if ( ! $rich_text ) {
2758  		$content = esc_textarea( $content );
2759  	}
2760  	return $content;
2761  }
                    PHP Documentation
<?php
/**
	 * Filters the text to be formatted for editing.
	 *
	 * @since 1.2.0
	 *
	 * @param string $content The text, prior to formatting for editing.
	 */
                
            
                        Quick Info
                    
                    - Hook Type: Filter
 - Parameters: 1
 - File: wp-includes/formatting.php
 
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.