How to make changes to wordpress core files and make them resistant to wordpress updates?
I have my WordPress setup on IIS and it is rewritten. Because of that I found some probably bug in wp_includes/canonical.php
file.
I think that when I update my WordPress that all my changes will disapear.
I can't wait for WordPress fix this (I don't even know if it is bug or how to report one) because that "bug" causes my homepage to go in redirect loop.
I made some change in redirect_canonical
function in that file specificly this change:
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
///some other code
if ( ! $requested_url isset( $_SERVER['HTTP_HOST'] ) ) {
// build the URL in the address bar
$requested_url = is_ssl() ? 'https://' : 'http://';
//$requested_url=$_SERVER['HTTP_HOST'] //I deleted this because my URL is rewritten
$asParts = parse_url( $sURL ); // PHP function
$requested_url .= $asParts['host'] ;
$requested_url .= $_SERVER['REQUEST_URI'];
How to make this change resistant to WordPress updates?
Topic core-modifications Wordpress
Category Web