WordPress.org

Make WordPress Core

Ticket #44341: 44341.2.diff

File 44341.2.diff, 1.3 KB (added by lbenicio, 21 months ago)
  • src/wp-includes/class-wp-editor.php

    diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php
    index bd5dda7e8a..3947343568 100644
    a b final class _WP_Editors { 
    284284                        remove_filter( 'the_editor_content', 'format_for_editor' );
    285285                }
    286286
     287                // Back-compat for the `htmledit_pre` and `richedit_pre` filters
    287288                // Back-compat for the `htmledit_pre` and `richedit_pre` filters
    288289                if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) {
    289                         // TODO: needs _deprecated_filter(), use _deprecated_function() as substitute for now
    290                         _deprecated_function( 'add_filter( htmledit_pre )', '4.3.0', 'add_filter( format_for_editor )' );
    291                         $content = apply_filters( 'htmledit_pre', $content );
     290                        $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' );
    292291                } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) {
    293                         _deprecated_function( 'add_filter( richedit_pre )', '4.3.0', 'add_filter( format_for_editor )' );
    294                         $content = apply_filters( 'richedit_pre', $content );
     292                        $content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
    295293                }
    296294
    297295                if ( false !== stripos( $content, 'textarea' ) ) {