Skip to content

Create a Generic control to display post meta data #3

@bobbingwide

Description

@bobbingwide

Once the post type and field has been chosen it should be a simple matter of obtaining the post meta field value(s) and displaying the results in the Field block.

This should replace the current code that naively:

  • displays the Post Type as an editable text field
  • displays the metaFieldValue as an editable text field
  • displays a paragraph showing the chosen field name.

Requirements

  • Output should be the same as the server side rendered code.
  • Display the field title as a label
  • Display a separator
  • Display the field value
  • It should be possible for the user to override the field title and separator values.

eg For the oik-plugins Description field ( _oikp_desc )

<div class="bw_metadata _oikp_desc">
<span class="label _oikp_desc">Description</span>
<span class="sep">: </span>
<span class="value">Displays a post meta data field</span>
</div>

The field value needs to be interpreted, based on the #field_type.
Note: The bw_maybe_register_post_meta() code needs to cater for fields with multiple values.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions