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 / PluginMenuAdapter.php
wp-whatsapp / vendor-prefixed / src / Contracts Last commit date
AddonHostAdapter.php 4 months ago PluginMenuAdapter.php 4 months ago
PluginMenuAdapter.php
56 lines
1 <?php
2
3 namespace WhatsappScoped\YayCommerce\AdminShell\Contracts;
4
5 /**
6 * Minimal per-plugin config for menu registration.
7 * All plugins (lite + pro) implement this.
8 * Pro plugins implement LicenseConfigAdapter which extends this.
9 * @internal
10 */
11 interface PluginMenuAdapter
12 {
13 /**
14 * Short name for the admin sidebar submenu item, e.g. 'YayMail'.
15 */
16 public function get_menu_title() : string;
17 /**
18 * Browser tab title for the settings page, e.g. 'YayMail Pro - Settings'.
19 */
20 public function get_page_title() : string;
21 /**
22 * Menu slug under YayCommerce, e.g. 'yaymail-settings'.
23 * Return empty string if plugin has no settings page.
24 */
25 public function get_menu_slug() : string;
26 /**
27 * Render callback for the settings page.
28 * Return null to redirect to the Licenses page (pro) or show nothing (lite).
29 */
30 public function get_settings_page_callback() : ?callable;
31 /**
32 * Position of the plugin submenu. Return null for WP default ordering.
33 */
34 public function get_settings_page_position() : ?int;
35 /**
36 * WP capability required. Default: 'manage_options'.
37 */
38 public function get_capability() : string;
39 /**
40 * WP plugin basename, e.g. 'yaymail-pro/yaymail.php'.
41 */
42 public function get_plugin_basename() : string;
43 /**
44 * Label for the settings action link on the Plugins page.
45 */
46 public function get_settings_label() : string;
47 /**
48 * Documentation URL. Return empty string to hide the link.
49 */
50 public function get_docs_url() : string;
51 /**
52 * "Go Pro" upgrade URL (for lite plugins). Return empty string to hide.
53 */
54 public function get_pro_url() : string;
55 }
56