Skip to content

Commit

Permalink
Update data-options.php
Browse files Browse the repository at this point in the history
  • Loading branch information
iwillhappy1314 authored Aug 11, 2022
1 parent 6c44366 commit a07d099
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/data-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,9 @@ function wprs_data_posts($type = "post", $show_empty = true)
'posts_per_page' => '-1',
];

$loop = new \WP_Query($args);
$posts = get_posts($args);

$output = wp_list_pluck($loop->posts, 'post_title', 'ID');

wp_reset_postdata();
$output = wp_list_pluck($posts, 'post_title', 'ID');

$empty = [
'' => sprintf('%s', __('Select Content', 'wprs')),
Expand Down Expand Up @@ -360,4 +358,4 @@ function wprs_data_roles()
{
return wp_roles()->role_names;
}
}
}

0 comments on commit a07d099

Please sign in to comment.