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

AddonController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 44
ccs 0
cts 19
cp 0
rs 10
wmc 3
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
B render_page() 0 26 2
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