Skip to content

Commit 908597c

Browse files
SteveJonesDevclaude
andcommitted
Refactor EDAC_KEY_VALID condition for clarity
Group the defined() and value checks with parentheses so the intent reads as a single "license key is not valid" unit, per code review suggestion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 77392c7 commit 908597c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

includes/classes/class-admin-toolbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private function get_default_menu_items(): array {
108108
];
109109

110110
// Add Get Pro submenu item (only show if pro is not installed or license is not valid).
111-
if ( ! defined( 'EDACP_VERSION' ) || ! defined( 'EDAC_KEY_VALID' ) || ! EDAC_KEY_VALID ) {
111+
if ( ! defined( 'EDACP_VERSION' ) || ! ( defined( 'EDAC_KEY_VALID' ) && EDAC_KEY_VALID ) ) {
112112
$pro_link = function_exists( 'edac_generate_link_type' )
113113
? edac_generate_link_type( [ 'utm_content' => 'admin-toolbar' ] )
114114
: 'https://equalizedigital.com/accessibility-checker/pricing/';

0 commit comments

Comments
 (0)