public function plugin_add_tabs($nonmenu_tabs)
{
// Bail if disabled.
if (!$this->enabled()) {
return $nonmenu_tabs;
}
// Set an array of tabs to be removed with optional filter.
if (false === ($remove = apply_filters('airplane_mode_bulk_items', array('featured', 'popular', 'recommended', 'favorites', 'beta')))) {
return $nonmenu_tabs;
}
// Loop the item array and unset each.
foreach ($remove as $key) {
unset($nonmenu_tabs[$key]);
}
// Return the tabs.
return $nonmenu_tabs;
}