public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = $title = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('vc_col-sm-3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('vc_col-sm-3', 'vc_col-sm-3', 'vc_col-sm-3', 'vc_col-sm-3');
         } else {
             if ($width == 'column_13' || $width == '1/3') {
                 $width = array('vc_col-sm-4');
             } else {
                 if ($width == 'column_13-23') {
                     $width = array('vc_col-sm-4', 'vc_col-sm-8');
                 } else {
                     if ($width == 'column_13-13-13') {
                         $width = array('vc_col-sm-4', 'vc_col-sm-4', 'vc_col-sm-4');
                     } else {
                         if ($width == 'column_12' || $width == '1/2') {
                             $width = array('vc_col-sm-6');
                         } else {
                             if ($width == 'column_12-12') {
                                 $width = array('vc_col-sm-6', 'vc_col-sm-6');
                             } else {
                                 if ($width == 'column_23' || $width == '2/3') {
                                     $width = array('vc_col-sm-8');
                                 } else {
                                     if ($width == 'column_34' || $width == '3/4') {
                                         $width = array('vc_col-sm-9');
                                     } else {
                                         if ($width == 'column_16' || $width == '1/6') {
                                             $width = array('vc_col-sm-2');
                                         } else {
                                             $width = array('');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="group wpb_sortable">';
         $output .= '<h3><span class="tab-label"><%= params.title %></span></h3>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, $i) . '>';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
Пример #2
0
 public function contentAdmin($atts, $content = null)
 {
     $width = '';
     extract(shortcode_atts(array('width' => 'column_12'), $atts));
     $output = '';
     $column_controls = $this->getColumnControls('size_delete');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('span3', 'span3', 'span3', 'span3');
         } else {
             if ($width == 'column_14-12-14') {
                 $width = array('span3', 'span6', 'span3');
             } else {
                 if ($width == 'column_12-14-14') {
                     $width = array('span6', 'span3', 'span3');
                 } else {
                     if ($width == 'column_14-14-12') {
                         $width = array('span3', 'span3', 'span6');
                     } else {
                         if ($width == 'column_13' || $width == '1/3') {
                             $width = array('span4');
                         } else {
                             if ($width == 'column_13-23') {
                                 $width = array('span4', 'span8');
                             } else {
                                 if ($width == 'column_23-13') {
                                     $width = array('span8', 'span4');
                                 } else {
                                     if ($width == 'column_13-13-13') {
                                         $width = array('span4', 'span4', 'span4');
                                     } else {
                                         if ($width == 'column_12' || $width == '1/2') {
                                             $width = array('span6');
                                         } else {
                                             if ($width == 'column_12-12') {
                                                 $width = array('span6', 'span6');
                                             } else {
                                                 if ($width == 'column_23' || $width == '2/3') {
                                                     $width = array('span8');
                                                 } else {
                                                     if ($width == 'column_34' || $width == '3/4') {
                                                         $width = array('span9');
                                                     } else {
                                                         $width = array('span12');
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="wpb_vc_column wpb_sortable wpb_droppable ' . $width[$i] . ' not-column-inherit">';
         $output .= '<input type="hidden" class="wpb_vc_sc_base" name="" value="vc_column" />';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div class="row-fluid wpb_column_container wpb_sortable_container not-column-inherit">';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
Пример #3
0
 /**
  * @param $width
  *
  * @return string
  */
 public function getElementHolder($width)
 {
     $output = '';
     $column_controls = $this->getColumnControlsModular();
     $sortable = vc_user_access_check_shortcode_all($this->shortcode) ? 'wpb_sortable' : $this->nonDraggableClass;
     $css_class = 'wpb_' . $this->settings['base'] . ' wpb_content_element ' . $sortable . '' . (!empty($this->settings['class']) ? ' ' . $this->settings['class'] : '');
     $output .= '<div data-element_type="' . $this->settings['base'] . '" class="' . $css_class . '">';
     $output .= str_replace('%column_size%', wpb_translateColumnWidthToFractional($width), $column_controls);
     $output .= $this->getCallbacks($this->shortcode);
     $output .= '<div class="wpb_element_wrapper ' . $this->settings('wrapper_class') . '">';
     $output .= '%wpb_element_content%';
     $output .= '</div>';
     $output .= '</div>';
     return $output;
 }
Пример #4
0
 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = $title = $image = $track = $content = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     // $column_controls_bottom =  $this->getColumnControls('add', 'bottom-controls');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('vc_span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('vc_span3', 'vc_span3', 'vc_span3', 'vc_span3');
         } else {
             if ($width == 'column_13' || $width == '1/3') {
                 $width = array('vc_span4');
             } else {
                 if ($width == 'column_13-23') {
                     $width = array('vc_span4', 'vc_span8');
                 } else {
                     if ($width == 'column_13-13-13') {
                         $width = array('vc_span4', 'vc_span4', 'vc_span4');
                     } else {
                         if ($width == 'column_12' || $width == '1/2') {
                             $width = array('vc_span6');
                         } else {
                             if ($width == 'column_12-12') {
                                 $width = array('vc_span6', 'vc_span6');
                             } else {
                                 if ($width == 'column_23' || $width == '2/3') {
                                     $width = array('vc_span8');
                                 } else {
                                     if ($width == 'column_34' || $width == '3/4') {
                                         $width = array('vc_span9');
                                     } else {
                                         if ($width == 'column_16' || $width == '1/6') {
                                             $width = array('vc_span2');
                                         } else {
                                             $width = array('');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         // $output .= '<h3><span class="tab-label"><%= params.title %></span></h3>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper cursor-move" style="border: <%= params.frame_width %>px <%= params.frame_color %> solid">';
         $output .= '<h4 class="wpb_element_title message_box">' . __('Message Box', MISS_ADMIN_TEXTDOMAIN) . ': <%= params.title %></h4>';
         $output .= '<p class="wpb_element_title"><%= params.container %></p>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 //var_dump($param_value);
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '</div>';
     }
     return $output;
 }
Пример #5
0
 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     $width = array('vc_col-sm-12');
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, $i) . '>';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
     }
     return $output;
 }
Пример #6
0
 public function getElementHolder($width)
 {
     $output = '';
     $column_controls = $this->getColumnControlsModular();
     $css_class = 'wpb_' . $this->settings["base"] . ' wpb_content_element wpb_sortable' . (!empty($this->settings["class"]) ? ' ' . $this->settings["class"] : '');
     $output .= '<div data-element_type="' . $this->settings["base"] . '" class="' . $css_class . '">';
     $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width), $column_controls);
     $output .= $this->getCallbacks($this->shortcode);
     $output .= '<div class="wpb_element_wrapper ' . $this->settings("wrapper_class") . '">';
     $output .= '%wpb_element_content%';
     $output .= '</div>';
     // <!-- end .wpb_element_wrapper -->';
     $output .= '</div>';
     // <!-- end #element-'.$this->shortcode.' -->';
     return $output;
 }
Пример #7
0
 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = $title = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('span3', 'span3', 'span3', 'span3');
         } else {
             if ($width == 'column_13' || $width == '1/3') {
                 $width = array('span4');
             } else {
                 if ($width == 'column_13-23') {
                     $width = array('span4', 'span8');
                 } else {
                     if ($width == 'column_13-13-13') {
                         $width = array('span4', 'span4', 'span4');
                     } else {
                         if ($width == 'column_12' || $width == '1/2') {
                             $width = array('span6');
                         } else {
                             if ($width == 'column_12-12') {
                                 $width = array('span6', 'span6');
                             } else {
                                 if ($width == 'column_23' || $width == '2/3') {
                                     $width = array('span8');
                                 } else {
                                     if ($width == 'column_34' || $width == '3/4') {
                                         $width = array('span9');
                                     } else {
                                         if ($width == 'column_16' || $width == '1/6') {
                                             $width = array('span2');
                                         } else {
                                             $width = array('');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="group wpb_sortable">';
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div class="row-fluid wpb_row_container not-row-inherit">';
         $output .= '<h3 class="accordion_header"><a href="#">' . $title . '</a></h3>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= '<input type="hidden" class="wpb_vc_sc_base" name="" value="' . $this->settings['base'] . '" />';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div class="row-fluid wpb_column_container wpb_sortable_container wpb_' . $this->settings['base'] . '_container wpb_container_block wpb_no_content_element_inside wpb_nested_accordion_inside wpb_nested_tabs_inside">';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = ${$param}['param_name'];
                 //var_dump($param_value);
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
Пример #8
0
 function getElementHolder($width)
 {
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $output .= '<div data-element_type="' . $this->settings["base"] . '" class="wpb_' . $this->settings["base"] . ' wpb_content_element wpb_sortable ' . wpb_translateColumnWidthToSpan($width) . ' ' . $this->settings["class"] . '">';
     $output .= '<input type="hidden" class="wpb_vc_sc_base" name="element_name-' . $this->shortcode . '" value="' . $this->settings["base"] . '" />';
     $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width), $column_controls);
     $output .= $this->getCallbacks($this->shortcode);
     $output .= '<div class="wpb_element_wrapper ' . $this->settings("wrapper_class") . '">';
     $output .= '%wpb_element_content%';
     $output .= '</div> <!-- end .wpb_element_wrapper -->';
     $output .= '</div> <!-- end #element-' . $this->shortcode . ' -->';
     return $output;
 }
Пример #9
0
 /**
  * @param $atts
  * @param null $content
  *
  * @return string
  */
 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     if (' column_14' === $width || ' 1/4' === $width) {
         $width = array('vc_col-sm-3');
     } elseif (' column_14===$width-14-14-14') {
         $width = array('vc_col-sm-3', 'vc_col-sm-3', 'vc_col-sm-3', 'vc_col-sm-3');
     } elseif (' column_13' === $width || ' 1/3' === $width) {
         $width = array('vc_col-sm-4');
     } elseif (' column_13===$width-23') {
         $width = array('vc_col-sm-4', 'vc_col-sm-8');
     } elseif (' column_13===$width-13-13') {
         $width = array('vc_col-sm-4', 'vc_col-sm-4', 'vc_col-sm-4');
     } elseif (' column_12' === $width || ' 1/2' === $width) {
         $width = array('vc_col-sm-6');
     } elseif (' column_12===$width-12') {
         $width = array('vc_col-sm-6', 'vc_col-sm-6');
     } elseif (' column_23' === $width || ' 2/3' === $width) {
         $width = array('vc_col-sm-8');
     } elseif (' column_34' === $width || ' 3/4' === $width) {
         $width = array('vc_col-sm-9');
     } elseif (' column_16' === $width || ' 1/6' === $width) {
         $width = array('vc_col-sm-2');
     } elseif (' column_56' === $width || ' 5/6' === $width) {
         $width = array('vc_col-sm-10');
     } else {
         $width = array('');
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace('%column_size%', wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, $i) . '>';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param['param_name']}) ? ${$param['param_name']} : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace('%column_size%', wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
     }
     return $output;
 }
Пример #10
0
 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = $title = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     // $column_controls_bottom =  $this->getColumnControls('add', 'bottom-controls');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('vc_span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('vc_span3', 'vc_span3', 'vc_span3', 'vc_span3');
         } else {
             if ($width == 'column_13' || $width == '1/3') {
                 $width = array('vc_span4');
             } else {
                 if ($width == 'column_13-23') {
                     $width = array('vc_span4', 'vc_span8');
                 } else {
                     if ($width == 'column_13-13-13') {
                         $width = array('vc_span4', 'vc_span4', 'vc_span4');
                     } else {
                         if ($width == 'column_12' || $width == '1/2') {
                             $width = array('vc_span6');
                         } else {
                             if ($width == 'column_12-12') {
                                 $width = array('vc_span6', 'vc_span6');
                             } else {
                                 if ($width == 'column_23' || $width == '2/3') {
                                     $width = array('vc_span8');
                                 } else {
                                     if ($width == 'column_34' || $width == '3/4') {
                                         $width = array('vc_span9');
                                     } else {
                                         if ($width == 'column_16' || $width == '1/6') {
                                             $width = array('vc_span2');
                                         } else {
                                             $width = array('');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<h4 class="wpb_element_title">' . __("Banner Hero", "js_composer") . '</h4>';
         // $output .= '<div class="wpb_accordion_holder wpb_holder clearfix vc_container_for_children">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, $i) . '>';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
Пример #11
0
 public function contentAdmin($atts, $content = null)
 {
     $title = $output = '';
     extract(shortcode_atts(apply_filters('wmhook_shortcode_' . '_defaults', $this->predefined_atts, 'item'), $atts));
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     $width = array('');
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="group wpb_sortable">';
         $output .= '<h3><span class="tab-label"><%= params.title %></span></h3>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, $i) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, $i) . '>';
         $output .= do_shortcode(shortcode_unautop($content));
         /*
         REMOVED IN v1.0.9.5
         if ( function_exists( 'vc_backend_editor' ) ) {
         //Visual Composer 4.2+
         	$output .= vc_backend_editor()->getLayout()->getContainerHelper();
         } else {
         //Visual Composer 4.2-, legacy support
         	$output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         }
         */
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }