PluginProbe
Polylang / 2.0.12
Polylang v2.0.12
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/links-permalinks.php +4 -7 2.9.12.0.12 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Links model base class when using pretty permalinks
8 5 *
@@ -9,9 +6,9 @@
9 6 * @since 1.6
10 7 */
11 8 abstract class PLL_Links_Permalinks extends PLL_Links_Model {
12 9 public $using_permalinks = true;
13 - protected $index = 'index.php'; // Need this before $wp_rewrite is created, also hardcoded in wp-includes/rewrite.php
10 + protected $index = 'index.php'; // Need this before $wp_rewrite is created, also harcoded in wp-includes/rewrite.php
14 11 protected $root, $use_trailing_slashes;
15 12 protected $always_rewrite = array( 'date', 'root', 'comments', 'search', 'author' );
16 13
17 14 /**
@@ -44,11 +41,11 @@
44 41 *
45 42 * @since 2.0.6
46 43 *
47 44 * @param string $modified_url The link to the first page
48 - * @param string $original_url The link to the original paged page
45 + * @param string $orginal_url The link to the original paged page
49 46 */
50 - return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#/page/[0-9]+/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url );
47 + return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#\/page\/[0-9]+\/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url );
51 48 }
52 49
53 50 /**
54 51 * Returns the link to the paged page when using pretty permalinks
@@ -65,9 +62,9 @@
65 62 *
66 63 * @since 2.0.6
67 64 *
68 65 * @param string $modified_url The link to the paged page
69 - * @param string $original_url The link to the original first page
66 + * @param string $orginal_url The link to the original first page
70 67 * @param int $page The page number
71 68 */
72 69 return apply_filters( 'pll_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page );
73 70 }