Articles on: Developers

Manage access to FlyingPress

The default access to the FlyingPress dashboard and features is limited to users with the roles of " administrator" and " editor ". However, the flying_press_allowed_roles filter can extend or restrict the allowed roles.

Add a new role:

add_filter('flying_press_allowed_roles', function ($roles) {
  $roles[] = 'subscriber';
  return $roles;
});


Allow only selected roles:

add_filter('flying_press_allowed_roles', function ($roles) {
  $roles = ['administrator'];
  return $roles;
});

Updated on: 23/11/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!