HEX
Server: Apache/2.4.65 (Debian)
System: Linux localhost 6.9.12 #1 SMP Tue May 5 14:23:20 UTC 2026 x86_64
User: www-data (33)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/coblocks/includes/admin/class-coblocks-install.php
<?php
/**
 * Run on plugin install.
 *
 * @package CoBlocks
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * CoBlocks_Install Class
 */
class CoBlocks_Install {

	/**
	 * Constructor
	 */
	public function __construct() {
		register_activation_hook( COBLOCKS_PLUGIN_FILE, array( $this, 'register_defaults' ) );
	}

	/**
	 * Register plugin defaults.
	 */
	public function register_defaults() {
		if ( is_admin() ) {
			if ( ! get_option( 'coblocks_date_installed' ) ) {
				add_option( 'coblocks_date_installed', gmdate( 'Y-m-d h:i:s' ) );
			}
		}
	}
}

return new CoBlocks_Install();