phpinfo.php 7.19 KB
<?php
 
phpinfo();

// $fields =
// array (
  
//     'location' => 
//     array (
//       'name' => 'Location',
//       'field_name' => 'location',
//       'type' => 'textfield',
//       'show_list' => 'off',
//       'extra' => 
//       array (
//         'show_label' => 'yes',
//         'multiline' => 'no',
//       ),
//     ),
//     'city' => 
//       array (
//         'name' => 'City',
//         'field_name' => 'city',
//         'type' => 'textfield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'multiline' => 'no',
//         ),
//     ),
//       'event_date' => 
//       array (
//         'name' => 'Event Start Date',
//         'field_name' => 'event_date',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Short',
//           'custom_date_format' => '',
//         ),
//       ),
//       'event_date_end' => 
//       array (
//         'name' => 'Event End Date (optional)',
//         'field_name' => 'event_date_end',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Short',
//           'custom_date_format' => '',
//         ),
//       ),
//       'time_start' => 
//       array (
//         'name' => 'Start Time',
//         'field_name' => 'time_start',
//         'type' => 'textfield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'multiline' => 'no',
//         ),
//       ),
//       'time_end' => 
//       array (
//         'name' => 'End Time',
//         'field_name' => 'time_end',
//         'type' => 'textfield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'multiline' => 'no',
//         ),
//       ),
//       'reg_open' => 
//       array (
//         'name' => 'Registration Opens',
//         'field_name' => 'reg_open',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Short',
//           'custom_date_format' => '',
//         ),
//       ),
//       'early_bird_deadline' => 
//       array (
//         'name' => 'Early Bird Deadline',
//         'field_name' => 'early_bird_deadline',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Medium',
//           'custom_date_format' => '',
//         ),
//       ),
//       'reg_deadline' => 
//       array (
//         'name' => 'Registration Deadline',
//         'field_name' => 'reg_deadline',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Medium',
//           'custom_date_format' => '',
//         ),
//       ),
//       'cancel_deadline' => 
//       array (
//         'name' => 'Cancellation Deadline',
//         'field_name' => 'cancel_deadline',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Medium',
//           'custom_date_format' => '',
//         ),
//       ),
//       'edit_deadline' => 
//       array (
//         'name' => 'Edit Deadline',
//         'field_name' => 'edit_deadline',
//         'type' => 'datefield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'date_format' => 'Medium',
//           'custom_date_format' => '',
//         ),
//     ),
//         'cost' => 
//         array (
//           'name' => 'Cost',
//           'field_name' => 'cost',
//           'type' => 'textfield',
//           'show_list' => 'off',
//           'extra' => 
//           array (
//             'show_label' => 'yes',
//             'multiline' => 'no',
//           ),
//         ),
//         'early_bird_discount' => 
//         array (
//           'name' => 'Early Bird ($) Discount ',
//           'field_name' => 'early_bird_discount',
//           'type' => 'textfield',
//           'show_list' => 'off',
//           'extra' => 
//           array (
//             'show_label' => 'yes',
//             'multiline' => 'no',
//           ),
//         ),
//         'student_member_discount' => 
//         array (
//           'name' => 'Student/Member ($) Discount',
//           'field_name' => 'student_member_discount',
//           'type' => 'textfield',
//           'show_list' => 'off',
//           'extra' => 
//           array (
//             'show_label' => 'yes',
//             'multiline' => 'no',
//           ),
//         ),
//         'worth_cehours' => 
//       array (
//         'name' => 'Worth CE Hours',
//         'field_name' => 'worth_cehours',
//         'type' => 'textfield',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//           'show_label' => 'yes',
//           'multiline' => 'no',
//         ),
//       ),
//       'is_archived_podcast' => 
//       array (
//         'name' => 'Include in Archived Podcast',
//         'field_name' => 'is_archived_podcast',
//         'type' => 'checkbox',
//         'show_list' => false,
//         'extra' => 
//         array (
//         ),
//       ),
//       'is_archived_webinar' => 
//       array (
//         'name' => 'Include in Archived Webinars',
//         'field_name' => 'is_archived_webinar',
//         'type' => 'checkbox',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//         ),
//       ),
//       'event_include_on_home_page' => 
//       array (
//         'name' => 'Include on Home Page',
//         'field_name' => 'event_include_on_home_page',
//         'type' => 'checkbox',
//         'show_list' => 'off',
//         'extra' => 
//         array (
//         ),
//       ),


    
// );


// $new_fields = array();
//   foreach($fields as $field){
//     $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
//     $charactersLength = strlen($characters);
//     $randomString = '';
//     for ($i = 0; $i < 13; $i++) {
//         $randomString .= $characters[rand(0, $charactersLength - 1)];
//     }  
//     error_log(print_r($field['name'], true));
//     array_push($new_fields, 

//     array(
//         'key' => 'field_'.$randomString,
//         'label' => $field['name'],
//         'name' => $field['field_name'],
//         'type' => $field['type'],
//         'instructions' => '',
//         'required' => 0,
//         'conditional_logic' => 0,
//         'wrapper' => 
//        (object) array(
//           'width' => '',
//           'class' => '',
//           'id' => '',
//        ),
//         'default_value' => '',
//         'placeholder' => '',
//         'prepend' => '',
//         'append' => '',
//         'maxlength' => '',
//      )

//     );
// }
// var_dump(json_encode($new_fields));