28 lines
588 B
PHP
28 lines
588 B
PHP
<?php
|
|
/**
|
|
* Fired during plugin activation.
|
|
*
|
|
* @package MediaRightsAudit\Core
|
|
*/
|
|
|
|
namespace MediaRightsAudit\Core;
|
|
|
|
use MediaRightsAudit\Admin\Settings;
|
|
|
|
/**
|
|
* Handles tasks that run once when the plugin is activated.
|
|
*/
|
|
class Activator {
|
|
|
|
/**
|
|
* Creates database tables, seeds the initial DB version, and sets default settings.
|
|
*
|
|
* @return void
|
|
*/
|
|
public static function activate(): void {
|
|
Database::create_tables();
|
|
update_option( 'robotstxt_mediaaudit_db_version', ROBOTSTXT_MEDIAAUDIT_DB_VERSION );
|
|
Settings::maybe_seed_defaults();
|
|
flush_rewrite_rules();
|
|
}
|
|
}
|