| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Polylang |
| 4 |
*/ |
| 5 |
|
| 6 |
/** |
| 7 |
* Common class for handling the core sitemaps. |
| 8 |
* |
| 9 |
* The child classes must called the init() method. |
| 10 |
* |
| 11 |
* @since 3.0 |
| 12 |
*/ |
| 13 |
abstract class PLL_Abstract_Sitemaps { |
| 14 |
/** |
| 15 |
* Setups actions and filters. |
| 16 |
* |
| 17 |
* @since 2.8 |
| 18 |
* |
| 19 |
* @return void |
| 20 |
*/ |
| 21 |
public function init() { |
| 22 |
add_filter( 'pll_home_url_white_list', array( $this, 'home_url_white_list' ) ); |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Whitelists the home url filter for the sitemaps. |
| 27 |
* |
| 28 |
* @since 2.8 |
| 29 |
* |
| 30 |
* @param array $whitelist White list. |
| 31 |
* @return array; |
| 32 |
*/ |
| 33 |
public function home_url_white_list( $whitelist ) { |
| 34 |
$whitelist[] = array( 'file' => 'class-wp-sitemaps-posts' ); |
| 35 |
return $whitelist; |
| 36 |
} |
| 37 |
} |
| 38 |
|