gatherpressqueryvars

This filter is documented in includes/query-loop.php

Auto-generated Example

add_filter(
   'gatherpress_query_vars',
    function(
        array $query_args,
        array $block_query,
        GatherPressboolean $inherited,
         = null
    ) {
        // Your code here.
        return $query_args;
    },
    10,
    3
);

Parameters

  • array $query_args Arguments to be passed to WP_Query.
  • array $block_query The query attribute retrieved from the block.
  • GatherPressboolean $inherited Whether the query is being inherited.

Returns

array $filtered_query_args Final arguments list.

Files

apply_filters(
				'gatherpress_query_vars',
				$query_args,
				$parsed_block['attrs']['query'],
				true,
			)
apply_filters(
			'gatherpress_query_vars',
			$query_args,
			$block_query,
			false
		)
apply_filters(
			'gatherpress_query_vars',
			$custom_args,
			$request->get_params(),
			false,
		)

← All Hooks