Removes updater from Wordpress.
@since 1.0.0
180854
public function finish()
    {
        $response = new Response;
        try {
            $file = File::auth();
            if ( $file->exists( self::FILENAME ) )
                unlink( self::FILENAME );
            $response->success = true;
        } catch (Exception $e) {
            Log::error( $e );
        }
        $response->json();
    }
728472
public function cleanup()
    {
        $aDeletedModules = $this->getDeletedExtensions();

        //collecting deleted extension IDs
        $aDeletedModuleIds = array_keys($aDeletedModules);

        // removing from aModules config array
        $this->_removeExtensions($aDeletedModuleIds);

        // removing from aDisabledModules array
        $this->_removeFromDisabledModulesArray($aDeletedModuleIds);

        // removing from aModulePaths array
        $this->removeFromModulesArray(static::MODULE_KEY_PATHS, $aDeletedModuleIds);

        // removing from aModuleEvents array
        $this->removeFromModulesArray(static::MODULE_KEY_EVENTS, $aDeletedModuleIds);

        // removing from aModuleVersions array
        $this->removeFromModulesArray(static::MODULE_KEY_VERSIONS, $aDeletedModuleIds);

        // removing from aModuleExtensions array
        $this->removeFromModulesArray(static::MODULE_KEY_EXTENSIONS, $aDeletedModuleIds);

        // removing from aModuleFiles array
        $this->removeFromModulesArray(static::MODULE_KEY_FILES, $aDeletedModuleIds);

        // removing from aModuleTemplates array
        $this->removeFromModulesArray(static::MODULE_KEY_TEMPLATES, $aDeletedModuleIds);

        // removing from aModuleControllers array
        $this->removeFromModulesArray(static::MODULE_KEY_CONTROLLERS, $aDeletedModuleIds);

        //removing from config tables and templates blocks table
        $this->_removeFromDatabase($aDeletedModuleIds);

        //Remove from caches.
        \OxidEsales\Eshop\Core\Module\ModuleVariablesLocator::resetModuleVariables();
    }
