Automattic / Automattic/custom-metadata

Flesh out restricted field and group names

Open
#152 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
190
Forks
46
Avg merge
46m
Merged PRs (30d)
15

Description

Split out from the coding-standards cleanup (#147), which removed commented-out stubs and their `// TODO: Build this out` notes so their intent could be tracked here.

`is_restricted_group()` is currently a stub that always returns `false`, and `is_restricted_field()` only checks a small hardcoded list (`post_title`, `post_author` for posts; empty for pages and users).

**Intended work**
- `is_restricted_group()`: block registering groups whose slugs collide with built-in metaboxes (e.g. title, custom-fields, revisions, author).
- `is_restricted_field()`: expand the restricted-field lists per object type as needed.

These checks are intended to feed the registration validation work in #153.

Contributor guide

Open the contributing guide

Research direction

Start at the definitions of is_restricted_group() and is_restricted_field(), then review the built-in metabox slugs and existing restricted-field lists described in this issue. Confirm the expected object types and registration-validation usage in #153; done means group collisions are blocked and restricted fields are covered for the relevant object types.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.