Skip to content

Named vs anonymous function 🙂 #1

@khanrn

Description

@khanrn

Can we transfer anonymous functions to a named one? 🤔 Naming this function will help in future for hooking this same function to any other hook. Also naming it would help un-hooking this function if needed. And as we are using namespace then naming the function Will not create any issue as well. Therefore I'd say we better use a named function rather than an anonymous one. 🙂

Example:

https://github.com/DekodeInteraktiv/gravityforms-uploads-azure/blob/d3762751ef78eede4296fa7cf9ff0bf44fec72cd/gravityforms-uploads-azure.php#L25

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