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

equalizedigital / accessibility-checker / 16786063893

06 Aug 2025 07:02PM UTC coverage: 48.955%. First build
16786063893

Pull #1174

github

web-flow
Merge ba1df184f into 03552e1c7
Pull Request #1174: Release v1.30.0

107 of 113 new or added lines in 3 files covered. (94.69%)

3304 of 6749 relevant lines covered (48.96%)

2.78 hits per line

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

0.0
/partials/settings-page.php
1
<?php
2
/**
3
 * Accessibility Checker plugin file.
4
 *
5
 * @package Accessibility_Checker
6
 */
7

8
/**
9
 * Filter the settings tab items.
10
 *
11
 * @since 1.4.0
12
 *
13
 * @param array $settings_tab_items The settings tab items as an array of arrays. Needs a 'slug', 'label', and 'order'.
14
 */
15
$settings_tab_items = apply_filters(
×
16
        'edac_filter_settings_tab_items',
×
17
        [
×
18
                [
×
19
                        'slug'  => '',
×
20
                        'label' => esc_html__( 'General', 'accessibility-checker' ),
×
21
                        'order' => 1,
×
22
                ],
×
23
        ]
×
24
);
×
25

26
// sort settings tab items.
27
if ( is_array( $settings_tab_items ) ) {
×
28
        usort(
×
29
                $settings_tab_items,
×
30
                function ( $a, $b ) {
×
31
                        if ( $a['order'] < $b['order'] ) {
×
32
                                return -1;
×
33
                        }
34
                        if ( $a['order'] === $b['order'] ) {
×
35
                                return 0;
×
36
                        }
37
                        return 1;
×
38
                }
×
39
        );
×
40
}
41

42
// Get the active tab from the $_GET param.
43
$default_tab  = null;
×
NEW
44
$settings_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : $default_tab; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification not required for tab display.
×
45
$settings_tab = ( array_search( $settings_tab, array_column( $settings_tab_items, 'slug' ), true ) !== false ) ? $settings_tab : $default_tab;
×
46
?>
47

48
<div class="wrap edac-settings <?php echo EDAC_KEY_VALID ? '' : 'pro-callout-wrapper'; ?>">
×
49

50
        <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
×
51

52
        <?php
53
        if ( $settings_tab_items ) {
×
54
                echo '<nav class="nav-tab-wrapper" aria-label="Settings Tabs">';
×
55
                foreach ( $settings_tab_items as $settings_tab_item ) {
×
56
                        $slug      = $settings_tab_item['slug'] ? $settings_tab_item['slug'] : null;
×
57
                        $query_var = $slug ? '&tab=' . $slug : '';
×
58
                        $label     = $settings_tab_item['label'];
×
59
                        ?>
60
                        <a
×
61
                        <?php
×
62
                        if ( $settings_tab === $slug ) :
×
63
                                ?>
64
                                aria-current="true" <?php endif; ?>href="?page=accessibility_checker_settings<?php echo esc_html( $query_var ); ?>" class="nav-tab
×
65
                                <?php
66
                                if ( $settings_tab === $slug ) :
×
67
                                        ?>
68
                                nav-tab-active<?php endif; ?>"><?php echo esc_html( $label ); ?></a>
×
69
                        <?php
70
                }
71
                echo '</nav>';
×
72
        }
73
        ?>
74

75
        <div class="tab-content">
×
76

77
                <?php if ( null === $settings_tab ) { ?>
×
78
                        <div class="edac-settings-general
×
79
                        <?php
×
80
                        if ( EDAC_KEY_VALID === false ) {
×
81
                                echo 'edac-show-pro-callout';}
×
82
                        ?>
83
                        ">
×
84
                                <form action="options.php" method="post">
×
85
                                        <?php
×
86
                                                settings_fields( 'edac_settings' );
×
87
                                                do_settings_sections( 'edac_settings' );
×
88
                                                submit_button();
×
89
                                        ?>
90
                                </form>
×
91
                                <?php if ( EDAC_KEY_VALID === false ) { ?>
×
92
                                        <div><?php include 'pro-callout.php'; ?></div>
×
93
                                <?php } ?>
94
                        </div>
×
95
                <?php } ?>
×
96

97
                <?php
×
98
                /**
99
                 * Fires after the settings tab content has maybe been displayed.
100
                 *
101
                 * This can be used to add content after a settings tab or to include
102
                 * a new settings tab content for custom tabs.
103
                 *
104
                 * @since 1.4.0
105
                 *
106
                 * @param string $settings_tab The current settings tab.
107
                 */
108
                do_action( 'edac_settings_tab_content', $settings_tab );
×
109
                ?>
110
        </div>
×
111

112
</div>
×
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