Skip to content

Invalid namespace in "Parameter #X $param of function X expects callable()" #1986

@szepeviktor

Description

@szepeviktor
Parameter #2 $function_to_add of function add_action expects callable(): mixed, 'F4\\Hooks::add…' given.

While the namespace is really F4\MT\Core

namespace F4\MT\Core;

class Hooks {

    public static function init() {
        add_action('customize_controls_print_scripts', __NAMESPACE__ . '\\Hooks::add_custom_js');

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions