Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary question marks from checkbox labels #110

Merged
merged 2 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ function perflab_render_modules_page_field( $module_slug, $module_data, $module_
if ( $module_data['experimental'] ) {
printf(
/* translators: %s: module name */
__( 'Enable %s <strong>(experimental)</strong>?', 'performance-lab' ),
__( 'Enable %s <strong>(experimental)</strong>', 'performance-lab' ),
esc_html( $module_data['name'] )
);
} else {
printf(
/* translators: %s: module name */
__( 'Enable %s?', 'performance-lab' ),
__( 'Enable %s', 'performance-lab' ),
esc_html( $module_data['name'] )
);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/admin/load-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function test_perflab_render_modules_page_field() {
$output = ob_get_clean();
$this->assertContains( ' id="module_' . $module_slug . '_enabled"', $output );
$this->assertContains( ' name="' . PERFLAB_MODULES_SETTING . '[' . $module_slug . '][enabled]"', $output );
$this->assertContains( 'Enable ' . $module_data['name'] . '?', $output );
$this->assertContains( 'Enable ' . $module_data['name'], $output );
$this->assertNotContains( ' checked', $output );

// Assert correct 'id' and 'name' attributes, experimental label, and checked checkbox.
Expand All @@ -171,7 +171,7 @@ public function test_perflab_render_modules_page_field() {
$output = ob_get_clean();
$this->assertContains( ' id="module_' . $module_slug . '_enabled"', $output );
$this->assertContains( ' name="' . PERFLAB_MODULES_SETTING . '[' . $module_slug . '][enabled]"', $output );
$this->assertContains( 'Enable ' . $module_data['name'] . ' <strong>(experimental)</strong>?', $output );
$this->assertContains( 'Enable ' . $module_data['name'] . ' <strong>(experimental)</strong>', $output );
$this->assertContains( " checked='checked'", $output );
}

Expand Down