Wacław Jacek

Registering callbacks with variable-name WordPress hooks

Wacław Jacek

  • Registering callbacks with variable-name WordPress hooks

    Mar 22, 2022
    WordPress, WordPress patterns

    Some action and filter names used by WordPress and plugins have variable names like this one: If you only care about one specific value of $key or the value is fairly predictable, that’s pretty OK (although still has the drawback of reduced searchability). If, however, you would like to register a callback for any value…

© Wacław Jacek <waclawjacek@gmail.com>