Remove WPML’s home_url filter

I found that it required removing 4 filters/actions to undo WPML’s home_url modification. Since I didn’t know what else this might break, I ended up changing my site’s logo to use site_url() which in my case was the same, but not changed by WPML.

function disable_things(){
    remove_filter( 'page_link', array( $this, 'permalink_filter' ), 1, 2 );
    remove_action( 'wp_head', array( $this, 'front_end_js' ) );
    remove_filter( 'feed_link', array( $this, 'feed_link' ) );
    remove_filter( 'home_url', array( $this, 'home_url' ), 1, 4 );
}
add_action( 'wp_head', 'disable_things', 20 );

Leave a Comment