Skip to content

Commit

Permalink
Issue #6342: Add CKEditor module version telemetry.
Browse files Browse the repository at this point in the history
  • Loading branch information
quicksketch committed Jan 2, 2024
1 parent 15c009c commit 418c26e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/modules/telemetry/telemetry.telemetry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ function telemetry_telemetry_info() {
'description' => t('Is this Backdrop installation set up as a multisite?'),
'project' => 'backdrop',
);
$info['ckeditor_module_version'] = array(
'label' => t('CKEditor Module Version'),
'description' => t('The CKEditor module version that your site uses (either 4, 5, both, or neither).'),
'project' => 'backdrop',
);
return $info;
}

Expand Down Expand Up @@ -69,5 +74,20 @@ function telemetry_telemetry_data($key) {
return backdrop_get_profile();
case 'multisite':
return conf_path() == '.' ? 'No' : 'Yes';
case 'ckeditor_module_version':
$ckeditor4 = module_exists('ckeditor');
$ckeditor5 = module_exists('ckeditor5');
if ($ckeditor4 && $ckeditor5) {
return 'Both CKEditor 4 and 5';
}
elseif ($ckeditor4) {
return 'CKEditor 4';
}
elseif ($ckeditor5) {
return 'CKEditor 5';
}
else {
return 'Neither';
}
}
}

0 comments on commit 418c26e

Please sign in to comment.