first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace WPML\Compatibility\GoogleSiteKit;
use function WPML\Container\make;
class Hooks implements \IWPML_Backend_Action {
public function add_hooks() {
add_filter( 'googlesitekit_canonical_home_url', [ $this, 'getCanonicalHomeUrl' ] );
}
/**
* @return string
*/
public function getCanonicalHomeUrl() {
$wpml_url_filters = make( \WPML_URL_Filters::class );
$wpml_url_filters->remove_global_hooks();
$unfilteredHomeUrl = home_url();
$wpml_url_filters->add_global_hooks();
return $unfilteredHomeUrl;
}
}