WP_Text_Diff_Renderer_Table::_context()
Метод класса: WP_Text_Diff_Renderer_Table{}
Хуки из метода
Возвращает
Строку
.
Использование
$WP_Text_Diff_Renderer_Table = new WP_Text_Diff_Renderer_Table(); $WP_Text_Diff_Renderer_Table->_context( $lines, $encode );
- $lines(массив) (обязательный)
- -
- $encode(true|false)
- -
По умолчанию: true
Код WP_Text_Diff_Renderer_Table::_context() WP Text Diff Renderer Table:: context WP 6.6.2
public function _context( $lines, $encode = true ) { $r = ''; foreach ( $lines as $line ) { if ( $encode ) { $processed_line = htmlspecialchars( $line ); /** This filter is documented in wp-includes/wp-diff.php */ $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' ); } if ( $this->_show_split_view ) { $r .= '<tr>' . $this->contextLine( $line ) . $this->contextLine( $line ) . "</tr>\n"; } else { $r .= '<tr>' . $this->contextLine( $line ) . "</tr>\n"; } } return $r; }