function my_picu_list_collections_args( $args ) {
if ( isset( $current_user->user_email ) ) {
$args['meta_query'] = array(
'relation' => 'AND',
array(
'key' => '_picu_collection_email_address',
'value' => $current_user->user_email
)
);
}
return $args;
}
add_filter( 'picu_list_collections_args', 'my_picu_list_collections_args' );
Code language: PHP (php)