Skip to content

[standard] Commented unused code snippets are all over the template files we need to make it clean #1377

@fusionx1

Description

@fusionx1

Hi im Paul from Drupal Pilipinas and i really want to contribute to this wonderful project that helps and will help thousands of drupal developer around the world.

Motivation:

As i was doing a cursory check on the some of the files ive noticed that there are lots of code snippets that are not being used, which i think it should be removed if we are not using it, especially inside the twig file. I'm really a strong believer of drupal coding standard big or small we should embrace it.

Solution:

I know those commented code snippets were there for a reason, i recommend to remove it in the template file and put it somewhere probably a seperte file that inventory all the functions and if time comes we can retrieve it from that file.

Heres a format:

snippet 1:

//https://github.com/hechoendrupal/DrupalConsole/blob/master/templates/theme/theme.twig
//line 54 
//hook_theme_suggestions_node_alter

/*$node = $variables['elements']['#node'];

  if ($variables['elements']['#view_mode'] == "full") {

  }*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions