This commit is contained in:
KhaiNguyen
2020-02-13 10:39:37 +07:00
commit 59401cb805
12867 changed files with 4646216 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Links
*/
/**
* Represents installer for the link module.
*/
class WPSEO_Link_Installer {
/**
* Installable objects.
*
* @var WPSEO_Installable[]
*/
protected $installables = [];
/**
* Sets the installables.
*/
public function __construct() {
$this->installables = [
new WPSEO_Link_Storage(),
new WPSEO_Meta_Storage(),
];
}
/**
* Runs the installation of the link module.
*/
public function install() {
foreach ( $this->get_installables() as $installable ) {
$installable->install();
}
}
/**
* Adds a installable object to the installer.
*
* @param WPSEO_Installable $installable The installable object.
*/
public function add_installable( WPSEO_Installable $installable ) {
$this->installables[] = $installable;
}
/**
* Returns the installable objects.
*
* @return WPSEO_Installable[] The installables to use.
*/
protected function get_installables() {
return $this->installables;
}
}