Make WordPress Core


Ignore:
Timestamp:
12/16/2018 10:54:46 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Tests: Fix tests broken in PHP 5.x after [43879].

Props pento.
Merges [43883] to trunk.
See #45290.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/blocks.php

    r44226 r44242  
    223223function _restore_wpautop_hook( $content ) {
    224224    global $wp_filter;
    225     $current_priority = $wp_filter['the_content']->current_priority();
     225    $current_priority = has_filter( 'the_content', '_restore_wpautop_hook' );
    226226
    227227    add_filter( 'the_content', 'wpautop', $current_priority - 1 );
Note: See TracChangeset for help on using the changeset viewer.