# email-log/2.1.0/include/Addon/EmailLogAddon.php

Email Log, version 2.1.0. 59 lines.

- Page: https://pluginprobe.com/plugins/email-log/2.1.0/code/include/Addon/EmailLogAddon.php
- Raw: https://pluginprobe.com/plugins/email-log/2.1.0/raw/include/Addon/EmailLogAddon.php
- Modified: 2017-09-21T05:19:46+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/email-log/2.1.0/code/include/Addon/EmailLogAddon.php#L10-L20`.

```php
<?php namespace EmailLog\Addon;

defined( 'ABSPATH' ) || exit; // Exit if accessed directly.

/**
 * Base Email Log Addon.
 *
 * @since 2.0.0
 */
abstract class EmailLogAddon {

	protected $addon_file;
	protected $addon_name = '';
	protected $addon_version = '';
	protected $addon_author = 'Sudar Muthu';

	/**
	 * Addon Updater.
	 *
	 * @var \EmailLog\Addon\AddonUpdater
	 */
	private $updater;

	/**
	 * Initialize add-on data.
	 *
	 * @access protected
	 * @return void
	 */
	abstract protected function initialize();

	/**
	 * Construct a new EmailLogAddon instance.
	 *
	 * @param string                            $addon_file Addon main file.
	 * @param \EmailLog\Addon\AddonUpdater|null $updater    Addon Updater.
	 */
	public function __construct( $addon_file, $updater = null ) {
		$this->addon_file = $addon_file;
		$this->updater    = $updater;

		$this->initialize();
	}

	/**
	 * Load the add-on and setup hooks.
	 *
	 * @inheritdoc
	 */
	public function load() {
		if ( is_null( $this->updater ) ) {
			return;
		}

		$this->updater->set_addon_data( $this->addon_name, $this->addon_version, $this->addon_author );
		$this->updater->load();
	}
}

```
