Open
Description
There is a filter in stream wp_stream_query_args
to pass query arguments. However passing record__in
property to the arguement does not work. Looking at the function query
if ( ! empty( $ins ) ) {
foreach ( $ins as $key => $value ) {
if ( empty( $value ) || ! is_array( $value ) ) {
continue;
}
$field = str_replace( array( 'record_', '__in' ), '', $key );
$field = empty( $field ) ? 'ID' : $field;
$type = is_numeric( array_shift( $value ) ) ? '%d' : '%s';
if ( ! empty( $value ) ) {
$format = '(' . join( ',', array_fill( 0, count( $value ), $type ) ) . ')';
$where .= $wpdb->prepare( " AND $wpdb->stream.%s IN {$format}", $field, $value ); // @codingStandardsIgnoreLine prepare okay
}
}
}
Specifically line $field = str_replace( array( 'record_', '__in' ), '', $key );
For key record__in
this would return __in
not empty as intended.
This is true for record__not_in
as well
Metadata
Metadata
Assignees
Labels
No labels