PluginProbe
Polylang / 2.5
Polylang v2.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/filters-links.php +4 -8 2.92.5 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Manages links filters needed on both frontend and admin
8 5 *
@@ -24,9 +21,9 @@
24 21 $this->model = &$polylang->model;
25 22 $this->options = &$polylang->options;
26 23 $this->curlang = &$polylang->curlang;
27 24
28 - // Low priority on links filters to come after any other modifications.
25 + // Low priority on links filters to come after any other modifications
29 26 if ( $this->options['force_lang'] ) {
30 27 add_filter( 'post_link', array( $this, 'post_type_link' ), 20, 2 );
31 28 add_filter( '_get_page_link', array( $this, '_get_page_link' ), 20, 2 );
32 29 }
@@ -37,14 +34,13 @@
37 34 if ( $this->options['force_lang'] > 0 ) {
38 35 add_filter( 'attachment_link', array( $this, 'attachment_link' ), 20, 2 );
39 36 }
40 37
41 - // Keeps the preview post link on default domain when using multiple domains and SSO is not available.
42 - if ( 3 === $this->options['force_lang'] && ! class_exists( 'PLL_Xdata_Domain' ) ) {
38 + if ( 3 === $this->options['force_lang'] ) {
43 39 add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 20 );
44 40 }
45 41
46 - // Rewrites post types archives links to filter them by language.
42 + // Rewrites post types archives links to filter them by language
47 43 add_filter( 'post_type_archive_link', array( $this, 'post_type_archive_link' ), 20, 2 );
48 44 }
49 45
50 46 /**
@@ -139,9 +135,9 @@
139 135 return $link;
140 136 }
141 137
142 138 /**
143 - * Keeps the preview post link on default domain when using multiple domains
139 + * FIXME: keeps the preview post link on default domain when using multiple domains
144 140 *
145 141 * @since 1.6.1
146 142 *
147 143 * @param string $url