WC_Admin_Exporters::hide_from_menus()
Hide menu items from view so the pages exist, but the menu items do not.
Метод класса: WC_Admin_Exporters{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Admin_Exporters = new WC_Admin_Exporters(); $WC_Admin_Exporters->hide_from_menus();
Код WC_Admin_Exporters::hide_from_menus() WC Admin Exporters::hide from menus WC 9.4.2
public function hide_from_menus() { global $submenu; foreach ( $this->exporters as $id => $exporter ) { if ( isset( $submenu[ $exporter['menu'] ] ) ) { foreach ( $submenu[ $exporter['menu'] ] as $key => $menu ) { if ( $id === $menu[2] ) { unset( $submenu[ $exporter['menu'] ][ $key ] ); } } } } }