Actualizacion 7.1.2

This commit is contained in:
2026-09-25 12:02:42 -06:00
parent fa60d1f364
commit 32351c9497
221 changed files with 19735 additions and 6951 deletions
@@ -133,26 +133,6 @@ class Watcher {
* @return string
*/
public function get_permalink( $post_id ) {
$permalink = get_permalink( $post_id );
if ( ! Sitepress::get()->is_active() ) {
return $permalink;
}
$sitepress = Sitepress::get()->get_var();
$language_domains = $sitepress->get_setting( 'language_domains', [] );
if ( ! $language_domains ) {
return $permalink;
}
$details = apply_filters( 'wpml_post_language_details', null, $post_id );
$code = $details['language_code'] ?? '';
$permalink = apply_filters( 'wpml_permalink', get_the_permalink( $post_id ), $code );
foreach ( $language_domains as $key => $domain ) {
$permalink = preg_replace( "#https?://{$domain}#i", '', $permalink );
}
return $permalink;
return Sitepress::get()->get_permalink( $post_id );
}
}