Opened 6 years ago
Last modified 6 years ago
#44659 new feature request
Display custom fields
Reported by: | iantresman | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
There should be an option to display custom field data without having to acquire a plugin, rely on a theme supporting it, or hack a theme; surely this can be achieved in core, programmatically. Options could/should include (in order of importance):
Global Admin settings to:
- Enable/disable the display of raw custom field data in a post
- Option to rewrite outputted field data (add wrapper) that may include HTML
- Specify where in a post, the field is output, depending of available hooks
- Specify optional regex validation
- Specify optional data regex replacement on output
- Specify which options above, are returned via the API to other plugins
- Specify optional CSS for any classes and IDs added in (2) above.
- Specify whether a custom field should be a requirement/optional
- Specify where the custom field box should appear on the post edit page
- Option to rewrite outputted field data using PHP snippet
Even implementing only items 1-3 would provide a powerful and flexible way to manage meta data, and provide WP v5 with a significant improvement over earlier versions.
Change History (6)
#4
@
6 years ago
A UI sounds like plugin territorry to me as it wouldn‘t really align with the WordPress philosophy: https://wordpress.org/about/philosophy/
#5
@
6 years ago
It depends which part of the Wordpress Philosophy you read. I think the following extracts are relevant:
Great software should work with little configuration and setup
Design for the Majority: Many end users of WordPress are non-technically minded.
I think most people don't use custom fields, because while they are trivial to enter the data, it is difficult to display it. I think this suggestion, with the ability to rewrite custom field data make it very useful, flexible and powerful.
Hey there
This sounds exactly like the Fields API project to me :-)
See https://make.wordpress.org/core/tag/fields-api/ and https://github.com/sc0ttkclark/wordpress-fields-api, as well as the #core-fields Slack channel.