WordPress.org

Make WordPress Core

Changeset 44242


Ignore:
Timestamp:
12/16/2018 10:54:46 PM (20 months 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:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/post.php

    r44241 r44242  
    20432043    if ( isset( $_GET['meta-box-loader'] ) ) {
    20442044        check_admin_referer( 'meta-box-loader' );
     2045        return false;
     2046    }
     2047
     2048    // The posts page can't be edited in the block editor.
     2049    if ( absint( get_option( 'page_for_posts' ) ) === $post->ID && empty( $post->post_content ) ) {
    20452050        return false;
    20462051    }
  • 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.