__call : missing function', [ 'function_name' => $name, 'is_cli' => defined('WP_CLI') && WP_CLI ? 'yes' : 'no', // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 'current_script' => $_SERVER['SCRIPT_FILENAME'], 'backtrace' => $backtrace, // phpcs:ignore WordPress.Security.NonceVerification.Recommended 'request' => $_REQUEST ]); if ($name === 'blocksy_has_dynamic_css_in_frontend') { return false; } if ($name === 'blocksy_get_search_post_type') { return []; } // Functions whose default value is one of their arguments, keyed by // that argument's index. Other helpers are not handled like this and // the caller is supposed to handle the `null` return value. $functions_with_default = [ 'blocksy_get_theme_mod' => 1, ]; if (isset($functions_with_default[$name])) { $default_index = $functions_with_default[$name]; if (count($arguments) > $default_index) { return $arguments[$default_index]; } } // Every other function should handle the special case of the `null`. return self::$NON_EXISTING_FUNCTION; } }