Skip to content

Conversation

@Enchiridion
Copy link

I was trying to use a meta_query to pull data for a select field however the original code to generate a unique cache key was failing when it came across a sub-array. I changed it so it'll work with any data types now.

  array(
    'id'          => 'post',
    'title'       => '',
    'type'        => 'select',
    'width'       => '100%',
    'data'        => 'post',
    'args'        => array(
      'post_type'      => 'travel_tip',
      'posts_per_page' => -1,
      'meta_query'     => array(
        array(
          'key'     => 'sponsored',
          'compare' => '=',
          'type'    => 'NUMERIC',
          'value'   => 1,
        ),
      ),
    ),
  ),
),```

@kprovance
Copy link
Member

Added manually w/credit given. Thanks! :)

@kprovance kprovance closed this Oct 27, 2018
kprovance added a commit that referenced this pull request Oct 27, 2018
kprovance added a commit that referenced this pull request Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants