HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: //opt/plugins/comments-like-dislike/inc/classes/cld-activation.php
<?php

defined( 'ABSPATH' ) or die( 'No script kiddies please!!' );
if ( !class_exists( 'CLD_Activation' ) ) {

	class CLD_Activation extends CLD_Library {

		/**
		 * Includes all the activation tasks
		 * 
		 * @since 1.0.0
		 */
		function __construct() {
			register_activation_hook( CLD_PATH . 'comments-like-dislike.php', array( $this, 'activation_tasks' ) );
		}
		
		/**
		 * Store default settings in database on activation
		 * 
		 * @since 1.0.0
		 */
		function activation_tasks() {
			$default_settings = $this->get_default_settings();
			if(!get_option('cld_settings')){
				update_option('cld_settings',$default_settings);
			}
		}

		

	}

	new CLD_Activation();
}