PluginProbe ʕ •ᴥ•ʔ
WP Chat App / trunk
WP Chat App vtrunk
3.8.1 3.8.2 trunk 2.6 3.4 3.4.1 3.4.2 3.4.4 3.4.5 3.4.6 3.5 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0
wp-whatsapp / vendor-prefixed / src / Contracts / AddonHostAdapter.php
wp-whatsapp / vendor-prefixed / src / Contracts Last commit date
AddonHostAdapter.php 4 months ago PluginMenuAdapter.php 4 months ago
AddonHostAdapter.php
30 lines
1 <?php
2
3 namespace WhatsappScoped\YayCommerce\AdminShell\Contracts;
4
5 /**
6 * Optional interface for plugins that host licensed addons.
7 *
8 * When a plugin adapter implements this alongside PluginMenuAdapter,
9 * AdminShell creates an AddonBridge that reads the declared filter,
10 * registers addon entries in the LicenseRegistry, and renders
11 * license cards for them on the Licenses page.
12 *
13 * Example: YayMail Lite's adapter implements both PluginMenuAdapter
14 * and AddonHostAdapter, returning 'yaymail_available_licensing_plugins'.
15 * All existing addons continue using that filter unchanged.
16 * @internal
17 */
18 interface AddonHostAdapter
19 {
20 /**
21 * WordPress filter name that addons use to register their licensing data.
22 *
23 * The filter must return an array of entries, each with:
24 * [ 'slug', 'name', 'basename', 'file', 'url', 'item_id' ]
25 *
26 * Same format as yaycommerce_licensing_plugins.
27 */
28 public function get_addon_licensing_filter() : string;
29 }
30