本文整理汇总了PHP中NHP_Options::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP NHP_Options::__construct方法的具体用法?PHP NHP_Options::__construct怎么用?PHP NHP_Options::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NHP_Options
的用法示例。
在下文中一共展示了NHP_Options::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例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->return_field = isset($this->field['return']) && $this->field['return'] == 'id' ? 'id' : 'url';
}
示例3: 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();
}
示例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'));
}
示例5:
/**
* 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();
}
示例6: 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();
}
示例7: 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 provide a valid URL for this option.', 'mythemeshop');
$this->value = $value;
$this->current = $current;
$this->validate();
}
示例8: 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'] : __('You must not enter any special characters in this field, all special characters have been removed.', 'mythemeshop');
$this->value = $value;
$this->current = $current;
$this->validate();
}
示例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();
}
示例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();
}
示例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
}
示例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);
}
示例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'));
}
}
示例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);
}
}
示例15: 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);
}