HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/epamokos.kaunokolegija.lt/wp-content/plugins/delete-me/inc/activate.php
<?php
// File called by class?
if ( isset( $this ) == false || get_class( $this ) != 'plugin_delete_me' ) exit;

// Activate
if ( $network_wide ) {
	
	// Network activation
	// Add option defaults if not found
	// Network Wide option added in main plugin file during init if missing
	$blog_ids = $this->wpdb->get_col( "SELECT `blog_id` FROM " . $this->wpdb->blogs );
	
	foreach ( $blog_ids as $blog_id ) {		
		
		switch_to_blog( $blog_id );		
		if ( count( $this->fetch_option() ) == 0 ) add_option( $this->info['option'], $this->default_option() );		
		restore_current_blog();
		
	}
	
} else {
	
	// Site activation
	// Add option defaults if not found
	if ( count( $this->fetch_option() ) == 0 ) add_option( $this->info['option'], $this->default_option() );
	
}