Skip to content

Instantly share code, notes, and snippets.

@adamsilverstein
Last active September 12, 2023 10:25
Show Gist options
  • Save adamsilverstein/199f3a4cfe8b4ccc881713a7ece05438 to your computer and use it in GitHub Desktop.
Save adamsilverstein/199f3a4cfe8b4ccc881713a7ece05438 to your computer and use it in GitHub Desktop.
<?php
/**
* Ensures Site Kit URL Change compatibility.
*
* @wordpress-plugin
* Plugin Name: Site Kit URL Change compatibility
* Description: Ensures Site Kit URL Change compatibility.
* Plugin URI:
* Version: 1.0.0
* Author: Adam Silverstein, Google
* License: Apache License 2.0
* License URI: https://www.apache.org/licenses/LICENSE-2.0
*/
add_filter(
'googlesitekit_canonical_home_url',
function( $url ) {
return get_option( 'home' );
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment