Completed
Push — feature/addons-page ( 16e184...27132d )
by Maria Daniel Deepak
03:10
created

AddonController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php namespace EmailLog\Core\UI\Component;
2
3
defined( 'ABSPATH' ) || exit; // Exit if accessed directly
4
5
/**
6
 * Enhance Plugin List UI.
7
 *
8
 * @since   2.0
9
 * @package EmailLog\Core\UI
10
 */
11
class AddonController {
12
13
	/**
14
	 * @var string Plugin basename.
15
	 */
16
	protected $plugin_dir_url;
17
18
	/**
19
	 * Initialize the plugin.
20
	 */
21
	public function __construct( $file ) {
22
		$this->plugin_dir_url = plugin_dir_url( $file );
23
	}
24
25
	/**
26
	 * Renders the HTML for the Addons page.
27
	 */
28
	public function render_page() {
29
		// Enqueue the required styles
30
		wp_enqueue_style( 'el_addon_adm_pg', $this->plugin_dir_url . 'assets/css/AddonController.css', array(), false, 'all' )
31
	?>
32
		<p>
33
			<?php _e( 'These extensions <em><strong>add functionality</strong></em> to your existing Email logs.', 'email-log' ); ?>
34
		</p>
35
		<div class="el-container">
36
		<?php for( $i = 0; $i < 4; $i++ ) { ?>
37
			<div class="el-addon">
38
				<h3 class="el-addon-title">Resend Email</h3>
39
40
				<a href="#" title="Starter Package">
41
					<img src="https://8333-presscdn-0-98-pagely.netdna-ssl.com/wp-content/themes/edd-v2/images/starter-package.png" class="attachment-showcase wp-post-image" alt="Alternate Title" title="Some Good Title" />
42
				</a>
43
44
				<p>This addon will emerge of our Sun bursts and will do this.</p>
45
46
				<a href="#" class="button-secondary">Gear up!</a>
47
			</div> <!-- .el-addon -->
48
49
			<?php } ?>
50
			<div class="clear"></div>
51
		</div> <!-- .el-container -->
52
	<?php
53
	}
54
}
55