Advertisement
verygoodplugins

Untitled

Sep 16th, 2022
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1.                $all_items = get_posts(
  2.                     array(
  3.                         'fields'        => 'ids',
  4.                         'numberposts'   => -1,
  5.                         'post_type'     => 'consolidation',
  6.                         'post_status'   => 'publish',
  7.                         'post__not_in'  => $combined_status_posts,
  8.                     )
  9.                 );
  10.  
  11.                 // error_log('all items');
  12.                 // error_log( print_r($all_items, 1) );
  13.  
  14.                 if ( ! empty( $all_items ) ) {
  15.                     $flag_send_mail = false;
  16.                     $new_item_id = 0; // used in sending email.
  17.                     foreach ( $all_items as $item_id) {
  18.                         if( wp_fusion()->access->user_can_access( $item_id, $user_id ) ) {
  19.                             // error_log(' has access to ' . $item_id );
  20.                             array_push( $tobe, $item_id );
  21.                             $flag_send_mail = true;
  22.                             $new_item_id = $item_id;
  23.                         }
  24.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement