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