Summary
In Nested Pages settings, the Bulk Edit Roles checkboxes for a post type cannot be persisted as fully unchecked. If all roles are unchecked and saved, the page reloads with all roles checked again.
Environment
WordPress multisite
Nested Pages settings URL:
wp-admin/options-general.php?page=nested-pages-settings&tab=posttypes
Reproduced on custom post types and plugin-generated post types
Steps to Reproduce
- Go to Settings > Nested Pages > Post Types.
- Expand any post type row.
- In Bulk Edit Roles, check all role checkboxes.
- Click Save Changes.
- In Bulk Edit Roles, uncheck all role checkboxes.
- Click Save Changes.
Expected Behavior
All roles remain unchecked (or the saved state clearly reflects “no roles allowed for bulk edit”).
Actual Behavior
All roles reappear checked again after save.
Likely Cause
bulk_edit_roles[] is a checkbox array. When all are unchecked, the browser submits no key for that field.
Current role check rendering appears to treat missing/empty bulk_edit_roles as “allowed for all roles,” so all boxes are shown checked on reload.
Impact
Cannot use UI to persist “disable bulk edit for all roles” per post type.
Settings appear to revert, causing admin confusion and policy mismatch.
Suggested Fix
One of:
- Save an explicit empty array/value for bulk_edit_roles when all are unchecked, and interpret it as “none allowed,” or
- Add an explicit “Allow all roles” toggle and disambiguate empty/missing state from an intentional selection.
Summary
In Nested Pages settings, the Bulk Edit Roles checkboxes for a post type cannot be persisted as fully unchecked. If all roles are unchecked and saved, the page reloads with all roles checked again.
Environment
WordPress multisite
Nested Pages settings URL:
wp-admin/options-general.php?page=nested-pages-settings&tab=posttypes
Reproduced on custom post types and plugin-generated post types
Steps to Reproduce
Expected Behavior
All roles remain unchecked (or the saved state clearly reflects “no roles allowed for bulk edit”).
Actual Behavior
All roles reappear checked again after save.
Likely Cause
bulk_edit_roles[] is a checkbox array. When all are unchecked, the browser submits no key for that field.
Current role check rendering appears to treat missing/empty bulk_edit_roles as “allowed for all roles,” so all boxes are shown checked on reload.
Impact
Cannot use UI to persist “disable bulk edit for all roles” per post type.
Settings appear to revert, causing admin confusion and policy mismatch.
Suggested Fix
One of: