20 lines
445 B
PHP
20 lines
445 B
PHP
<?php
|
|
/**
|
|
* Plugin activation lifecycle hook.
|
|
*
|
|
* @package WPContentSync
|
|
*/
|
|
|
|
namespace WPContentSync;
|
|
|
|
use WPContentSync\Settings\Settings;
|
|
use WPContentSync\Settings\SettingsRepository;
|
|
|
|
final class Activator {
|
|
public static function activate(): void {
|
|
if ( false === get_option( SettingsRepository::OPTION_NAME, false ) ) {
|
|
update_option( SettingsRepository::OPTION_NAME, Settings::fromArray( array() )->toArray(), false );
|
|
}
|
|
}
|
|
}
|