| @@ -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 |