Make WordPress Core


Ignore:
Timestamp:
06/16/2018 01:01:42 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Make sure wp_add_privacy_policy_content() does not cause a fatal error by unintentionally flushing rewrite rules outside of the admin context.

Add a _doing_it_wrong() message describing the correct usage of the function.

Props kraftbj, azaozz, SergeyBiryukov, YuriV.
Fixes #44142.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r43350 r43361  
    205205    global $wp_rewrite;
    206206
     207    // Ensure get_home_path is declared.
     208    require_once( ABSPATH . 'wp-admin/includes/file.php' );
     209
    207210    $home_path     = get_home_path();
    208211    $htaccess_file = $home_path . '.htaccess';
     
    238241
    239242    global $wp_rewrite;
     243
     244    // Ensure get_home_path is declared.
     245    require_once( ABSPATH . 'wp-admin/includes/file.php' );
    240246
    241247    $home_path       = get_home_path();
Note: See TracChangeset for help on using the changeset viewer.