false]; $arg = array_merge($defualt, $arg); $condition = $this->forms_condition($arg); echo '
' . esc_html($arg['label']) . '
'; } /* * Oxi Accordions Style Admin Panel end Each Accordions * * @since 2.0.1 */ public function end_controls_section() { echo '
'; } /* * Oxi Accordions Style Admin Panel Section Inner Accordions * This Accordions like inner tabs as Normal view and Hover View * * @since 2.0.1 */ public function start_controls_tabs($id, array $arg = []) { $defualt = ['options' => ['normal' => 'Normal', 'hover' => 'Hover']]; $arg = array_merge($defualt, $arg); $condition = $this->forms_condition($arg); echo '
'; foreach ($arg['options'] as $key => $value) { echo '
' . esc_html($value) . '
'; } echo '
'; } /* * Oxi Accordions Style Admin Panel end Section Inner Accordions * * @since 2.0.1 */ public function end_controls_tabs() { echo '
'; } /* * Oxi Accordions Style Admin Panel Section Inner Accordions Child * * @since 2.0.1 */ public function start_controls_tab() { echo '
'; } /* * Oxi Accordions Style Admin Panel End Section Inner Accordions Child * * @since 2.0.1 */ public function end_controls_tab() { echo '
'; } /* * Oxi Accordions Style Admin Panel Section Popover * * @since 2.0.1 */ public function start_popover_control($id, array $arg = [], $data = []) { if ($this->render_condition_control($id, $data, $arg)) : $this->Popover_Condition = true; else : $this->Popover_Condition = false; endif; $condition = $this->forms_condition($arg); $separator = (array_key_exists('separator', $arg) ? ($arg['separator'] === true ? 'shortcode-form-control-separator-before' : '') : ''); echo '
' . (array_key_exists('description', $arg) ? '
' . esc_html($arg['description']) . '
' : '') . '
'; } /* * Oxi Accordions Style Admin Panel end Popover * * @since 2.0.1 */ public function end_popover_control() { $this->Popover_Condition = true; echo '
'; } /* * Oxi Accordions Style Admin Panel Form Add Control. * Call All Input Control from here Based on Control Name. * * @since 2.0.1 */ public function add_control($id, array $data = [], array $arg = []) { /* * Responsive Control Start * @since 2.0.1 */ $responsive = $responsiveclass = ''; if (array_key_exists('responsive', $arg)) : if ($arg['responsive'] == 'laptop') : $responsiveclass = 'shortcode-addons-form-responsive-desktop'; elseif ($arg['responsive'] == 'tab') : $responsiveclass = 'shortcode-addons-form-responsive-tablet'; elseif ($arg['responsive'] == 'mobile') : $responsiveclass = 'shortcode-addons-form-responsive-mobile'; endif; $responsive = '
'; endif; if (array_key_exists('customresponsive', $arg)) : $arg['responsive'] = $arg['customresponsive']; endif; $defualt = [ 'type' => 'text', 'label' => 'Input Text', 'default' => '', 'label_on' => esc_html__('Yes', 'accordions-or-faqs'), 'label_off' => esc_html__('No', 'accordions-or-faqs'), 'placeholder' => esc_html__('', 'accordions-or-faqs'), 'selector-data' => true, 'render' => true, 'responsive' => 'laptop', ]; /* * Data Currection while Its comes from group Control */ if (array_key_exists('selector-value', $arg)) : foreach ($arg['selector'] as $key => $value) { $arg['selector'][$key] = $arg['selector-value']; } endif; $arg = array_merge($defualt, $arg); if ($arg['type'] == 'animation') : $arg['type'] = 'select'; $arg['options'] = [ '' => esc_html__('None', 'accordions-or-faqs'), 'bounce' => esc_html__('Bounce', 'accordions-or-faqs'), 'flash' => esc_html__('Flash', 'accordions-or-faqs'), 'pulse' => esc_html__('Pulse', 'accordions-or-faqs'), 'rubberBand' => esc_html__('RubberBand', 'accordions-or-faqs'), 'shake' => esc_html__('Shake', 'accordions-or-faqs'), 'swing' => esc_html__('Swing', 'accordions-or-faqs'), 'tada' => esc_html__('Tada', 'accordions-or-faqs'), 'wobble' => esc_html__('Wobble', 'accordions-or-faqs'), 'jello' => esc_html__('Jello', 'accordions-or-faqs'), ]; endif; $condition = $this->forms_condition($arg); $toggle = (array_key_exists('toggle', $arg) ? 'shortcode-addons-form-toggle' : ''); $separator = (array_key_exists('separator', $arg) ? ($arg['separator'] === true ? 'shortcode-form-control-separator-before' : '') : ''); $loader = (array_key_exists('loader', $arg) ? $arg['loader'] == true ? ' shortcode-addons-control-loader ' : '' : ''); echo '
'; echo ''; echo $responsive; $fun = $arg['type'] . '_admin_control'; echo $this->$fun($id, $data, $arg); echo '
'; echo (array_key_exists('description', $arg) ? '
' . esc_html($arg['description']) . '
' : ''); echo '
'; } /* * Oxi Accordions Style Admin Panel Responsive Control. * Can Possible to modify any Add control to Responsive Control * * @since 2.0.1 */ public function add_responsive_control($id, array $data = [], array $arg = []) { $lap = $id . '-lap'; $tab = $id . '-tab'; $mob = $id . '-mob'; $laparg = ['responsive' => 'laptop']; $this->add_control($lap, $data, array_merge($arg, $laparg)); if ($arg['type'] == 'dimensions' || $arg['type'] == 'slider') : $tabarg = [ 'responsive' => 'tab', 'default' => [ 'unit' => 'px', 'size' => '', ], ]; $mobarg = [ 'responsive' => 'mobile', 'default' => [ 'unit' => 'px', 'size' => '', ], ]; elseif ($arg['type'] == 'number') : $tabarg = [ 'responsive' => 'tab', 'default' => '', ]; $mobarg = [ 'responsive' => 'mobile', 'default' => '', ]; else : $tabarg = [ 'responsive' => 'tab', ]; $mobarg = [ 'responsive' => 'mobile', ]; endif; $this->add_control($tab, $data, array_merge($arg, $tabarg)); $this->add_control($mob, $data, array_merge($arg, $mobarg)); } /* * Oxi Accordions Style Admin Panel Group Control. * * @since 2.0.1 */ public function add_group_control($id, array $data = [], array $arg = []) { $defualt = [ 'type' => 'text', 'description' => '', 'simpledescription' => '' ]; $arg = array_merge($defualt, $arg); $fun = $arg['type'] . '_admin_group_control'; echo $this->$fun($id, $data, $arg); } public function add_rearrange_control($id, array $data = [], array $arg = []) { $condition = $this->forms_condition($arg); $separator = (array_key_exists('separator', $arg) ? ($arg['separator'] === true ? 'shortcode-form-control-separator-before' : '') : ''); $value = array_key_exists($id, $data) ? $data[$id] : $arg['default']; echo '
'; $rearrange = explode(',', $value); foreach ($rearrange as $k => $vl) { if ($vl != '') : echo '
' . esc_html($arg['fields'][$vl]['label']) . '
'; endif; } echo '
'; } /* * Oxi Accordions Style Admin Panel Heading Input. * * @since 2.0.1 */ public function heading_admin_control($id, array $data = [], array $arg = []) { echo ' '; } /* * Oxi Accordions Style Admin Panel Switcher Input. * * @since 2.0.1 */ public function separator_admin_control($id, array $data = [], array $arg = []) { echo ''; } public function multiple_selector_handler($data, $val) { $val = preg_replace_callback('/\{\{\K(.*?)(?=}})/', function ($match) use ($data) { $ER = explode('.', $match[0]); if (strpos($match[0], 'SIZE') !== false) : $size = array_key_exists($ER[0] . '-size', $data) ? $data[$ER[0] . '-size'] : ''; $match[0] = str_replace('.SIZE', $size, $match[0]); endif; if (strpos($match[0], 'UNIT') !== false) : $size = array_key_exists($ER[0] . '-choices', $data) ? $data[$ER[0] . '-choices'] : ''; $match[0] = str_replace('.UNIT', $size, $match[0]); endif; if (strpos($match[0], 'VALUE') !== false) : $size = array_key_exists($ER[0], $data) ? $data[$ER[0]] : ''; $match[0] = str_replace('.VALUE', $size, $match[0]); endif; return str_replace($ER[0], '', $match[0]); }, $val); return str_replace("{{", '', str_replace("}}", '', $val)); } /* * Oxi Accordions Style Admin Panel Switcher Input. * * @since 2.0.1 */ public function switcher_admin_control($id, array $data = [], array $arg = []) { $value = array_key_exists($id, $data) ? $data[$id] : $arg['default']; $retun = []; if (array_key_exists('selector-data', $arg) && $arg['selector-data'] == true) { if (array_key_exists('selector', $arg)) : foreach ($arg['selector'] as $key => $val) { $key = (strpos($key, '{{KEY}}') ? str_replace('{{KEY}}', explode('saarsa', $id)[1], $key) : $key); if (!empty($val) && $this->render_condition_control($id, $data, $arg)) { $class = str_replace('{{WRAPPER}}', $this->CSSWRAPPER, $key); $file = str_replace('{{VALUE}}', $value, $val); if (strpos($file, '{{') !== false) : $file = $this->multiple_selector_handler($data, $file); endif; if (!empty($value)) : $this->CSSDATA[$arg['responsive']][$class][$file] = $file; endif; } $retun[$key][$key]['type'] = ($val != '' ? 'CSS' : 'HTML'); $retun[$key][$key]['value'] = $val; } endif; } $retunvalue = array_key_exists('selector', $arg) ? htmlspecialchars(json_encode($retun)) : ''; echo '
'; } /* * Oxi Accordions Style Admin Panel Text Input. * * @since 2.0.1 */ public function text_admin_control($id, array $data = [], array $arg = []) { $value = array_key_exists($id, $data) ? $data[$id] : $arg['default']; $retunvalue = array_key_exists('selector', $arg) ? htmlspecialchars(json_encode($arg['selector'])) : ''; if (array_key_exists('link', $arg)) : echo ''; } /* * Oxi Accordions Style Admin Panel Form Dependency * * @since 2.0.1 */ public function forms_condition(array $arg = []) { if (array_key_exists('condition', $arg)) : $i = $arg['condition'] != '' ? count($arg['condition']) : 0; // echo $i; $data = ''; $s = 1; $form_condition = array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''; foreach ($arg['condition'] != '' ? $arg['condition'] : [] as $key => $value) { if (is_array($value)) : $c = count($value); $crow = 1; if ($c > 1 && $i > 1) : $data .= '('; endif; foreach ($value as $item) { $data .= $form_condition . $key . ' === \'' . $item . '\''; if ($crow < $c) : $data .= ' || '; $crow++; endif; } if ($c > 1 && $i > 1) : $data .= ')'; endif; elseif ($value == 'COMPILED') : $data .= $form_condition . $key; elseif ($value == 'EMPTY') : $data .= $form_condition . $key . ' !== \'\''; elseif (empty($value)) : $data .= $form_condition . $key; else : $data .= $form_condition . $key . ' === \'' . $value . '\''; endif; if ($s < $i) : $data .= ' && '; $s++; endif; } if (!empty($data)) : return 'data-condition="' . $data . '"'; endif; endif; } /* * Oxi Accordions Style Admin Panel Background . * * @since 2.0.1 * Simple Interfaece Enable */ public function url_admin_group_control($id, array $data = [], array $arg = []) { if (array_key_exists('condition', $arg)) : $cond = 'condition'; $condition = $arg['condition']; else : $cond = $condition = ''; endif; $form_condition = array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''; $separator = array_key_exists('separator', $arg) ? $arg['separator'] : false; $this->add_control( $id . '-url', $data, [ 'label' => esc_html__('Link', 'accordions-or-faqs'), 'type' => Controls::TEXT, 'link' => true, 'separator' => $separator, 'placeholder' => 'http://www.example.com/', 'form_condition' => (array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''), $cond => $condition ], ); echo '
'; $this->add_control( $id . '-target', $data, [ 'label' => esc_html__('New Window?', 'accordions-or-faqs'), 'type' => Controls::SWITCHER, 'default' => '', 'label_on' => esc_html__('Yes', 'accordions-or-faqs'), 'label_off' => esc_html__('No', 'accordions-or-faqs'), 'return_value' => 'yes', ], ); echo '
' . (array_key_exists('description', $arg) ? '
' . $arg['description'] . '
' : '') . ''; } /* * Oxi Accordions Style Admin Panel Column Size. * * @since 2.0.1 * Complete Simple Interface */ public function column_admin_group_control($id, array $data = [], array $arg = []) { $selector = array_key_exists('selector', $arg) ? $arg['selector'] : ''; $select = array_key_exists('selector', $arg) ? 'selector' : ''; $cond = $condition = ''; if (array_key_exists('condition', $arg)) : $cond = 'condition'; $condition = $arg['condition']; endif; $this->add_control( $lap = $id . '-lap', $data, [ 'label' => esc_html__('Column Size', 'accordions-or-faqs'), 'type' => Controls::SELECT, 'responsive' => 'laptop', 'description' => $arg['description'], 'default' => 'oxi-bt-col-lg-12', 'options' => [ 'oxi-bt-col-lg-12' => esc_html__('Col 1', 'accordions-or-faqs'), 'oxi-bt-col-lg-6' => esc_html__('Col 2', 'accordions-or-faqs'), 'oxi-bt-col-lg-4' => esc_html__('Col 3', 'accordions-or-faqs'), 'oxi-bt-col-lg-3' => esc_html__('Col 4', 'accordions-or-faqs'), 'oxi-bt-col-lg-5' => esc_html__('Col 5', 'accordions-or-faqs'), 'oxi-bt-col-lg-2' => esc_html__('Col 6', 'accordions-or-faqs'), 'oxi-bt-col-lg-8' => esc_html__('Col 8', 'accordions-or-faqs'), 'oxi-bt-col-lg-1' => esc_html__('Col 12', 'accordions-or-faqs'), ], 'description' => 'Define how much column you want to show into single rows. Customize possible with desktop or tab or mobile Settings.', $select => $selector, 'form_condition' => (array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''), $cond => $condition ], ); $this->add_control( $tab = $id . '-tab', $data, [ 'label' => esc_html__('Column Size', 'accordions-or-faqs'), 'type' => Controls::SELECT, 'responsive' => 'tab', 'default' => 'oxi-bt-col-md-12', 'description' => $arg['description'], 'options' => [ '' => esc_html__('Default', 'accordions-or-faqs'), 'oxi-bt-col-md-12' => esc_html__('Col 1', 'accordions-or-faqs'), 'oxi-bt-col-md-6' => esc_html__('Col 2', 'accordions-or-faqs'), 'oxi-bt-col-md-4' => esc_html__('Col 3', 'accordions-or-faqs'), 'oxi-bt-col-md-3' => esc_html__('Col 4', 'accordions-or-faqs'), 'oxi-bt-col-md-2' => esc_html__('Col 6', 'accordions-or-faqs'), 'oxi-bt-col-md-1' => esc_html__('Col 12', 'accordions-or-faqs'), ], 'description' => 'Define how much column you want to show into single rows. Customize possible with desktop or tab or mobile Settings.', $select => $selector, 'form_condition' => (array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''), $cond => $condition ], ); $this->add_control( $mob = $id . '-mob', $data, [ 'label' => esc_html__('Column Size', 'accordions-or-faqs'), 'type' => Controls::SELECT, 'default' => 'oxi-bt-col-lg-12', 'responsive' => 'mobile', 'description' => $arg['description'], 'options' => [ '' => esc_html__('Default', 'accordions-or-faqs'), 'oxi-bt-col-sm-12' => esc_html__('Col 1', 'accordions-or-faqs'), 'oxi-bt-col-sm-6' => esc_html__('Col 2', 'accordions-or-faqs'), 'oxi-bt-col-sm-4' => esc_html__('Col 3', 'accordions-or-faqs'), 'oxi-bt-col-sm-3' => esc_html__('Col 4', 'accordions-or-faqs'), 'oxi-bt-col-sm-5' => esc_html__('Col 5', 'accordions-or-faqs'), 'oxi-bt-col-sm-2' => esc_html__('Col 6', 'accordions-or-faqs'), 'oxi-bt-col-sm-1' => esc_html__('Col 12', 'accordions-or-faqs'), ], 'description' => 'Define how much column you want to show into single rows. Customize possible with desktop or tab or mobile Settings.', $select => $selector, 'form_condition' => (array_key_exists('form_condition', $arg) ? $arg['form_condition'] : ''), $cond => $condition ], ); } /* * * * Templates Substitute Data * * * * */ /* * Oxi Accordions Style Admin Panel Template Substitute Control. * * @since 2.0.1 */ public function add_substitute_control($id, array $data = [], array $arg = []) { $fun = $arg['type'] . '_substitute_control'; echo $this->$fun($id, $data, $arg); } /* * Oxi Accordions Style Admin Panel Template Substitute Modal Opener. * * @since 2.0.1 */ public function modalopener_substitute_control($id, array $data = [], array $arg = []) { $default = [ 'showing' => false, 'title' => 'Add New Items', 'sub-title' => 'Add New Items' ]; $arg = array_merge($default, $arg); /* * esc_html($arg['title']) = 'Add New Items'; * $arg['sub-title'] = 'Add New Items 02'; * */ $condition = $this->forms_condition($arg); echo '
' . esc_html($arg['title']) . '
' . $arg['sub-title'] . '
'; } public function shortcodename_substitute_control($id, array $data = [], array $arg = []) { $default = [ 'showing' => false, 'title' => 'Shortcode Name', 'placeholder' => 'Set Your Shortcode Name' ]; $arg = array_merge($default, $arg); /* * esc_html(esc_html($arg['title'])) = 'Add New Items'; * $arg['sub-title'] = 'Add New Items 02'; * */ $condition = $this->forms_condition($arg); echo '
' . esc_html($arg['title']) . '
'; } /* * Oxi Accordions Style Admin Panel Template Shortcode Info. * * @since 2.0.1 */ public function shortcodeinfo_substitute_control($id, array $data = [], array $arg = []) { $default = [ 'showing' => false, 'title' => 'Shortcode', ]; $arg = array_merge($default, $arg); /* * esc_html($arg['title']) = 'Add New Items'; * $arg['sub-title'] = 'Add New Items 02'; * */ $condition = $this->forms_condition($arg); echo '
' . esc_html($arg['title']) . '
Shortcode for posts/pages/plugins

Copy & paste the shortcode directly into any WordPress post, page or Page Builder.

Shortcode for templates/themes

Copy & paste this code into a template file to include the slideshow within your theme.

'; } public function rearrange_substitute_control($id, array $data = [], array $arg = []) { $default = [ 'showing' => false, 'title' => 'Accordions Rearrange', 'sub-title' => 'Accordions Rearrange' ]; $arg = array_merge($default, $arg); /* * esc_html($arg['title']) = 'Add New Items'; * $arg['sub-title'] = 'Add New Items 02'; * */ $condition = $this->forms_condition($arg); echo '
' . esc_html($arg['title']) . '
' . esc_html($arg['sub-title']) . '
'; } /** * font settings sanitize * works at layouts page to adding font Settings sanitize */ public function AdminTextSenitize($data) { $data = str_replace('\\\\"', '"', $data); $data = str_replace('\\\"', '"', $data); $data = str_replace('\\"', '"', $data); $data = str_replace('\"', '"', $data); $data = str_replace('"', '"', $data); $data = str_replace('\\\\"', '"', $data); $data = str_replace('\\\"', '"', $data); $data = str_replace('\\"', '"', $data); $data = str_replace('\"', '"', $data); $data = str_replace("\\\\'", ''', $data); $data = str_replace("\\\'", ''', $data); $data = str_replace("\\'", ''', $data); $data = str_replace("\'", ''', $data); $data = str_replace("\\\\'", ''', $data); $data = str_replace("\\\'", ''', $data); $data = str_replace("\\'", ''', $data); $data = str_replace("\'", ''', $data); $data = str_replace("'", ''', $data); $data = str_replace('<', '<', $data); $data = str_replace('>', '>', $data); $data = sanitize_text_field($data); return $data; } /* * Oxi Accordions Style Admin Panel Body * * @since 2.0.1 */ public function start_section_tabs($id, array $arg = []) { echo '
'; } /* * Oxi Accordions Style Admin Panel end Body * * @since 2.0.1 */ public function end_section_tabs() { echo '
'; } /* * Oxi Accordions Style Admin Panel Col 6 or Entry devider * * @since 2.0.1 */ public function start_section_devider() { echo '
'; } }