Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $all_items = get_posts(
- array(
- 'fields' => 'ids',
- 'numberposts' => -1,
- 'post_type' => 'consolidation',
- 'post_status' => 'publish',
- 'post__not_in' => $combined_status_posts,
- )
- );
- // error_log('all items');
- // error_log( print_r($all_items, 1) );
- if ( ! empty( $all_items ) ) {
- $flag_send_mail = false;
- $new_item_id = 0; // used in sending email.
- foreach ( $all_items as $item_id) {
- if( wp_fusion()->access->user_can_access( $item_id, $user_id ) ) {
- // error_log(' has access to ' . $item_id );
- array_push( $tobe, $item_id );
- $flag_send_mail = true;
- $new_item_id = $item_id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement