File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ function bootstrap() {
1919 define ( 'PS_DISABLE_MU ' , true );
2020 add_action ( 'plugins_loaded ' , __NAMESPACE__ . '\\on_plugins_loaded ' , 1 );
2121 add_action ( 'mu_plugins_loaded ' , __NAMESPACE__ . '\\on_mu_plugins_loaded ' , 1 );
22+ add_action ( 'admin_menu ' , __NAMESPACE__ . '\\remove_options_page ' , 99 );
23+ add_action ( 'network_admin_menu ' , __NAMESPACE__ . '\\remove_network_page ' , 99 );
2224}
2325
2426/**
@@ -91,3 +93,21 @@ function on_mu_plugins_loaded() {
9193 }
9294 }
9395}
96+
97+ /**
98+ * Remove the options page from the Settings menu.
99+ *
100+ * @return void
101+ */
102+ function remove_options_page () {
103+ remove_submenu_page ( 'options-general.php ' , 'patchstack ' );
104+ }
105+
106+ /**
107+ * Remove the network admin menu.
108+ *
109+ * @return void
110+ */
111+ function remove_network_page () {
112+ remove_menu_page ( 'patchstack-multisite ' );
113+ }
You can’t perform that action at this time.
0 commit comments