process_text_diff_html
Filter HookHook Information
File Location |
wp-includes/class-wp-text-diff-renderer-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 264 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$lines
|
No description available |
bool
|
$encode
|
No description available |
Usage Examples
Basic Usage
<?php
// Hook into process_text_diff_html
add_filter('process_text_diff_html', 'my_custom_filter', 10, 2);
function my_custom_filter($lines, $encode) {
// Your custom filtering logic here
return $lines;
}
Source Code Context
wp-includes/class-wp-text-diff-renderer-table.php:264
- How this hook is used in WordPress core
<?php
259 foreach ( $lines as $line ) {
260 if ( $encode ) {
261 $processed_line = htmlspecialchars( $line );
262
263 /** This filter is documented in wp-includes/wp-diff.php */
264 $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
265 }
266 if ( $this->_show_split_view ) {
267 $r .= '<tr>' . $this->contextLine( $line ) . $this->contextLine( $line ) . "</tr>\n";
268 } else {
269 $r .= '<tr>' . $this->contextLine( $line ) . "</tr>\n";
PHP Documentation
<?php
/**
* @ignore
*
* @param array $lines
* @param bool $encode
* @return string
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-text-diff-renderer-table.php
Related Hooks
Related hooks will be displayed here in future updates.