public function update($id, $args = [])
    {
        if ($args['status'] === 'activate') {
            activate_plugin($id, '', false, true);
        } elseif ($args['status'] === 'deactivate') {
            deactivate_plugins($id, true, false);
        }
    }
public function update($id, $args = [])
    {
        if ($args['status'] === 'activate') {
            activate_plugin($id, '', false, true);
        } elseif ($args['status'] === 'deactivate') {
            deactivate_plugins($id, true, false);
        }
    }
public function update ( $ id , $ args = [ ] ) { if ( $ args [ 'status' ] === 'activate' ) { activate_plugin ( $ id , '' , false , true ) ; } elseif ( $ args [ 'status' ] === 'deactivate' ) { deactivate_plugins ( $ id , true , false ) ; } }
Activate or deactivate specified plugin.

@param string $id   Path to plugin.
@param array  $args Optional data used to update an object.
Activate or deactivate specified plugin .