<?php
declare(strict_types=1);

namespace forge12\floating_menu;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Fired during plugin activation.
 *
 * @since 1.4.2
 */
class Activator {

	/**
	 * Run on plugin activation.
	 *
	 * The floating_menu post type is registered on the `init` hook during the
	 * activation request, so flushing rewrite rules here registers its rules.
	 *
	 * @return void
	 */
	public static function activate(): void {
		// Persist the current plugin version for future upgrade routines.
		update_option( 'f12_floating_menu_version', FORGE12_FLOATING_VERSION );

		flush_rewrite_rules();
	}
}
