Description
Implement "oik_shortcode_atts" for meta_compare=betweenThis could be a separate filter function
Usage
$updated = oik_fields_shortcode_atts_between( $atts, $content, $tag );Parameters
- $atts
- ( array ) required – shortcode parameters
- $content
- ( string ) required –
- $tag
- ( string ) required –
Returns
updated atts arraySource
File name: oik-fields/oik-fields.phpLines:
1 to 15 of 15
function oik_fields_shortcode_atts_between( $atts, $content, $tag ) { $meta_key = bw_array_get( $atts, "meta_key", null ); $meta_value = bw_array_get( $atts, "meta_value", null ); $and = bw_array_get( $atts, "and", null ); if ( $meta_key && $meta_value && $and ) { $meta_query = array(); $meta_query[] = array( "key" => $meta_key , "value" => array( $meta_value, $and ) , "compare" => "BETWEEN" ); $atts['meta_query'] = $meta_query; } return( $atts ); }View on GitHub
Invoked by
Calls
1 to 1 of 1
