WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#15220 closed defect (bug) (worksforme)

Post custom fields and metakey starting with _

Reported by: arena Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

custom fields with metakey starting with _

should not be in the 'Edit post' page even if hidden !!!

Change History (10)

comment:1 arena4 years ago

btw, weird behavior when trying to insert a new custom field !!

comment:2 scribu4 years ago

  • Keywords reporter-feedback added

Please be a little more descriptive: steps to reproduce etc.

comment:3 arena4 years ago

try to insert a custom field in an existing post !!!

comment:4 dd324 years ago

Fields starting with an underscore are hidden fields. They're not displayed in the UI at all, such key names are usually used by WordPress Core and plugins to store information about the post which is not useful to the end user.

The current behavior is weird, in the sense that no feedback is given to the user that their field has been inserted.

Not allowing hidden fields from being set via the UI will remove a functionality some people may use (primarily developers)..

comment:5 scribu4 years ago

  • Component changed from General to Administration
  • Keywords needs-patch added; reporter-feedback removed

Now I get it.

Hidden custom fields = non-public custom fields.

Just like we don't allow users to create non-public post types from the UI, we shouldn't allow creation of non-public custom fields either.

For example, a sneaky user could cause trouble by setting a custom field he's not supposed to set.

comment:6 arena4 years ago

I also tried to insert a custom field and i have a very strange behavior.
Looks like the ajax stuff is broken

comment:7 arena4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

seems to be fixed in 3.0.1 beta 1

comment:8 ocean904 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:9 nacin4 years ago

  • Milestone 3.1 deleted
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:10 nacin4 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.