• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

equalizedigital / accessibility-checker / 19966527801

05 Dec 2025 02:47PM UTC coverage: 57.464%. First build
19966527801

Pull #1298

github

web-flow
Merge b38c84b5f into fb04bca5f
Pull Request #1298: Release v1.35.0

65 of 108 new or added lines in 10 files covered. (60.19%)

4173 of 7262 relevant lines covered (57.46%)

3.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.41
/admin/class-admin.php
1
<?php
2
/**
3
 * Class file for the Accessibility Checker plugin.
4
 *
5
 * @package Accessibility_Checker
6
 */
7

8
namespace EDAC\Admin;
9

10
use EDAC\Admin\SiteHealth\Information;
11
use EDAC\Admin\SiteHealth\Checks;
12
use EDAC\Admin\Purge_Post_Data;
13
use EDAC\Admin\Post_Save;
14
use EqualizeDigital\AccessibilityChecker\Admin\Upgrade_Promotion;
15
use EqualizeDigital\AccessibilityChecker\Admin\Admin_Footer_Text;
16

17
/**
18
 * Admin handling class.
19
 */
20
class Admin {
21

22
        /**
23
         * Meta boxes instance.
24
         *
25
         * @since 1.10.0
26
         *
27
         * @var Meta_Boxes
28
         */
29
        private Meta_Boxes $meta_boxes;
30

31
        /**
32
         * Class constructor for injecting dependencies.
33
         *
34
         * @param Meta_Boxes $meta_boxes Meta boxes instance.
35
         */
36
        public function __construct( Meta_Boxes $meta_boxes ) {
37
                $this->meta_boxes = $meta_boxes;
2✔
38
        }
39

40
        /**
41
         * Initialize.
42
         *
43
         * @return void
44
         */
45
        public function init(): void {
46

47
                $update_database = new Update_Database();
2✔
48
                $update_database->init_hooks();
2✔
49

50
                add_action( 'admin_enqueue_scripts', [ 'EDAC\Admin\Enqueue_Admin', 'enqueue' ] );
2✔
51
                add_action( 'wp_trash_post', [ Purge_Post_Data::class, 'delete_post' ] );
2✔
52
                add_action( 'save_post', [ Post_Save::class, 'delete_issue_data_on_post_trashing' ], 10, 3 );
2✔
53
                add_filter( 'edac_filter_generate_link_type_ref', [ $this, 'add_ref_param_to_links' ], 5, 1 );
2✔
54

55
                $plugin_action_links = new Plugin_Action_Links();
2✔
56
                $plugin_action_links->init_hooks();
2✔
57

58
                $admin_notices = new Admin_Notices();
2✔
59
                $admin_notices->init_hooks();
2✔
60

61
                $widgets = new Widgets();
2✔
62
                $widgets->init_hooks();
2✔
63

64
                $site_health_info = new Information();
2✔
65
                $site_health_info->init_hooks();
2✔
66

67
                $site_health_checks = new Checks();
2✔
68
                $site_health_checks->init_hooks();
2✔
69

70
                $upgrade_promotion = new Upgrade_Promotion();
2✔
71
                $upgrade_promotion->init();
2✔
72

73
                $plugin_row_meta = new Plugin_Row_Meta();
2✔
74
                $plugin_row_meta->init_hooks();
2✔
75

76
                $admin_footer_text = new Admin_Footer_Text();
2✔
77
                $admin_footer_text->init();
2✔
78

79
                $this->init_ajax();
2✔
80

81
                $this->meta_boxes->init_hooks();
2✔
82
        }
83

84
        /**
85
         * Initialize ajax.
86
         *
87
         * @return void
88
         */
89
        private function init_ajax(): void {
90
                if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
2✔
91
                        return;
2✔
92
                }
93

94
                $ajax = new Ajax();
×
95
                $ajax->init_hooks();
×
96

97
                $frontend_highlight = new Frontend_Highlight();
×
98
                $frontend_highlight->init_hooks();
×
99
        }
100

101
        /**
102
         * Add ref param in links that are used through the plugin link helpers.
103
         *
104
         * @param string $ref Ref param.
105
         * @return string
106
         */
107
        public function add_ref_param_to_links( string $ref ): string {
NEW
108
                if ( defined( 'EDAC_REF_PARAM' ) && ! empty( EDAC_REF_PARAM ) ) {
×
NEW
109
                        return EDAC_REF_PARAM;
×
110
                } else {
NEW
111
                        return $ref;
×
112
                }
113
        }
114
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc