Airplane_Mode_Core::remove_bulk_actions PHP Метод

remove_bulk_actions() публичный Метод

Remove the ability to update plugins/themes from single site and multisite bulk actions
public remove_bulk_actions ( array $actions ) : array
$actions array All the bulk actions.
Результат array $actions The remaining actions
        public function remove_bulk_actions($actions)
        {
            // Bail if disabled.
            if (!$this->enabled()) {
                return $actions;
            }
            // Set an array of items to be removed with optional filter.
            if (false === ($remove = apply_filters('airplane_mode_bulk_items', array('update-selected', 'update', 'upgrade')))) {
                return $actions;
            }
            // Loop the item array and unset each.
            foreach ($remove as $key) {
                unset($actions[$key]);
            }
            // Return the remaining.
            return $actions;
        }