Add-ons development: get_posts () does not work when accessing with a custom user role

I have run into something in which it seems that I can not find any documentation about the function & # 39; get_posts & # 39; of WP.

I have a web application that has several custom post-types and multiple custom user roles. All are necessary for a variety of reasons. Different types of users within the organization need to see different things and be able to edit different aspects of the types of personalized emails.

In custom post-type editing screens, I have metaboxes that show the data provided by the user, however, users with backend access, using different personalized user roles, must be able to correct or modify the data that users have provided or manually create an entry.

I use the following method & # 39; get_posts () & # 39; to generate drop-down menus based on inputs from other custom post-types:


It works as one would expect. You visit the editing screen and the drop-down menu is filled in with "Sessions" whose "status" is set to "true". This same method get_posts () also works in the front-end, with or without session.

However, when visiting the edit.php screen for this type of publication using one of the custom user roles that I created, this drop-down menu and others that use the same method, all do not return results.

Here is an example of one of the custom user role capabilities:

$ result = add_role (
& # 39; mwss_sitesuper & # 39 ;, __ (& # 39; Site Supervisor & # 39;),
training(
// WordPress capabilities
& # 39; level_9 & # 39; => false,
& # 39; level_8 & # 39; => true,
& # 39; level_7 & # 39; => true,
& # 39; level_6 & # 39; => true,
& # 39; level_5 & # 39; => true,
& # 39; level_4 & # 39; => true,
& # 39; level_3 & # 39; => true,
& # 39; level_2 & # 39; => true,
& # 39; level_1 & # 39; => true,
& # 39; level_0 & # 39; => true,
& # 39; read & # 39; => true,
& # 39; read_private_pages & # 39; => true,
& # 39; read_private_posts & # 39; => true,
& # 39; create_posts & # 39; => true,
& # 39; publish_posts & # 39; => true,
& # 39; edit_users & # 39; => true,
& # 39; edit_posts & # 39; => true,
& # 39; edit_pages & # 39; => true,
& # 39; edit_published_posts & # 39; => true,
& # 39; edit_published_pages & # 39; => true,
& # 39; edit_private_pages & # 39; => true,
& # 39; edit_private_posts & # 39; => true,
& # 39; edit_others_posts & # 39; => true,
& # 39; edit_others_pages & # 39; => true,
& # 39; publish_posts & # 39; => true,
& # 39; publish_pages & # 39; => true,
& # 39; delete_posts & # 39; => true,
& # 39; delete_pages & # 39; => true,
& # 39; delete_private_pages & # 39; => true,
& # 39; delete_private_posts & # 39; delete_private_posts & # 39; => true,
& # 39; delete_published_pages & # 39; => true,
& # 39; delete_published_posts & # 39; delete_published_posts & # 39; => true,
& # 39; delete_others_posts & # 39; => true,
& # 39; delete_others_pages & # 39; => true,
& # 39; manage_options & # 39; => false,
& # 39; manage_categories & # 39; => false,
& # 39; manage_links & # 39; => false,
& # 39; moderate_comments & # 39; => true,
& # 39; unffiltered_html & # 39; => false,
& # 39; upload_files & # 39; => false,
& # 39; export & # 39; => false,
& # 39; import & # 39; => false,
& # 39; list_users & # 39; => true,
& # 39; edit_themes & # 39; => false,
& # 39; install_plugins & # 39; => false,
& # 39; update_plugin & # 39; => false,
& # 39; update_core & # 39; => false
)
);

Any idea why get_posts () only works with the roles of Administrator or Editor in the backend, but works for all user roles in the front-end?