PluginProbe ʕ •ᴥ•ʔ
Check & Log Email – Easy Email Testing & Mail logging / trunk
Check & Log Email – Easy Email Testing & Mail logging vtrunk
1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 2.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.13.1 2.0.13.2 2.0.14 2.0.2 2.0.3 2.0.4 2.0.5 2.0.5.1 2.0.6 2.0.7 2.0.8 2.0.9 trunk 0.5.7 0.6.0 0.6.1 0.6.2 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.12.1 1.0.13 1.0.13.1 1.0.2 1.0.3
check-email / include / Core / UI / Check_Email_UI_Loader.php
check-email / include / Core / UI Last commit date
Component 1 month ago Page 1 month ago Setting 1 month ago list_table 1 month ago Check_Email_UI_Loader.php 1 month ago
Check_Email_UI_Loader.php
67 lines
1 <?php namespace CheckEmail\Core\UI;
2
3 use CheckEmail\Core\Loadie;
4 use CheckEmail\Core\UI\Page\Check_Email_Log_List_Page;
5
6 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
7
8 /**
9 * Admin UI Loader.
10 * Loads and initializes all admin pages and components.
11 */
12 class Check_Email_UI_Loader implements Loadie {
13
14 protected $components = array();
15 protected $pages = array();
16
17
18 public function load() {
19 $this->initialize_components();
20 $this->initialize_pages();
21
22 foreach ( $this->components as $component ) {
23 $component->load();
24 }
25
26 foreach ( $this->pages as $page ) {
27 $page->load();
28 }
29 }
30
31 protected function initialize_components() {
32 if ( current_user_can( Check_Email_Log_List_Page::CAPABILITY ) ) {
33 if( $this->is_show_dashboard_widget() ) {
34 $this->components['dashboard_widget'] = new Component\Check_Email_Dashboard_Widget();
35 }
36 }
37 }
38
39 public function is_show_dashboard_widget() {
40 $this->components['core_settings'] = new Setting\Check_Email_Core_Setting();
41 $dashboard_status = false;
42 $option = get_option( 'check-email-log-core' );
43 if(!isset( $option['enable_dashboard_widget']) || (isset( $option['enable_dashboard_widget']) && $option['enable_dashboard_widget'] ) ){
44 $dashboard_status = true;
45 }
46
47 return $dashboard_status;
48 }
49
50 /**
51 * Initialize Admin page Objects.
52 *
53 * This method may be overwritten in tests.
54 *
55 * @access protected
56 */
57 protected function initialize_pages() {
58 $this->pages['check_email'] = new Page\Check_Email_Status_Page();
59 $this->pages['log_list_page'] = new Page\Check_Email_Log_List_Page();
60 $this->pages['settings_page'] = new Page\Check_Email_Settings_Page();
61 $this->pages['wizard_page'] = new Page\Check_Email_Wizard_Page();
62 $this->pages['error_tracker_list'] = new Page\Check_Email_Error_Tracker_list();
63 $this->pages['check_email_analyzer'] = new Page\Check_Email_Analyzer();
64 $this->pages['check_email_dashboard'] = new Page\Check_Email_Dashboard();
65 }
66 }
67