PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.6
YayMail – WooCommerce Email Customizer v4.4.6
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
← All changes | vendor-prefixed/src/Menu/ExternalPluginMenuAdapter.php +7 -7 4.4.1 → 4.4.6 View file →
@@ -2,9 +2,9 @@
2 2
3 3 namespace YayMailScoped\YayCommerce\AdminShell\Menu;
4 4
5 5 use YayMailScoped\YayCommerce\AdminShell\Pages\RecommendedPluginsPage;
6 -\defined('ABSPATH') || exit;
6 +defined('ABSPATH') || exit;
7 7 /**
8 8 * Registers an "Other Plugins" submenu under an external plugin's own top-level menu.
9 9 * Used for plugins (e.g. whatsapp, filester) that own their own menu hierarchy
10 10 * and should NOT appear under the shared YayCommerce menu.
@@ -21,20 +21,20 @@
21 21 $this->menu_title = 'Recommended Plugins';
22 22 $this->menu_capability = $config['menu_capability'] ?? 'manage_options';
23 23 $this->menu_slug = $config['menu_slug'] ?? '';
24 24 }
25 - public function init() : void
25 + public function init(): void
26 26 {
27 27 RecommendedPluginsPage::get_instance();
28 - if (!\is_admin()) {
28 + if (!is_admin()) {
29 29 return;
30 30 }
31 - \add_action('admin_menu', [$this, 'register_other_plugins_submenu'], 20);
31 + add_action('admin_menu', [$this, 'register_other_plugins_submenu'], 20);
32 32 }
33 - public function register_other_plugins_submenu() : void
33 + public function register_other_plugins_submenu(): void
34 34 {
35 - $page_id = \add_submenu_page($this->parent_menu, $this->menu_title, $this->menu_title, $this->menu_capability, $this->menu_slug, [RecommendedPluginsPage::class, 'render']);
36 - \add_action('load-' . $page_id, function () {
35 + $page_id = add_submenu_page($this->parent_menu, $this->menu_title, $this->menu_title, $this->menu_capability, $this->menu_slug, [RecommendedPluginsPage::class, 'render']);
36 + add_action('load-' . $page_id, function () {
37 37 RecommendedPluginsPage::load_data();
38 38 });
39 39 }
40 40 }