Skip to content

Commit d1db766

Browse files
Apply core/settings review feedback to the core/content ability
Re-applied on top of the current branch tip (a prior push of these changes was overwritten by a force-push). Mirrors the core/settings review fixes that apply here: - Memoize the exposed post types so the input schema and the permission/execute callbacks derive from a single walk of the registered post types. - Default the input schema to an empty object so the type:object default serializes as {}. - Use __() instead of esc_html__(), and @SInCE x.x.x per CONTRIBUTING.md. - Harden input/value handling (type guards, capability resolver, non-negative int helper, dynamic-property annotation) so the new code passes PHPStan at level max. The `content` ability-category fallback is kept on purpose: unlike `site`, `content` is a new category not present on the plugin's minimum WordPress (7.0).
1 parent bb5a310 commit d1db766

4 files changed

Lines changed: 169 additions & 120 deletions

File tree

0 commit comments

Comments
 (0)