Skip to content

Move unical_client_init logic to unical_client_get #2

@kmcculloch

Description

@kmcculloch

All the logic in unical_client_init does is add js and css assets that are only needed by a single page, the calendar callback declared by hook_menu at "/calendar". hook_init implementations are called on every Drupal page load and are almost never necessary unless the module is in core or provides a heavy-duty utility.

@drogers98 Would you be open to a pull request to remove unical_client_init and move its logic to the "/calendar" callback at unical_client_get, or is there some particular reason to use hook_init that I haven't considered? (FWIW I understand that hook_init has been removed in Drupal 8 since that level of the bootstrap is now entirely handled by Symfony.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions