PluginProbe
Polylang / trunk
Polylang vtrunk
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
polylang / src / install / updater-interface.php

updater-interface.php in Polylang trunk, at src/install/updater-interface.php

37 lines 792 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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