Condense logic in pages_write_access_options_hook()