feat: scaffold plugin foundation
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user