# logtivity/1.0/Logs/Core/Logtivity_Core.php

Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity, version 1.0. 41 lines.

- Page: https://pluginprobe.com/plugins/logtivity/1.0/code/Logs/Core/Logtivity_Core.php
- Raw: https://pluginprobe.com/plugins/logtivity/1.0/raw/Logs/Core/Logtivity_Core.php
- Modified: 2021-03-10T21:49:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/logtivity/1.0/code/Logs/Core/Logtivity_Core.php#L10-L20`.

```php
<?php

class Logtivity_Core extends Logtivity_Abstract_Logger
{
	public function registerHooks()
	{
		add_action( 'upgrader_process_complete', [$this, 'upgradeProcessComplete'], 10, 2);
	}

	public function upgradeProcessComplete( $upgrader_object, $options ) 
	{
	    if ( $options['type'] != 'core' ) {
	    	return;
	    }

		if ($options['action'] == 'update') {
			
			return $this->coreUpdated($upgrader_object, $options);

		}

		if ($options['action'] == 'install') {

			return $this->coreInstalled($upgrader_object, $options);

		}
	}

	public function coreUpdated($upgrader_object, $options)
	{
		return Logtivity_Logger::log('WP Core Updated');
	}

	public function coreInstalled($upgrader_object, $options)
	{
		return Logtivity_Logger::log('WP Core Installed');
	}

}

$Logtivity_Core = new Logtivity_Core;
```
