HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/cwd/wp-content/plugins/email-log/include/Core/UI/Page/AddonListPage.php
<?php namespace EmailLog\Core\UI\Page;

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

/**
 * Addon List Page.
 *
 * @since 2.0
 */
class AddonListPage extends BasePage {

	/**
	 * Page slug.
	 */
	const PAGE_SLUG = 'email-log-addons';

	/**
	 * Register page.
	 */
	public function register_page() {
		$this->page = add_submenu_page(
			LogListPage::PAGE_SLUG,
			__( 'Add-ons', 'email-log' ),
			__( 'Add-ons', 'email-log' ),
			'manage_options',
			self::PAGE_SLUG,
			array( $this, 'render_page' )
		);

		add_action( "load-{$this->page}", array( $this, 'render_help_tab' ) );
		add_action( "load-{$this->page}", array( $this, 'enqueue_assets' ) );
	}

	/**
	 * Render the list of add-on in the page.
	 */
	public function render_page() {
		?>
		<div class="wrap">
			<h1><?php _e( 'Email Log Add-ons', 'email-log' ); ?></h1>
			<?php settings_errors(); ?>

			<p>
				<?php _e( 'These add-ons provide additional functionality to Email Log plugin and are available for purchase.', 'email-log' ); ?>
				<?php _e( 'If your license includes the add-ons below, you will be able to install them from here with one-click.', 'email-log' ); ?>
			</p>

			<?php
			/**
			 * Before add-ons are listed in the add-on list page.
			 *
			 * @since 2.0.0
			 */
			do_action( 'el_before_addon_list' );

			$email_log = email_log();
			$licenser  = $email_log->get_licenser();
			if ( ! is_null( $licenser ) ) {
				$licenser->get_addon_list()->render();
			}
			?>
		</div>
		<?php

		$this->render_page_footer();
	}

	/**
	 * Enqueue static assets needed for this page.
	 */
	public function enqueue_assets() {
		$email_log = email_log();

		wp_enqueue_style( 'el_addon_list', plugins_url( 'assets/css/admin/addon-list.css', $email_log->get_plugin_file() ), array(), $email_log->get_version() );
		wp_enqueue_script( 'el_addon_list', plugins_url( 'assets/js/admin/addon-list.js', $email_log->get_plugin_file() ), array( 'jquery' ), $email_log->get_version(), true );
	}
}