本文整理汇总了PHP中NHP_Options类的典型用法代码示例。如果您正苦于以下问题:PHP NHP_Options类的具体用法?PHP NHP_Options怎么用?PHP NHP_Options使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NHP_Options类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent = '')
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->return_field = isset($this->field['return']) && $this->field['return'] == 'id' ? 'id' : 'url';
}
开发者ID:akochnov,项目名称:fts,代码行数:14,代码来源:field_upload.php
示例2: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
//$this->render();
}
开发者ID:kulgee001,项目名称:VoiceOfADF,代码行数:14,代码来源:field_oneclick.php
示例3:
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field, $value, $current)
{
parent::__construct();
$this->field = $field;
$this->value = $value;
$this->current = $current;
$this->validate();
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:15,代码来源:validation_html_custom.php
示例4: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0.1
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
//$this->render();
$this->icons = array('Miscellaneous Icons' => array('adjust', 'anchor', 'archive', 'arrows', 'arrows-h', 'arrows-v', 'asterisk', 'ban', 'bar-chart-o', 'barcode', 'bars', 'beer', 'bell', 'bell-o', 'bolt', 'book', 'bookmark', 'bookmark-o', 'briefcase', 'bug', 'building-o', 'bullhorn', 'bullseye', 'calendar', 'calendar-o', 'camera', 'camera-retro', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'certificate', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'circle', 'circle-o', 'clock-o', 'cloud', 'cloud-download', 'cloud-upload', 'code', 'code-fork', 'coffee', 'cog', 'cogs', 'comment', 'comment-o', 'comments', 'comments-o', 'compass', 'credit-card', 'crop', 'crosshairs', 'cutlery', 'desktop', 'dot-circle-o', 'download', 'ellipsis-h', 'ellipsis-v', 'envelope', 'envelope-o', 'eraser', 'exchange', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'external-link', 'external-link-square', 'eye', 'eye-slash', 'female', 'fighter-jet', 'film', 'filter', 'fire', 'fire-extinguisher', 'flag', 'flag-checkered', 'flag-o', 'flask', 'folder', 'folder-o', 'folder-open', 'folder-open-o', 'frown-o', 'gamepad', 'gavel', 'gift', 'glass', 'globe', 'hdd-o', 'headphones', 'heart', 'heart-o', 'home', 'inbox', 'info', 'info-circle', 'key', 'keyboard-o', 'laptop', 'leaf', 'lemon-o', 'level-down', 'level-up', 'lightbulb-o', 'location-arrow', 'lock', 'magic', 'magnet', 'mail-reply-all', 'male', 'map-marker', 'meh-o', 'microphone', 'microphone-slash', 'minus', 'minus-circle', 'minus-square', 'minus-square-o', 'mobile', 'money', 'moon-o', 'music', 'pencil', 'pencil-square', 'pencil-square-o', 'phone', 'phone-square', 'picture-o', 'plane', 'plus', 'plus-circle', 'plus-square', 'plus-square-o', 'power-off', 'print', 'puzzle-piece', 'qrcode', 'question', 'question-circle', 'quote-left', 'quote-right', 'random', 'refresh', 'reply', 'reply-all', 'retweet', 'road', 'rocket', 'rss', 'rss-square', 'search', 'search-minus', 'search-plus', 'share', 'share-square', 'share-square-o', 'shield', 'shopping-cart', 'sign-in', 'sign-out', 'signal', 'sitemap', 'smile-o', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-amount-asc', 'sort-amount-desc', 'sort-asc', 'sort-desc', 'sort-numeric-asc', 'sort-numeric-desc', 'spinner', 'square', 'square-o', 'star', 'star-half', 'star-half-o', 'star-o', 'subscript', 'suitcase', 'sun-o', 'superscript', 'tablet', 'tachometer', 'tag', 'tags', 'tasks', 'terminal', 'thumb-tack', 'thumbs-down', 'thumbs-o-down', 'thumbs-o-up', 'thumbs-up', 'ticket', 'times', 'times-circle', 'times-circle-o', 'tint', 'trash-o', 'trophy', 'truck', 'umbrella', 'unlock', 'unlock-alt', 'upload', 'user', 'users', 'video-camera', 'volume-down', 'volume-off', 'volume-up', 'wheelchair', 'wrench'), 'Form Control Icons' => array('check-square', 'check-square-o', 'circle', 'circle-o', 'dot-circle-o', 'minus-square', 'minus-square-o', 'plus-square', 'plus-square-o', 'square', 'square-o'), 'Currency Icons' => array('btc', 'eur', 'gbp', 'inr', 'jpy', 'krw', 'money', 'rub', 'try', 'usd'), 'Text Editor Icons' => array('align-center', 'align-justify', 'align-left', 'align-right', 'bold', 'chain-broken', 'clipboard', 'columns', 'eraser', 'file', 'file-o', 'file-text', 'file-text-o', 'files-o', 'floppy-o', 'font', 'indent', 'italic', 'link', 'list', 'list-alt', 'list-ol', 'list-ul', 'outdent', 'paperclip', 'repeat', 'scissors', 'strikethrough', 'table', 'text-height', 'text-width', 'th', 'th-large', 'th-list', 'underline', 'undo'), 'Directional Icons' => array('angle-double-down', 'angle-double-left', 'angle-double-right', 'angle-double-up', 'angle-down', 'angle-left', 'angle-right', 'angle-up', 'arrow-circle-down', 'arrow-circle-left', 'arrow-circle-o-down', 'arrow-circle-o-left', 'arrow-circle-o-right', 'arrow-circle-o-up', 'arrow-circle-right', 'arrow-circle-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows', 'arrows-alt', 'arrows-h', 'arrows-v', 'caret-down', 'caret-left', 'caret-right', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'caret-up', 'chevron-circle-down', 'chevron-circle-left', 'chevron-circle-right', 'chevron-circle-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'hand-o-down', 'hand-o-left', 'hand-o-right', 'hand-o-up', 'long-arrow-down', 'long-arrow-left', 'long-arrow-right', 'long-arrow-up'), 'Video Player Icons' => array('arrows-alt', 'backward', 'compress', 'eject', 'expand', 'fast-backward', 'fast-forward', 'forward', 'pause', 'play', 'play-circle', 'play-circle-o', 'step-backward', 'step-forward', 'stop', 'youtube-play'), 'Brand Icons' => array('adn', 'android', 'apple', 'bitbucket', 'bitbucket-square', 'btc', 'css3', 'dribbble', 'dropbox', 'facebook', 'facebook-square', 'flickr', 'foursquare', 'github', 'github-alt', 'github-square', 'gittip', 'google-plus', 'google-plus-square', 'html5', 'instagram', 'linkedin', 'linkedin-square', 'linux', 'maxcdn', 'pagelines', 'pinterest', 'pinterest-square', 'renren', 'skype', 'stack-exchange', 'stack-overflow', 'trello', 'tumblr', 'tumblr-square', 'twitter', 'twitter-square', 'vimeo-square', 'vk', 'weibo', 'windows', 'xing', 'xing-square', 'youtube', 'youtube-play', 'youtube-square'), 'Medical Icons' => array('ambulance', 'h-square', 'hospital-o', 'medkit', 'plus-square', 'stethoscope', 'user-md', 'wheelchair'));
}
开发者ID:ShehabSunny,项目名称:ProductZap,代码行数:15,代码来源:field_icon_select.php
示例5: isset
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0.1
*/
function __construct($field, $value, $current)
{
parent::__construct();
$this->field = $field;
$this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('No tienes que introducir ningún carácter especial en este campo, se han eliminado todos los caracteres especiales.', 'nhp-opts');
$this->value = $value;
$this->current = $current;
$this->validate();
}
开发者ID:podemosfrance,项目名称:podemosfrance.info,代码行数:16,代码来源:validation_no_special_chars.php
示例6: isset
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field, $value, $current)
{
parent::__construct();
$this->field = $field;
$this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('You must not enter any HTML in this field, all HTML tags have been removed.', 'nhp-opts');
$this->value = $value;
$this->current = $current;
$this->validate();
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:16,代码来源:validation_no_html.php
示例7: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct();
$this->field = $field;
$this->field['msg'] = __('You must provide a valid email for this option.', 'nhp-opts');
$this->value = $value;
$this->current = $parent;
$this->validate();
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:16,代码来源:validation_editor.php
示例8: inner_custom_box
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
}
}
}
开发者ID:estrategasdigitales,项目名称:kanet,代码行数:44,代码来源:meta_boxes.php
示例9: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
#add_action('admin_enqueue_scripts', array($this, '_admin_enqueue_scripts')); //note: this not work.
$this->_admin_enqueue_scripts();
//directly call while render field
//$this->render();
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:17,代码来源:field_hw_ckeditor.php
示例10: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
if (empty($this->field['std'])) {
$this->field['std'] = '';
}
$this->value = $value;
//$this->render();
}
开发者ID:ShehabSunny,项目名称:ProductZap,代码行数:17,代码来源:field_color.php
示例11: __construct
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
public function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->aDefaultKeys = array('data_base_field' => '', 'show_root_field' => true);
$aField = $this->field;
//$this->field;
$this->prepare_actions();
//actions
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:18,代码来源:field_hw_table_fields.php
示例12: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->field['fonts'] = array();
$fonts = get_transient('nhp-opts-google-webfonts');
if (!is_array(json_decode($fonts))) {
$fonts = wp_remote_retrieve_body(wp_remote_get('https://www.googleapis.com/webfonts/v1/webfonts?key=' . $this->args['google_api_key']));
set_transient('nhp-opts-google-webfonts', $fonts, 60 * 60 * 24);
}
$this->field['fonts'] = json_decode($fonts);
}
开发者ID:kulgee001,项目名称:VoiceOfADF,代码行数:20,代码来源:field_google_webfonts.php
示例13: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
//$this->render();
//setup metaslider themes
if (class_exists('HW_SKIN')) {
$this->skin = new HW_SKIN($this, plugin_dir_path(__FILE__), 'hw_scroll2top_skins', 'hw-scroll2top.php', 'skins');
$this->skin->plugin_url = plugins_url('', __FILE__);
$this->skin->files_skin_folder = 'images';
//set skin folder files
$this->skin->enable_external_callback = false;
//$this->skin->getSavedCallbacksJs_data(array($this,'get_callbacks_data'));
//$this->skin->registerExternalStorage_JSCallback(array($this, 'save_callback_event'));
$this->skin->set_dropdown_ddslick_setting(array('width' => '350'));
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:25,代码来源:field_hw_scroll2top.php
示例14: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->aDefaultKeys = array('enable_external_callback' => false, 'set_dropdown_ddslick_setting' => array('width' => '350'), 'DROPDOWN_DDSSLICK_THEME' => true, 'apply_current_path' => plugin_dir_path(__FILE__), 'plugin_url' => plugins_url('', __FILE__));
//$this->render();
$aField = $this->field;
//$this->field;
/**
* parse hw_skin params
*/
//group
$group = $this->get_field_value('group');
$skins_folder = $this->get_field_value('skins_folder');
$external_skins_folder = $this->get_field_value('external_skins_folder');
$skin_filename = $this->get_field_value('skin_filename');
$apply_current_path = $this->get_field_value('apply_current_path');
//path or url
$plugin_url = $this->get_field_value('plugin_url');
$files_skin_folder = $this->get_field_value('files_skin_folder');
if (!$files_skin_folder) {
return;
}
//required
$enable_external_callback = $this->get_field_value('enable_external_callback');
$set_dropdown_ddslick_setting = $this->get_field_value('set_dropdown_ddslick_setting');
//setup metaslider themes
if (class_exists('HW_SKIN')) {
//_print($apply_current_path.','.$external_skins_folder.','.$skin_filename);
$this->skin = new HW_SKIN($this, $apply_current_path, $external_skins_folder, $skin_filename, $skins_folder);
$this->skin->plugin_url = $plugin_url;
$this->skin->files_skin_folder = $files_skin_folder;
//set skin folder files
$this->skin->enable_external_callback = $enable_external_callback;
if ($group) {
$this->skin->set_group($group);
}
//$this->skin->getSavedCallbacksJs_data(array($this,'get_callbacks_data'));
//$this->skin->registerExternalStorage_JSCallback(array($this, 'save_callback_event'));
$this->skin->set_dropdown_ddslick_setting($set_dropdown_ddslick_setting);
//add_filter('hw_skins_data', array($this, '_hw_skins_data'),10,2);
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:51,代码来源:field_hw_skin_link.php
示例15: array
/**
* Field Constructor.
*
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
*
* @since NHP_Options 1.0
*/
function __construct($field = array(), $value = '', $parent)
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->aDefaultKeys = array('enable_external_callback' => false, 'set_dropdown_ddslick_setting' => array('width' => '350'), 'DROPDOWN_DDSSLICK_THEME' => true, 'apply_current_path' => plugin_dir_path(__FILE__), 'plugin_url' => plugins_url('', __FILE__), 'skins_folder' => '', 'group' => '', 'external_skins_folder' => '', 'skin_filename' => '', 'files_skin_folder' => "", 'display' => 'select');
$aField = $this->field;
//$this->field;
/**
* parse hw_skin params
*/
//group
$group = $this->get_field_value('group');
$skins_folder = $this->get_field_value('skins_folder');
$external_skins_folder = $this->get_field_value('external_skins_folder');
$skin_filename = $this->get_field_value('skin_filename');
$apply_current_path = $this->get_field_value('apply_current_path');
//path or url
$plugin_url = $this->get_field_value('plugin_url');
$files_skin_folder = $this->get_field_value('files_skin_folder');
//if(!$files_skin_folder) return; //required
$enable_external_callback = $this->get_field_value('enable_external_callback');
$set_dropdown_ddslick_setting = $this->get_field_value('set_dropdown_ddslick_setting');
//$this->render();
if (class_exists('HW_SKIN')) {
$this->skin = new HW_SKIN($this, $apply_current_path, $external_skins_folder, $skin_filename, $skins_folder);
$this->skin->plugin_url = $plugin_url;
if ($group) {
$this->skin->set_group($group);
}
//set skin group
$this->skin->enable_external_callback = $enable_external_callback;
$this->skin->set_dropdown_ddslick_setting($set_dropdown_ddslick_setting);
//add_filter('hw_skin_data', array($this, '_hw_skin_data_filter'));
$this->skin_config = $this->skin->get_config(true);
//get skin config
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:45,代码来源:field_hw_skin.php
示例16: get_template_directory_uri
echo get_template_directory_uri();
?>
/js/shortcodes.js"></script>
</head>
<body>
<h2><?php
_e('List of available Shortcodes', SH_NAME);
?>
</h2>
<div id="accordion">
<?php
$options = array();
include get_template_directory() . '/includes/resource/shortcodes.php';
$sc_options = $options;
$nph = new NHP_Options();
$nph->args['opt_name'] = 'shortcode';
foreach ($sc_options as $key => $value) {
?>
<h3><?php
echo ucwords(str_replace(array('_', '-'), ' ', $key));
?>
</h3>
<div>
<?php
if (is_array($value)) {
?>
<h4><?php
_e('Available parameters', SH_NAME);
开发者ID:kevintrogers,项目名称:justbkause,代码行数:31,代码来源:shortcode_output.php
示例17: array
function __construct($field = array(), $value = '', $parent = '')
{
parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
$this->field = $field;
$this->value = $value;
$this->parent = $parent;
}
开发者ID:jenng,项目名称:nicucare,代码行数:7,代码来源:field_skin.php
示例18: array
/**
* @param array $sections
* @param array $args
* @param array $extra_tabs
*/
function __construct($sections = array(), $args = array(), $extra_tabs = array())
{
$defaultGroup = __('General', 'ct_theme');
foreach ($extra_tabs as $k => $t) {
if (!isset($t['group'])) {
$extra_tabs[$k]['group'] = $defaultGroup;
}
}
foreach ($sections as $key => $section) {
if (!isset($section['group'])) {
$section['group'] = 'General';
$sections[$key] = $section;
}
$this->groups[$section['group']] = true;
}
$this->groups = array_keys($this->groups);
$args['footer_credit'] = '';
parent::__construct($sections, $args, $extra_tabs);
}
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:24,代码来源:ctNHP_Options.class.php
注:本文中的NHP_Options类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论