apply_filters( 'astra_addon_meta_args_post_by_condition', string $meta_args, WP_Term|WP_Post|null $q_obj, int|false $current_post_id )

Filters the SQL meta_args fragment used to match display conditions.


Description

SECURITY: $meta_args is interpolated directly into a wpdb::prepare() query string, so any values appended here MUST be escaped before use:

  • Integer IDs: absint( $value )
  • Strings in LIKE: esc_sql( $wpdb->esc_like( $value ) )
  • Strings in = / IN: Pass via prepare() %s placeholder instead of concatenation.

Parameters

$meta_args

(string) SQL fragment (AND/OR conditions, no leading AND/OR).

$q_obj

(WP_Term|WP_Post|null) Current queried object.

$current_post_id

(int|false) Current post ID, or false if not yet resolved.


Source

File: classes/modules/target-rule/class-astra-target-rules-fields.php

View on Trac



User Contributed Notes

You must log in before being able to contribute a note or feedback.