/** */ public function get_template_vars() { // new script helper $script = new ICE_Script(); $logic = $script->logic(); // add variables $logic->av('customSelector', $this->custom_selector); // return vars return array('selector' => $this->target_selector, 'options' => $logic->export_variables(true)); }
/** */ public function get_template_vars() { // new script helper $script = new ICE_Script(); $options = $script->logic(); // add variables $options->av('value', $this->get()); $options->av('itemWidth', $this->item_width); $options->av('itemHeight', $this->item_height); $options->av('itemMargin', $this->item_margin); // return vars return array('value' => $this->get(), 'scroll_options' => $options->export_variables(true), 'field_options' => $this->property('field_options')); }
/** * Return script object * * @return ICE_Script */ public function script() { if (!$this->__script__ instanceof ICE_Script) { // init script object $this->__script__ = new ICE_Script($this); // init script sections $this->__script__->add_section('admin'); } // return it! return $this->__script__; }
/** */ public function get_template_vars() { // new script helper $script = new ICE_Script(); $logic = $script->logic(); // add variables $logic->av('combine', $this->combine); $logic->av('groupPageText', $this->group_page_text); $logic->av('nested', $this->nested); $logic->av('prependTo', $this->prepend_to); $logic->av('switchWidth', $this->switch_width); $logic->av('topOptionText', $this->top_option_text); // return vars return array('selector' => $this->target_selector, 'options' => $logic->export_variables(true)); }
/** */ public function get_template_vars() { // new script helper $script = new ICE_Script(); $logic = $script->logic(); // set value(s) $value = $this->get(); if ($value instanceof ICE_Map) { $logic->av('values', $value->to_array()); } elseif (is_array($value)) { $logic->av('values', $value); } elseif (is_numeric($value)) { $logic->av('value', $value); } else { $logic->av('value', 0); } // range needs special handling if ($this->range) { $logic->av('range', true); } // add variables $logic->av('animate', (bool) $this->animate); $logic->av('max', $this->max); $logic->av('min', $this->min); $logic->av('orientation', $this->orientation); $logic->av('step', $this->step); $logic->av('prefix', $this->prefix); $logic->av('suffix', $this->suffix); $logic->av('delimiter', $this->delimiter); // return vars return array('options' => $logic->export_variables(true), 'label' => $this->label ? $this->label : __('Current selection:', infinity_text_domain)); }
/** * Print available tabs widget setting */ public function render_available_tabs() { // get all screens from the registry $items = $this->policy->registry()->get_all(); // make sure we got some items if (count($items)) { // new script helper $script = new ICE_Script(); $logic = $script->logic(); foreach ($items as $item) { // add variable $logic->av($item->property('name'), $item->property('title')); } print $logic->export_variables(true); } else { print '{}'; } }
/** */ public function get_template_vars() { // new script helper $script = new ICE_Script(); $logic = $script->logic(); // add variables $logic->av('tipLocation', $this->tip_location); $logic->av('scrollSpeed', $this->scroll_speed); $logic->av('timer', $this->timer); $logic->av('startTimerOnClick', $this->start_timer_on_click); $logic->av('nextButton', $this->next_button); $logic->av('tipAnimation', $this->tip_animation); $logic->av('tipAnimationFadeSpeed', $this->tip_animation_fade_speed); $logic->av('cookieMonster', $this->cookie_monster); $logic->av('cookieName', $this->cookie_name); $logic->av('cookieDomain', $this->cookie_domain); $logic->av('tipContainer', $this->tip_container); $logic->av('inline', $this->inline); $logic->av('tipContent', $this->tip_content); $logic->av('postRideCallback', $this->post_ride_callback); $logic->av('postStepCallback', $this->post_step_callback); // return vars return array('options' => $logic->export_variables(true)); }
/** * Generate all script for creating buttons and return script object * * @return ICE_Script */ protected function get_button_script() { // script object $script = new ICE_Script(); // loop all items foreach ($this->get_items() as $item_slug => $item) { // reset vars $conf = null; $icon_primary = null; $icon_secondary = null; // check for primary if (isset($item['icon_primary'])) { $icon_primary = $item['icon_primary']; } // check for secondary if (isset($item['icon_secondary'])) { $icon_secondary = $item['icon_secondary']; } // get any? if ($icon_primary || $icon_secondary) { // new icon object $icon = new ICE_Icon($icon_primary, $icon_secondary); // format conf $conf = sprintf('{%s}', $icon->config()); } /*\*/ if (0) { } ?> <script><?php /*\*/ // start capturing $script->begin_logic(); // the button statement ?> jQuery('a#<?php print $this->element()->id($item_slug); ?> ').button(<?php print $conf; ?> ); <?php // end capturing $script->end_logic(); /*\*/ if (0) { } ?> </script><?php /*\*/ } return $script; }