1322815
public function clear()
    {
        if (null !== $this->aSkill) {
            $this->aSkill->removePicture($this);
        }
        $this->id = null;
        $this->title = null;
        $this->description = null;
        $this->url = null;
        $this->thumb_url = null;
        $this->skill_id = null;
        $this->photographer = null;
        $this->photographer_id = null;
        $this->athlete = null;
        $this->athlete_id = null;
        $this->uploader_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
701079
public function removeAllAction()
    {
        $isPosted = $this->request->getPost('doRemoveAll');
        
        if (!$isPosted) {
            $this->response->redirect($this->request->getPost('redirect'));
        }

        $comments = new \Phpmvc\Comment\CommentsInSession();
        $comments->setDI($this->di);

        $comments->deleteAll();

        $this->response->redirect($this->request->getPost('redirect'));
    }
918587
public function clear()
    {
        if (null !== $this->aSource) {
            $this->aSource->removeMedia($this);
        }
        $this->id = null;
        $this->source_id = null;
        $this->pageid = null;
        $this->title = null;
        $this->url = null;
        $this->mime = null;
        $this->width = null;
        $this->height = null;
        $this->size = null;
        $this->sha1 = null;
        $this->thumburl = null;
        $this->thumbmime = null;
        $this->thumbwidth = null;
        $this->thumbheight = null;
        $this->thumbsize = null;
        $this->descriptionurl = null;
        $this->descriptionurlshort = null;
        $this->imagedescription = null;
        $this->datetimeoriginal = null;
        $this->artist = null;
        $this->licenseshortname = null;
        $this->usageterms = null;
        $this->attributionrequired = null;
        $this->restrictions = null;
        $this->timestamp = null;
        $this->user = null;
        $this->userid = null;
        $this->missing = null;
        $this->known = null;
        $this->imagerepository = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
328469
public function removeDuplicateUsers()
    {
        $this->db->query("DELETE FROM " . $this->db->users . "
        WHERE id NOT IN (
            SELECT *
            FROM (
                SELECT MIN(id)
                FROM " . $this->db->users . "
                GROUP BY user_login
            ) temp
        )");

        wp_cache_flush();
    }
1228231
public function remove()
    {
        $f = json_decode(file_get_contents(FEnv::get("framework.root").
            "elements/config_files/core/apps.json"));
        foreach ($f as $one => $val) {
            if ($val->name == $this->name) {
                unset($f->$one);
                break;
            }
        }

        $f = json_encode($f, JSON_PRETTY_PRINT);
        file_put_contents(FEnv::get("framework.root")."elements/config_files/core/apps.json", $f);

        Server::delete(FEnv::get("framework.root")."apps/".$this->name, "directory");
        Server::delete(
            FEnv::get("framework.root")."public/components/apps/".strtolower($this->name),
            'directory'
        );
    }
1114325
public function flush()
    {
 		global $wpdb;

 		$cachedItems = $wpdb->get_results("
 			SELECT *
 			FROM  {$wpdb->options}
 			WHERE  option_name LIKE  '_transient_%'
 		");

 		foreach ($cachedItems as $item) {
 			$cachedKey = str_replace('_transient_', '', $item->option_name);
 			delete_transient($cachedKey);
 		}
 	}
455408
function removeExisting ()
{
    if (fs.existsSync("web/assets"))
    {
        var stat = fs.lstatSync("web/assets");

        if (stat.isFile() || stat.isSymbolicLink())
        {
            fs.unlinkSync("web/assets");
        }
        else
        {
            wrench.rmdirSyncRecursive("web/assets");
        }
    }
}
452888
public function uninstall(){
    global $wpdb;

    self::clear_cache();
    self::delete_files();
    delete_option(MF_SETTINGS_KEY);
    //DB version
    delete_option(MF_DB_VERSION_KEY);

    $sql = "DELETE a.* FROM $wpdb->postmeta AS a, ".MF_TABLE_POST_META." AS b WHERE b.meta_id = a.meta_id";
    $wpdb->query($sql);

    $sql = "DROP TABLE " . MF_TABLE_POSTTYPES;
    $wpdb->query($sql);
    
    $sql = "DROP TABLE " . MF_TABLE_CUSTOM_TAXONOMY;
    $wpdb->query($sql);
    
    $sql = "DROP TABLE " . MF_TABLE_CUSTOM_FIELDS;
    $wpdb->query($sql);

    $sql = "DROP TABLE " . MF_TABLE_CUSTOM_GROUPS;
    $wpdb->query($sql);

    $sql = "DROP TABLE " . MF_TABLE_POST_META;
    $wpdb->query($sql);
    
    $current = get_option('active_plugins');
    $plugin = plugin_basename(MF_PATH.'/main.php');
    array_splice($current, array_search( $plugin, $current), 1 );
    do_action('deactivate_' . trim( $plugin ));
    update_option('active_plugins', $current);

    wp_redirect('options-general.php');
  }
738389
public function actionRemovePageVersion()
    {
        $pageId = Yii::$app->request->getBodyParam('pageId');
        
        $page = NavItemPage::findOne((int) $pageId);
        
        if ($page) {
            $page->forceNavItem->updateTimestamp();
            return $page->delete();
        }
        
        return false;
    }
348961
private function removeObsoleteMetadata(): void
  {
    // 1 pass through $mySources make new array with routine_name is key.
    $clean = [];
    foreach ($this->sources as $source)
    {
      $routine_name = $source['routine_name'];
      if (isset($this->phpStratumMetadata[$routine_name]))
      {
        $clean[$routine_name] = $this->phpStratumMetadata[$routine_name];
      }
    }

    $this->phpStratumMetadata = $clean;
  }
831991
public function clear()
	{
		if( $this->prefix ) {
			$this->object->flushByTag( $this->prefix . 'siteid' );
		} else {
			$this->object->flush();
		}
	}
589492
public function deactivate()
    {
        $muPluginFile = WP_CONTENT_DIR . '/mu-plugins/' . $this->plugin . '-mu.php';

        if (is_file($muPluginFile)) {
            unlink($muPluginFile);
        }

        if (is_dir($this->destination)) {
            $this->rrmdir(dirname($this->destination));
        }

        delete_option($this->plugin . 'version');
        delete_option('staticwp_deferred_admin_notices');
    }
76443
public function invalidate() {
		$this->incrementor = time();
		\wp_cache_set( $this->incrementor_key, $this->incrementor, $this->group, 0 );
	}
116323
protected function deletePostMeta()
    {
        $WpDb = $this->s::wpDb();

        $sql = /* Delete post meta. */ '
                DELETE
                    FROM `'.esc_sql($WpDb->postmeta).'`
                WHERE
                    `meta_key` LIKE %s
                    OR `meta_key` LIKE %s
            ';
        $like1 = $WpDb->esc_like($this->App->Config->©brand['©var'].'_').'%';
        $like2 = '%'.$WpDb->esc_like('_'.$this->App->Config->©brand['©var'].'_').'%';

        $WpDb->query($WpDb->prepare($sql, $like1, $like2));
    }
1071374
protected function removeLaravelCommands(): void
    {
        $devCommands = ['AuthMake', 'ControllerMake', 'MiddlewareMake',
            'NotificationTable', 'ExceptionMake', 'SessionTable',
            'ChannelMake',
            'ConsoleMake',
            'EventGenerate',
            'EventMake',
            'ExceptionMake',
            'FactoryMake',
            'JobMake',
            'ListenerMake',
            'MailMake',
            'MiddlewareMake',
            'ModelMake',
            'NotificationMake',
            'ObserverMake',
            'PolicyMake',
            'ProviderMake',
            'TestMake',
            'RequestMake',
            'ResourceMake',
            'RuleMake',
            'SeederMake',
        ];

        array_map(function ($item) {
            unset($this->devCommands[$item]);
        }, $devCommands);

        $commands = ['Optimize',
            'OptimizeClear', 'ClearResets', 'RouteCache',
            'RouteClear',
            'RouteList', 'Preset', 'ViewCache',
            'ViewClear', 'Serve', 'StorageLink', ];
        array_map(function ($item) {
            unset($this->commands[$item]);
        }, $commands);
    }