Skip to content

Commit f403081

Browse files
authored
Merge pull request #1392 from equalizedigital/william/no-issue/remove-unused-section-in-metaviewportscalable-fix
Remove unused section in MetaViewportScalableFix
2 parents 2e40dad + 39cc25d commit f403081

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

includes/classes/Fixes/Fix/MetaViewportScalableFix.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,6 @@ public static function get_type(): string {
5353
* @return void
5454
*/
5555
public function register(): void {
56-
57-
add_filter(
58-
'edac_filter_fixes_settings_sections',
59-
function ( $sections ) {
60-
$sections['meta-viewport-scalable'] = [
61-
'title' => esc_html__( 'Ensure scalable viewport', 'accessibility-checker' ),
62-
'description' => esc_html__( 'Make sure that the viewport tag on the page allows scaling.', 'accessibility-checker' ),
63-
'callback' => [ $this, 'comment_search_label_section_callback' ],
64-
];
65-
66-
return $sections;
67-
}
68-
);
69-
7056
add_filter(
7157
'edac_filter_fixes_settings_fields',
7258
[ $this, 'get_fields_array' ],

tests/phpunit/includes/classes/Fixes/Fix/MetaViewportScalableFixTest.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ protected function get_fix_class_name(): string {
6464
return MetaViewportScalableFix::class;
6565
}
6666

67-
/**
68-
* Test that register adds settings sections.
69-
*
70-
* @return void
71-
*/
72-
public function test_register_adds_settings_sections() {
73-
$this->fix->register();
74-
75-
$sections = apply_filters( 'edac_filter_fixes_settings_sections', [] );
76-
$this->assertArrayHasKey( 'meta-viewport-scalable', $sections );
77-
}
78-
7967
/**
8068
* Test viewport manipulation functionality.
8169
*
@@ -84,7 +72,7 @@ public function test_register_adds_settings_sections() {
8472
public function test_viewport_tag_modification() {
8573
update_option( 'edac_fix_meta_viewport_scalable', true );
8674
$this->fix->run();
87-
75+
8876
// Test frontend data filter.
8977
$data = apply_filters( 'edac_filter_frontend_fixes_data', [] );
9078
$this->assertArrayHasKey( 'meta_viewport_scalable', $data );

0 commit comments

Comments
 (0)