function inner_custom_box($post) { wp_enqueue_style(array('jquery-ui-datepicker-custom', 'admin-custom-styles')); wp_enqueue_script(array('jquery-ui-datepicker', 'jquery-select2')); $t =& $GLOBALS['_sh_base']; $post_type = sh_set($post, 'post_type'); $settings = get_post_meta(sh_set($post, 'ID'), '_bistro_' . $post_type . '_settings', true); //$fields = $t->_fields_enqueue(sh_set($this->_fields, $post_type), $settings); //printr($fields); $fields = sh_set($this->_fields, $post_type); //printr($fields); $nph = new NHP_Options(); $nph->args['opt_name'] = $post_type; //printr($nph); if ($fields && is_array($fields)) { ?> <script type="text/javascript"> jQuery(document).ready(function($) { $('.fields_set select').select2(); if( $('#start_date') ){ $('#start_date, #end_date').datepicker(); } }); </script> <?php foreach ($fields as $f) { ?> <div class="fields_set" > <label><strong><?php echo sh_set($f, 'title'); ?> </strong></label> <div class="field"> <?php echo $nph->_field_input($f, sh_set($settings, sh_set($f, 'id'))); ?> </div> </div> <?php } } }
<?php $temp = array(); foreach ($value as $k => $f) { //printr($f); ?> <?php $settings = array(); ?> <div class="fields_set" > <label><strong><?php echo sh_set($f, 'title'); ?> </strong></label> <div class="field"> <?php echo $nph->_field_input($f, sh_set($settings, sh_set($f, 'id'))); ?> </div> </div> <?php } echo '<hr/>'; } else { echo __('No parameters avaialble ', SH_NAME); } ?> <input type="button" class="btn_insert btn btn-large" data-name="<?php echo $key; ?> " value="<?php _e('Insert Shortcode', SH_NAME);