Recent

QueryclassPro only

Query

Integrates Contextual Related Posts with the core Query Loop block.

Namespace: WebberZone\Contextual_Related_Posts\Pro\Blocks
Since: 3.5.0
Source: includes/pro/blocks/class-query.php line 22

Methods

__construct()

Register widget with WordPress.

Line: 27

public function __construct(  );

update_query_loop_rest_params()

Updates the query vars for the Query Loop block in the block editor for the CRP Query block.

Since: 3.5.0
Line: 39

public function update_query_loop_rest_params(  );

update_rest_query()

Update the query vars for the REST API.

Since: 3.5.0
Line: 56

public function update_rest_query( $args, $request ): array;
Type Name Description
array $args The query arguments.
\WP_REST_Request $request The REST request.

Returns: array — The updated query arguments.

update_rest_collection_params()

Update the collection params for the REST API.

Since: 3.5.0
Line: 125

public function update_rest_collection_params( $query_params ): array;
Type Name Description
array $query_params The collection parameters.

Returns: array — The updated collection parameters.

update_block_query()

Apply this variation’s query arguments using one callback per request.

Since: 4.4.1
Line: 143

public function update_block_query( $query, $block ): array;
Type Name Description
array $query Query arguments.
\WP_Block $block Post template block with inherited query context.

Returns: array — Updated query arguments.

parse_meta_query()

Parses meta query data and prepares it for use in a \WP_Query.

Since: 3.5.0
Line: 204

public function parse_meta_query( $meta_query_data ): array;
Type Name Description
array $meta_query_data The meta query data to parse.

Returns: array — The parsed meta queries.

enqueue_block_editor_assets() static

Enqueue scripts and styles for the block editor.

Since: 3.5.0
Line: 283

static public function enqueue_block_editor_assets(  );

register_block_patterns()

Register block patterns.

Since: 3.5.0
Line: 308

public function register_block_patterns(  );