# polylang/trunk/src/install/updater-interface.php

Polylang, version trunk. 37 lines.

- Page: https://pluginprobe.com/plugins/polylang/trunk/code/src/install/updater-interface.php
- Raw: https://pluginprobe.com/plugins/polylang/trunk/raw/src/install/updater-interface.php
- Modified: 2026-09-14T16:30:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/polylang/trunk/code/src/install/updater-interface.php#L10-L20`.

```php
<?php
/**
 * @package Polylang
 */

defined( 'ABSPATH' ) || exit;

/**
 * Contract an add-on's updater must fulfil to take part in the leader election.
 *
 * Lives in core because each add-on ships the updater under its own namespace: this interface is the only type they
 * all share, and therefore the only one the registry can type hint against.
 *
 * @since 3.9
 */
interface PLL_Updater_Interface {

	/**
	 * Returns the updater version, used to elect the leader.
	 *
	 * @since 3.9
	 *
	 * @return string
	 */
	public static function get_version(): string;

	/**
	 * Sets up what must not be duplicated. Called once, on the elected updater.
	 *
	 * @since 3.9
	 *
	 * @param PLL_Base $polylang Polylang object.
	 * @return void
	 */
	public function init( PLL_Base $polylang ): void;
}

```
