Path : /home/vishqocm/middleeastoday.com/wp-content/plugins/codestar-framework/samples/
File Upload :
Current File : /home/vishqocm/middleeastoday.com/wp-content/plugins/codestar-framework/samples/comment-options.php

<?php if ( ! defined( 'ABSPATH' )  ) { die; } // Cannot access directly.

//
// Comment Metabox
// Set a unique slug-like ID
//
$prefix_comment = '_prefix_comment';

//
// Create a comment metabox
//
CSF::createCommentMetabox( $prefix_comment, array(
  'title' => 'Custom Comment Options',
) );

//
// Create a section
//
CSF::createSection( $prefix_comment, array(

  'fields' => array(

    //
    // A text field
    //
    array(
      'id'    => 'opt-text',
      'type'  => 'text',
      'title' => 'Text',
    ),

    array(
      'id'    => 'opt-textarea',
      'type'  => 'textarea',
      'title' => 'Textarea',
      'help'  => 'The help text of the field.',
    ),

    array(
      'id'    => 'opt-upload',
      'type'  => 'upload',
      'title' => 'Upload',
    ),

    array(
      'id'    => 'opt-switcher',
      'type'  => 'switcher',
      'title' => 'Switcher',
      'label' => 'The label text of the switcher.',
    ),

    array(
      'id'    => 'opt-color',
      'type'  => 'color',
      'title' => 'Color',
    ),

    array(
      'id'    => 'opt-checkbox',
      'type'  => 'checkbox',
      'title' => 'Checkbox',
      'label' => 'The label text of the checkbox.',
    ),

    array(
      'id'      => 'opt-radio',
      'type'    => 'radio',
      'title'   => 'Radio',
      'options' => array(
        'yes'   => 'Yes, Please.',
        'no'    => 'No, Thank you.',
      ),
      'default' => 'yes',
    ),

    array(
      'id'          => 'opt-select',
      'type'        => 'select',
      'title'       => 'Select',
      'placeholder' => 'Select an option',
      'options'     => array(
        'opt-1'     => 'Option 1',
        'opt-2'     => 'Option 2',
        'opt-3'     => 'Option 3',
      ),
    ),

  )
) );