revision_text_diff_options

revision_text_diff_options

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('revision_text_diff_options') is found 1 times:

  • /wp-admin/includes/revision.php line 118
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    * @param string  $field        The current revision field.
     * @param WP_Post $compare_from The revision post to compare from.
     * @param WP_Post $compare_to   The revision post to compare to.
     */
    $args = apply_filters( 'revision_text_diff_options', $args, $field, $compare_from, $compare_to );
     
    $diff = wp_text_diff( $content_from, $content_to, $args );
     
    if ( ! $diff && 'post_title' === $field ) {
        /*
         * It's a better user experience to still show the Title, even if it didn't change.