/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr, $oxy_typography) { $this->oxy_typography = $oxy_typography; $field['options'] = $this->load_select_data(); $attr['class'] = 'font-select select2'; parent::__construct($field, $value, $attr); }
/** * Column menu options * * @package Lambda * @subpackage Admin * * @copyright (c) 2015 Oxygenna.com * @license **LICENSE** * @version 1.17.0 * @author Oxygenna.com */ require_once OXY_TF_DIR . 'inc/options/fields/select/OxygennaSelect.php'; // create options and value for icon select $widget_option = array('name' => 'Widget', 'desc' => 'Widget', 'id' => 'Widget', 'type' => 'select', 'options' => array('on' => __('On', 'lambda-admin-td'), '' => __('Off', 'lambda-admin-td')), 'default' => ''); $widget_select_value = isset($item->oxy_widget) ? esc_attr($item->oxy_widget) : ''; $widget_select = new OxygennaSelect($widget_option, $widget_select_value, array('id' => 'edit-menu-item-widget-' . $item_id, 'name' => 'menu-item-oxy_widget[' . $item_id . ']', 'class' => 'widefat edit-menu-item-widget')); ?> <p class="field-widget oxy-widget description-wide"> <label for="edit-menu-item-oxy-widget-<?php echo $item_id; ?> "> <?php _e('Use Column As Widget', 'lambda-admin-td'); ?> <br /> <?php $widget_select->render(); ?> <span class="description"><?php _e('This will set this column up to be used as a widget position.', 'lambda-admin-td');
/** * Mega Menu Options * * @package Omega * @subpackage Admin * * @copyright (c) 2014 Oxygenna.com * @license **LICENSE** * @version 1.7.3 * @author Oxygenna.com */ require_once OXY_TF_DIR . 'inc/options/fields/select/OxygennaSelect.php'; $column_borders_option = array('name' => 'Borders', 'desc' => 'Borders', 'id' => 'Borders', 'type' => 'select', 'options' => array('on' => __('On', 'omega-admin-td'), 'off' => __('Off', 'omega-admin-td')), 'default' => 'on'); $column_borders_select_value = isset($item->oxy_mega_borders) ? esc_attr($item->oxy_mega_borders) : ''; $column_borders_select = new OxygennaSelect($column_borders_option, $column_borders_select_value, array('id' => 'edit-menu-item-mega_borders-' . $item_id, 'name' => 'menu-item-oxy_mega_borders[' . $item_id . ']', 'class' => 'widefat edit-menu-item-mega_borders')); ?> <p class="field-url oxy-url description-wide"> <label for="edit-menu-item-oxy-url-<?php echo $item_id; ?> "> <?php _e('URL', 'omega-admin-td'); ?> <br /> <input type="text" id="edit-menu-item-url-<?php echo $item_id; ?> " class="widefat code edit-menu-item-url" name="menu-item-oxy_mega_url[<?php echo $item_id;
// create options and value for modal select $modal_option = array('name' => 'Modal', 'desc' => 'Select to open up a modal', 'id' => 'modal', 'type' => 'select', 'blank' => 'None', 'default' => '', 'options' => 'custom_post_id', 'post_type' => 'oxy_modal'); $modal_select_value = isset($item->oxy_modal) ? esc_attr($item->oxy_modal) : ''; $modal_select = new OxygennaSelect($modal_option, $modal_select_value, array('id' => 'edit-menu-item-modal-' . $item_id, 'name' => 'menu-item-oxy_modal[' . $item_id . ']', 'class' => 'widefat edit-menu-item-modal')); // create options and value for icon select $icon_option = array('name' => 'Icon', 'desc' => 'Icon', 'id' => 'Icon', 'type' => 'select', 'options' => 'icons', 'default' => ''); $icon_select_value = isset($item->oxy_icon) ? esc_attr($item->oxy_icon) : ''; $icon_select = new OxygennaSelect($icon_option, $icon_select_value, array('id' => 'edit-menu-item-icon-' . $item_id, 'name' => 'menu-item-oxy_icon[' . $item_id . ']', 'class' => 'widefat edit-menu-item-icon')); // create option for special menu items $special_option = array('name' => 'Type', 'desc' => 'Type', 'id' => 'Type', 'type' => 'select', 'options' => array('' => __('Normal Menu', 'lambda-admin-td'), 'divider' => __('Divider', 'lambda-admin-td'), 'nav-highlight' => __('Button Menu', 'lambda-admin-td'), 'nav-highlight-ghost' => __('Bordered Button Menu', 'lambda-admin-td'), 'disabled' => __('Disabled Menu', 'lambda-admin-td')), 'default' => ''); $special_select_value = isset($item->oxy_special) ? esc_attr($item->oxy_special) : ''; $special_select = new OxygennaSelect($special_option, $special_select_value, array('id' => 'edit-menu-item-special-' . $item_id, 'name' => 'menu-item-oxy_special[' . $item_id . ']', 'class' => 'widefat edit-menu-item-special')); // create options and value for icon select $label_type_option = array('name' => 'Label Type', 'desc' => 'Label Type', 'id' => 'Label Type', 'type' => 'select', 'options' => array('default' => __('Default', 'lambda-admin-td'), 'primary' => __('Primary', 'lambda-admin-td'), 'success' => __('Success', 'lambda-admin-td'), 'info' => __('Info', 'lambda-admin-td'), 'warning' => __('Warning', 'lambda-admin-td'), 'danger' => __('Danger', 'lambda-admin-td')), 'default' => ''); $label_type_select_value = isset($item->oxy_label_type) ? esc_attr($item->oxy_label_type) : ''; $label_type_select = new OxygennaSelect($label_type_option, $label_type_select_value, array('id' => 'edit-menu-item-label_type-' . $item_id, 'name' => 'menu-item-oxy_label_type[' . $item_id . ']', 'class' => 'widefat edit-menu-item-label_type')); ?> <p class="field-icon oxy-modal description-wide"> <label for="edit-menu-item-modal-<?php echo $item_id; ?> "> <?php _e('Modal', 'lambda-admin-td'); ?> <?php $modal_select->render(); ?> <span class="description"><?php _e('Select to open up a modal', 'lambda-admin-td'); ?>
public function enqueue() { parent::enqueue(); // load scripts wp_enqueue_script('select2-plugin', OXY_TF_URI . 'assets/components/select2/select2.min.js', array('jquery')); wp_enqueue_style('select2-style', OXY_TF_URI . 'assets/components/select2/select2.css'); wp_enqueue_style('oxy-font-style', OXY_TF_URI . 'assets/css/options/oxy-option-font.css'); wp_register_script('font-field', OXY_TF_URI . 'inc/options/fields/font/font.js', array('jquery')); wp_localize_script('font-field', 'fontData', array('getFontNonce' => wp_create_nonce('get-font-nonce'), 'ajaxURL' => admin_url('admin-ajax.php'))); wp_enqueue_script('font-field'); }