本文整理汇总了PHP中NHP_Options::_field_input方法的典型用法代码示例。如果您正苦于以下问题:PHP NHP_Options::_field_input方法的具体用法?PHP NHP_Options::_field_input怎么用?PHP NHP_Options::_field_input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NHP_Options
的用法示例。
在下文中一共展示了NHP_Options::_field_input方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
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
}
}
}
示例2: array
<?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);