Comments metabox integrates custom fields into comment edit screen:
Example URL: /wp-admin/comment.php?action=editcomment&c=1
wpify_custom_fields()->create_comment_metabox(
array(
'id' => 'test_comment_metabox',
'title' => 'Test Comment Metabox',
'tabs' => array(
'awesome' => 'Awesome Tab',
),
'items' => array(
'example_text' => array(
'type' => 'text',
'label' => 'Example text',
'required' => true,
'tab' => 'awesome',
),
'use_gallery' => array(
'type' => 'toggle',
'label' => 'Use gallery',
'title' => 'Show the gallery on the page',
'tab' => 'awesome',
),
'gallery' => array(
'type' => 'multi_attachment',
'label' => 'Gallery',
'tab' => 'awesome',
'conditions' => array(
array( 'field' => 'use_gallery', 'value' => true ),
),
),
),
/* other arguments */
),
);Meta box ID (used in the 'id' attribute for the meta box).
Title of the meta box.
Tabs used for the custom fields. See Tabs for more information.
List of the fields to be shown. See Field Types for available field types.
Data that should be set as the $args property of the box array (which is the second parameter passed to your
callback).
Meta key used to store the custom fields values. If meta key is not set, the individual fields will be stored as separate meta values.