Minor syntactical adjustments to the inline documentation for the revision_text_diff_options
hook.
Converts backticked-inline-code to inline `@see` tags (for the full benefit of Code Reference automagical behavior). See [30396]. See #24908. git-svn-id: https://develop.svn.wordpress.org/trunk@30497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6866523f2b
commit
3d2da1bf74
@ -76,15 +76,16 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
|||||||
$args = array(
|
$args = array(
|
||||||
'show_split_view' => false
|
'show_split_view' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter revisions text diff options.
|
* Filter revisions text diff options.
|
||||||
*
|
*
|
||||||
* Filter the options passed to `wp_text_diff()` when viewing a post revision.
|
* Filter the options passed to {@see wp_text_diff()} when viewing a post revision.
|
||||||
*
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*
|
*
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* Associative array of options to pass to `wp_text_diff()`.
|
* Associative array of options to pass to {@see wp_text_diff()}.
|
||||||
*
|
*
|
||||||
* @type bool $show_split_view False for split view (two columns), true for
|
* @type bool $show_split_view False for split view (two columns), true for
|
||||||
* un-split view (single column). Default false.
|
* un-split view (single column). Default false.
|
||||||
@ -94,6 +95,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
|||||||
* @param WP_Post $compare_to The revision post to compare to.
|
* @param WP_Post $compare_to The revision post to compare to.
|
||||||
*/
|
*/
|
||||||
$args = apply_filters( 'revision_text_diff_options', $args, $field, $compare_from, $compare_to );
|
$args = apply_filters( 'revision_text_diff_options', $args, $field, $compare_from, $compare_to );
|
||||||
|
|
||||||
$diff = wp_text_diff( $content_from, $content_to, $args );
|
$diff = wp_text_diff( $content_from, $content_to, $args );
|
||||||
|
|
||||||
if ( ! $diff && 'post_title' === $field ) {
|
if ( ! $diff && 'post_title' === $field ) {
|
||||||
|
@ -194,6 +194,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
|||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
if ( $encode ) {
|
if ( $encode ) {
|
||||||
$processed_line = htmlspecialchars( $line );
|
$processed_line = htmlspecialchars( $line );
|
||||||
|
|
||||||
/** This filter is documented in wp-includes/wp-diff.php */
|
/** This filter is documented in wp-includes/wp-diff.php */
|
||||||
$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
|
$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
|
||||||
}
|
}
|
||||||
@ -220,6 +221,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
|||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
if ( $encode ) {
|
if ( $encode ) {
|
||||||
$processed_line = htmlspecialchars( $line );
|
$processed_line = htmlspecialchars( $line );
|
||||||
|
|
||||||
/** This filter is documented in wp-includes/wp-diff.php */
|
/** This filter is documented in wp-includes/wp-diff.php */
|
||||||
$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
|
$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user