| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Polylang |
| 4 |
*/ |
| 5 |
|
| 6 |
defined( 'ABSPATH' ) || exit; |
| 7 |
|
| 8 |
/** |
| 9 |
* Contract an add-on's updater must fulfil to take part in the leader election. |
| 10 |
* |
| 11 |
* Lives in core because each add-on ships the updater under its own namespace: this interface is the only type they |
| 12 |
* all share, and therefore the only one the registry can type hint against. |
| 13 |
* |
| 14 |
* @since 3.9 |
| 15 |
*/ |
| 16 |
interface PLL_Updater_Interface { |
| 17 |
|
| 18 |
/** |
| 19 |
* Returns the updater version, used to elect the leader. |
| 20 |
* |
| 21 |
* @since 3.9 |
| 22 |
* |
| 23 |
* @return string |
| 24 |
*/ |
| 25 |
public static function get_version(): string; |
| 26 |
|
| 27 |
/** |
| 28 |
* Sets up what must not be duplicated. Called once, on the elected updater. |
| 29 |
* |
| 30 |
* @since 3.9 |
| 31 |
* |
| 32 |
* @param PLL_Base $polylang Polylang object. |
| 33 |
* @return void |
| 34 |
*/ |
| 35 |
public function init( PLL_Base $polylang ): void; |
| 36 |
} |
| 37 |
|