if ($adjust_for_fit) {
    ?>
				// $root.find(".ipsGroup:not([data-itemkey=visor]):not([data-itemkey=visor_curve])").each(function ()
				// {
					// var $this = $(this);
					// $this.hide(0);
					// $this.find(".IPS_SORTABLE_ITEM .IPS_CHECK_ITEM").attr("checked", "checked");
				// });
			<?php 
}
?>
		
		}
	
		var $root = $("#<?php 
_e(PostMetaManagerHelper::sanitize_css_selector($identifier));
?>
");
		
		$root.find(".IPS_CHECK_ALL").click(function (e)
		{
			e.preventDefault();
			var $this = $(this);
			var $ipsGroup = $this.parents(".IPS_GROUP").first();
			$ipsGroup.find(".IPS_SORTABLE_ITEM .IPS_CHECK_ITEM").attr("checked", "checked");
			ipsUpdateSort();
		});
		
		$root.find(".IPS_UNCHECK_ALL").click(function (e)
		{
			e.preventDefault();
            ?>
					</div>
				<?php 
        }
        ?>
			</div>
			<script type="text/javascript">
				jQuery(function ($)
				{
					$("#options-tabs").tabs().css("visibility", "visible");
					// if (adminpage == "post-new-php") $("#options-tabs").tabs("disable");
				});
			</script>
			-->
		<?php 
    }
}
add_action('add_meta_boxes', 'dummy_add_metabox_fields');
/* ***************************************************** */
// SAVE CUSTOM FIELDS
/* ***************************************************** */
function dummy_save_metabox_fields($post_id)
<?php

$preset_value = isset($preset_value) && !empty($preset_value) ? $preset_value : '';
$has_groups = isset($has_groups) && is_bool($has_groups) ? $has_groups : false;
$multiple = isset($multiple) && is_bool($multiple) ? $multiple : false;
if (empty($saved_value)) {
    $saved_value = $preset_value;
}
if (count($items) > 0) {
    PostMetaManagerHelper::generate_dropdown($items, $saved_value, $has_groups, $identifier, $multiple);
}
<?php

$readonly = isset($readonly) && is_bool($readonly) ? $readonly : false;
$width = isset($width) && !empty($width) ? $width : '100%';
$saved_value = PostMetaManagerHelper::esc_attr($saved_value);
?>
<textarea name="<?php 
_e($identifier);
?>
" id="<?php 
_e($identifier);
?>
" style="width: 100%; max-width: <?php 
_e($width);
?>
; <?php 
_e(isset($style) && !empty($style) ? $style : '');
?>
 min-height: 100px;" <?php 
_e(isset($readonly) && $readonly === true ? 'readonly="readonly"' : '');
?>
><?php 
_e($saved_value);
?>
</textarea>
    public function generate_dropdown($item_collection, $selected_value = '', $has_groups = false, $identifier = '', $multiple = false)
    {
        $selected_value_tmp = maybe_unserialize($selected_value);
        if (is_string($selected_value_tmp)) {
            $selected_value = array($selected_value);
        } else {
            $selected_value = $selected_value_tmp;
        }
        unset($selected_value_tmp);
        if (is_array($item_collection) && count($item_collection) > 0) {
            ?>
<select name="<?php 
            _e(!empty($identifier) ? $identifier : '');
            if ($multiple) {
                ?>
[]<?php 
            }
            ?>
" id="<?php 
            _e(!empty($identifier) ? $identifier : '');
            ?>
" <?php 
            if ($multiple) {
                ?>
multiple="multiple" style="width: 100%;"<?php 
            }
            ?>
><?php 
            if (!$has_groups) {
                foreach ($item_collection as $key => $value) {
                    // $selected = $selected_value == $value ? 'selected="selected"' : '';
                    ?>
<option value="<?php 
                    _e($value);
                    ?>
" <?php 
                    _e(PostMetaManagerHelper::is_selected($selected_value, $value));
                    ?>
><?php 
                    _e($key);
                    ?>
</option><?php 
                }
            } else {
                foreach ($item_collection as $group_name => $items) {
                    ?>
<optgroup label="<?php 
                    _e($group_name);
                    ?>
"><?php 
                    foreach ($items as $key => $value) {
                        // $selected = $selected_value == $value ? 'selected="selected"' : '';
                        ?>
<option value="<?php 
                        _e($value);
                        ?>
" <?php 
                        _e(PostMetaManagerHelper::is_selected($selected_value, $value));
                        ?>
><?php 
                        _e($key);
                        ?>
</option><?php 
                    }
                    ?>
</optgroup><?php 
                }
            }
            ?>
</select><?php 
        }
    }
<?php

$wpautop = isset($wpautop) && is_bool($wpautop) ? $wpautop : false;
$media_buttons = isset($media_buttons) && is_bool($media_buttons) ? $media_buttons : false;
$teeny = isset($teeny) && is_bool($teeny) ? $teeny : false;
$tinymce = isset($tinymce) && is_bool($tinymce) ? $tinymce : true;
$args = array('wpautop' => $wpautop, 'media_buttons' => $media_buttons, 'teeny' => $teeny, 'tinymce' => $tinymce);
wp_editor(PostMetaManagerHelper::sanitize_wp_editor_html(str_replace("\\'", "'", $saved_value)), $identifier, $args);
        ?>
">
								<?php 
        PostMetaManagerHelper::generate_dropdown($items, $saved_value);
        ?>
								<a href="#" class="MULTI_POST_PICKER_NESTED_REMOVE <?php 
        _e($field_data['key']);
        ?>
">- Remove</a>
							</div>	
							<?php 
        if (!empty($children)) {
            foreach ($children as $child) {
                $saved_value = $child->id;
                ?>
										<ol class="dd-list">
											<li class="dd-item dd3-item MULTI_POST_PICKER_NESTED_DROPDOWN <?php 
                _e($field_data['key']);
                ?>
" data-id="<?php 
                _e($saved_value);
                ?>
">
												<div class="dd-handle dd3-handle">Drag</div>
												<div class="dd3-content <?php 
                _e($field_data['key']);
                ?>
 <?php 
                if ($sortable) {
                    ?>
ui-state-default<?php