Last active
October 30, 2020 21:56
-
-
Save adamsilverstein/712dae49f0df58f0204c32e171b68e5c to your computer and use it in GitHub Desktop.
wpml-test-fix.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ensures Site Kit WPML compatibility. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Fix Site Kit WPML compatibility | |
* Description: Ensures Site Kit WPML 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( apply_filters( 'wpml_permalink', $url, apply_filters( 'wpml_default_language', '' ) ) ); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment