gatherpress_pre_get_http_input

Last updated July 11, 2026, Version 0.34

Short-circuit filter for HTTP input retrieval during testing.

Allows tests to completely bypass filter_input() and provide their own values. Only available during unit tests for security. Return a non-null value to short-circuit.

Auto-generated Example

add_filter(
   'gatherpress_pre_get_http_input',
    function(
        string $pre_value = null,
        int $type,
        string $var_name
    ) {
        // Your code here.
        return null;
    },
    10,
    3
);

Parameters

  • string|null $pre_value Pre-value to return instead of using filter_input.
  • int $type Input type (INPUT_GET, INPUT_POST, etc.).
  • string $var_name Variable name being requested.

Files

apply_filters( 'gatherpress_pre_get_http_input', null, $type, $var_name )

← All Hooks