/** */ function save_post_meta($post_id) { if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; } if (!current_user_can('edit_posts')) { return; } if (!isset($id)) { $id = (int) $post_id; } if (isset($_POST['assignment-subtitle'])) { if (isset($_POST['assignment-subtitle']) && $_POST['assignment-subtitle'] != '') { update_post_meta($post_id, "assignment-subtitle", stripslashes($_POST['assignment-subtitle'])); } else { delete_post_meta($post_id, "assignment-subtitle"); } if (isset($_POST['assignment-maximum-mark']) && $_POST['assignment-maximum-mark'] != '') { update_post_meta($post_id, "assignment-maximum-mark", stripslashes($_POST['assignment-maximum-mark'])); } else { delete_post_meta($post_id, "assignment-maximum-mark"); } if (isset($_POST['assignment-enable-textarea']) && $_POST['assignment-enable-textarea'] != '') { update_post_meta($post_id, "assignment-enable-textarea", stripslashes($_POST['assignment-enable-textarea'])); } else { delete_post_meta($post_id, "assignment-enable-textarea"); } if (isset($_POST['assignment-enable-attachment']) && $_POST['assignment-enable-attachment'] != '') { update_post_meta($post_id, "assignment-enable-attachment", stripslashes($_POST['assignment-enable-attachment'])); } else { delete_post_meta($post_id, "assignment-enable-attachment"); } if (isset($_POST['assignment-attachment-type']) && $_POST['assignment-attachment-type'] != '') { update_post_meta($post_id, "assignment-attachment-type", $_POST['assignment-attachment-type']); } else { delete_post_meta($post_id, "assignment-attachment-type"); } if ($_POST['assignment-attachment-size'] > dt_get_upload_size()) { $attachment_size = 0; } else { $attachment_size = $_POST['assignment-attachment-size']; } if (isset($_POST['assignment-attachment-size']) && $_POST['assignment-attachment-size'] != '') { update_post_meta($post_id, "assignment-attachment-size", $attachment_size); } else { delete_post_meta($post_id, "assignment-attachment-size"); } if (isset($_POST['assignment-course-evaluation']) && $_POST['assignment-course-evaluation'] != '') { update_post_meta($post_id, "assignment-course-evaluation", $_POST['assignment-course-evaluation']); } else { delete_post_meta($post_id, "assignment-course-evaluation"); } if (isset($_POST['dt-assignment-course']) && $_POST['dt-assignment-course'] != '') { update_post_meta($post_id, "dt-assignment-course", $_POST['dt-assignment-course']); } else { delete_post_meta($post_id, "dt-assignment-course"); } } }
<div class="column one-sixth"> <label><?php _e('Attachment Size (MB)', 'dt_themes'); ?> </label> </div> <div class="column five-sixth last"> <?php $assignment_attachment_size = get_post_meta($post_id, "assignment-attachment-size", true); ?> <input id="assignment-attachment-size" name="assignment-attachment-size" class="large" type="number" value="<?php echo $assignment_attachment_size; ?> " style="width:10%;" /> <p class="note"> <?php _e('Set maximum size for attachment. Set it less than <strong>' . dt_get_upload_size() . 'MB</strong>. If you like to have more than <strong>' . dt_get_upload_size() . 'MB</strong>, than you have to make changes in php.ini file. ', 'dt_themes'); ?> </p> </div> </div> <!-- Attachment Size End --> <!-- Include In Course Evaluation --> <div class="custom-box"> <div class="column one-sixth"> <label><?php _e('Include In Course Evaluation', 'dt_themes'); ?> </label>