Contribution Date
Technology
Contribution Project
Contribution Details
Thanks :) Add this tag "PAReview: review bonus" to your project application, you are eligible for the high priority list.
extra_body_classes.install
:
- Use \Drupal::service('config.factory')->getEditable('extra_body_classes_date')->delete();
. See https://www.drupal.org/node/2183531, https://www.drupal.org/node/1809490
extra_body_classes.module
:
- I guess you checking whether current user is admin. You can do it using this:
global $user;
// Check whether $user has admin role.
Apart from the changes.. I am a bit confused about the scope of this module. What this module does is add some classes to body
tag of page markup - if the user is admin. Some other observations:
- The module description does not states this, you should consider specifying this condition. Also before doing this, consider this - a normal user would also like to add some class to the
body
markup. If the current page is admin related, I guess Drupal already provides this feature. - You are restricting the class to only date, what if the administrator wants it to be some other class.
Contribution Issue Link
Files count
0
Patches count
0