PluginProbe
Polylang / 2.0.3
Polylang v2.0.3
3.8.10 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 All 234 releases
← All changes | include/links-permalinks.php +3 -20 2.7.4 → 2.0.3 View file →
@@ -6,9 +6,9 @@
6 6 * @since 1.6
7 7 */
8 8 abstract class PLL_Links_Permalinks extends PLL_Links_Model {
9 9 public $using_permalinks = true;
10 - 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
11 11 protected $root, $use_trailing_slashes;
12 12 protected $always_rewrite = array( 'date', 'root', 'comments', 'search', 'author' );
13 13
14 14 /**
@@ -35,17 +35,9 @@
35 35 * @param string $url url to modify
36 36 * @return string modified url
37 37 */
38 38 public function remove_paged_from_link( $url ) {
39 - /**
40 - * Filter an url after the paged part has been removed
41 - *
42 - * @since 2.0.6
43 - *
44 - * @param string $modified_url The link to the first page
45 - * @param string $original_url The link to the original paged page
46 - */
47 - return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#/page/[0-9]+/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url );
39 + return preg_replace( '#\/page\/[0-9]+\/?#', $this->use_trailing_slashes ? '/' : '', $url );
48 40 }
49 41
50 42 /**
51 43 * Returns the link to the paged page when using pretty permalinks
@@ -56,18 +48,9 @@
56 48 * @param int $page
57 49 * @return string modified url
58 50 */
59 51 public function add_paged_to_link( $url, $page ) {
60 - /**
61 - * Filter an url after the paged part has been added
62 - *
63 - * @since 2.0.6
64 - *
65 - * @param string $modified_url The link to the paged page
66 - * @param string $original_url The link to the original first page
67 - * @param int $page The page number
68 - */
69 - return apply_filters( 'pll_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page );
52 + return user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' );
70 53 }
71 54
72 55 /**
73 56 * Returns the home url