Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

We have some potentially expensive `get_posts` calls #234

Closed simonwheatley closed 9 years ago

simonwheatley commented 9 years ago

For example this one, which utilises post meta parameters:

$jobs = get_posts( array(
    'bbl_translate'  => false,
    'post_type'      => 'bbl_job',
    'post_status'    => $statuses,
    'meta_key'       => "bbl_job_{$type}",
    'meta_value'     => "{$name}|{$id}",
    'posts_per_page' => -1,
) );

A couple of options: