Submit
Path:
~
/
home
/
getwphos
/
public_html
/
brueggemann
/
wp-content
/
plugins
/
js_composer
/
include
/
classes
/
shortcodes
/
File Content:
vc-tta-toggle.php
<?php /** * Class that handles specific [vc_tta_toggle] shortcode. * * @see js_composer/include/templates/shortcodes/vc_tta_toggle.php */ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /** * WPBakery Page Builder shortcodes * * @package WPBakeryPageBuilder * @since 7.0 */ VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_Vc_Tta_Pageable' ); /** * Class WPBakeryShortCode_Vc_Tta_Toggle * Toggle Container shortcode * * @since 7.0 */ class WPBakeryShortCode_Vc_Tta_Toggle extends WPBakeryShortCode_Vc_Tta_Pageable { /** * Unique toggle id * * @var string * @since 7.0 */ public $toggle_id; /** * Editor controls list * * @var string * @since 7.0 */ protected $controls_list = [ 'edit', 'clone', 'copy', 'delete', ]; /** * Template file name * * @return string * @since 7.0 */ public function getFileName() { return 'vc_tta_toggle'; } /** * Toggle is on top only if tabs are at bottom * * @since 7.0 * * @param array $atts * * @return string|null */ public function getParamToggleTop( $atts ) { if ( empty( $atts['tab_position'] ) || 'bottom' !== $atts['tab_position'] ) { return null; } return $this->getParamToggle(); } /** * Toggle is at bottom only if tabs are on top * * @since 7.0 * * @param array $atts * * @return string|null */ public function getParamToggleBottom( $atts ) { if ( empty( $atts['tab_position'] ) || 'top' !== $atts['tab_position'] ) { return null; } return $this->getParamToggle(); } /** * Get toggle html * * @since 7.0 * * @return string */ public function getParamToggle() { VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_Vc_Tta_Toggle_Section' ); $section_info = WPBakeryShortCode_Vc_Tta_Toggle_Section::$section_info; $title_before = ''; $title_after = ''; if ( [] === $section_info ) { $title_before = esc_html__( 'Monthly', 'js_composer' ); $title_after = esc_html__( 'Yearly', 'js_composer' ); } if ( ! empty( $section_info[0]['title'] ) ) { $title_before = esc_html( $section_info[0]['title'] ); } if ( ! empty( $section_info[1]['title'] ) ) { $title_after = esc_html( $section_info[1]['title'] ); } $html = '<div id="' . esc_attr( $this->toggle_id ) . '" class="wpb-tta-toggle-wrapper">'; $html .= '<span class="wpb-tta-toggle-title">' . $title_before . '</span>'; $html .= '<button class="wpb-tta-toggle"></button>'; $html .= '<span class="wpb-tta-toggle-title">' . $title_after . '</span>'; $html .= '</div>'; return $html; } /** * Add wrapper class related to toggle shortcode. * * @since 7.0 * * @return string */ public function getTtaContainerClasses() { $classes = []; $classes[] = 'vc_tta-container'; $classes[] = 'wpb-wrapper-tta-toggle'; $position = isset( $this->atts['tab_position'] ) ? $this->atts['tab_position'] : 'top'; $classes[] = 'wpb-toggle-position-' . $position; return implode( ' ', apply_filters( 'vc_tta_container_classes', array_filter( $classes ), $this->getAtts() ) ); } /** * Get element styles classes attribute. * * @since 7.0 * * @param array $atts * * @return string */ public function getTtaToggleStyle( $atts ) { $color = empty( $atts['color'] ) ? '#5188F1' : $atts['color']; $hover_color = empty( $atts['hover_color'] ) ? '#898989' : esc_attr( $atts['hover_color'] ); $style = '<style>'; $style .= '#' . esc_attr( $this->toggle_id ) . ' .wpb-tta-toggle {background: ' . esc_attr( $color ) . '}'; $style .= '#' . esc_attr( $this->toggle_id ) . ' .wpb-tta-toggle.wpb-tta-toggle-active {background: ' . esc_attr( $hover_color ) . '}'; $style .= '</style>'; return $style; } /** * Get pagination * * @since 7.0 * * @param array $atts * @param string $content * @return string|null */ public function getParamPaginationList( $atts, $content ) { if ( empty( $atts['pagination_style'] ) ) { return null; } $html = []; $html[] = vc_get_template( 'partials/tta-pagination-start.php', [ 'classes' => $this->getTtaPaginationClasses(), ] ); if ( ! vc_is_page_editable() ) { VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_Vc_Tta_Toggle_Section' ); foreach ( WPBakeryShortCode_Vc_Tta_Toggle_Section::$section_info as $nth => $section ) { $active_section = $this->getActiveSection( $atts ); $classes = [ 'vc_pagination-item' ]; $current = $nth + 1; if ( $current === $active_section ) { $classes[] = $this->activeClass; } $html[] = vc_get_template( 'partials/tta-pagination-item.php', [ 'classes' => implode( ' ', $classes ), 'current' => $current, 'section' => $section, ] ); } } $html[] = vc_get_template( 'partials/tta-pagination-end.php' ); return implode( '', $html ); } /** * Set global section info * * @since 7.0 * * @return bool * @throws Exception */ public function setGlobalTtaInfo() { $this->toggle_id = uniqid( 'vc-tta-toggle-' ); $sectionClass = wpbakery()->getShortCode( 'vc_tta_section' )->shortcodeClass(); $this->sectionClass = $sectionClass; // WPBakeryShortCode_Vc_Tta_Toggle_Section $sectionClass. if ( is_object( $sectionClass ) ) { VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_Vc_Tta_Toggle_Section' ); WPBakeryShortCode_Vc_Tta_Toggle_Section::$tta_base_shortcode = $this; WPBakeryShortCode_Vc_Tta_Toggle_Section::$self_count = 0; WPBakeryShortCode_Vc_Tta_Toggle_Section::$section_info = []; return true; } return false; } /** * Get active section * * @since 7.0 * * @param array $atts * @param bool $strict_bounds * @return int */ public function getActiveSection( $atts, $strict_bounds = false ) { $active_section = intval( $atts['active_section'] ); if ( $strict_bounds ) { VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_Vc_Tta_Toggle_Section' ); if ( $active_section < 1 ) { $active_section = 1; } elseif ( $active_section > WPBakeryShortCode_Vc_Tta_Toggle_Section::$self_count ) { $active_section = WPBakeryShortCode_Vc_Tta_Toggle_Section::$self_count; } } return $active_section; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
core
---
0755
paginator
---
0755
layerslider-vc.php
241 bytes
0644
rev-slider-vc.php
309 bytes
0644
vc-accordion-tab.php
4705 bytes
0644
vc-accordion.php
2463 bytes
0644
vc-basic-grid.php
22111 bytes
0644
vc-btn.php
2823 bytes
0644
vc-button.php
639 bytes
0644
vc-button2.php
643 bytes
0644
vc-column-inner.php
391 bytes
0644
vc-column-text.php
446 bytes
0644
vc-column.php
10182 bytes
0644
vc-container-item-base.php
9780 bytes
0644
vc-copyright.php
2278 bytes
0644
vc-cta-button.php
339 bytes
0644
vc-cta.php
5640 bytes
0644
vc-custom-field.php
344 bytes
0644
vc-custom-heading.php
6872 bytes
0644
vc-empty-space.php
313 bytes
0644
vc-facebook.php
1427 bytes
0644
vc-flexbox-container-item.php
827 bytes
0644
vc-flexbox-container.php
9883 bytes
0644
vc-flickr.php
293 bytes
0644
vc-gallery.php
2811 bytes
0644
vc-gitem-animated-block.php
2355 bytes
0644
vc-gitem-col.php
1955 bytes
0644
vc-gitem-image.php
607 bytes
0644
vc-gitem-post-author.php
553 bytes
0644
vc-gitem-post-categories.php
574 bytes
0644
vc-gitem-post-data.php
1418 bytes
0644
vc-gitem-post-date.php
816 bytes
0644
vc-gitem-post-excerpt.php
683 bytes
0644
vc-gitem-post-meta.php
329 bytes
0644
vc-gitem-post-title.php
675 bytes
0644
vc-gitem-row.php
956 bytes
0644
vc-gitem-zone-a.php
588 bytes
0644
vc-gitem-zone-b.php
587 bytes
0644
vc-gitem-zone-c.php
470 bytes
0644
vc-gitem-zone.php
492 bytes
0644
vc-gitem.php
4600 bytes
0644
vc-gmaps.php
289 bytes
0644
vc-goo-maps.php
862 bytes
0644
vc-googleplus.php
1574 bytes
0644
vc-grid-container-item.php
665 bytes
0644
vc-grid-container.php
10244 bytes
0644
vc-gutenberg.php
438 bytes
0644
vc-hoverbox.php
2153 bytes
0644
vc-icon.php
302 bytes
0644
vc-images-carousel.php
2098 bytes
0644
vc-line-chart.php
1016 bytes
0644
vc-masonry-grid.php
1957 bytes
0644
vc-masonry-media-grid.php
1886 bytes
0644
vc-media-grid.php
4222 bytes
0644
vc-message.php
1027 bytes
0644
vc-pie.php
1715 bytes
0644
vc-pinterest.php
1448 bytes
0644
vc-posts-slider.php
316 bytes
0644
vc-pricing-table.php
5657 bytes
0644
vc-progress-bar.php
1554 bytes
0644
vc-raw-html.php
1967 bytes
0644
vc-raw-js.php
1419 bytes
0644
vc-round-chart.php
1024 bytes
0644
vc-row-inner.php
568 bytes
0644
vc-row.php
10059 bytes
0644
vc-section.php
6468 bytes
0644
vc-separator.php
449 bytes
0644
vc-single-image.php
5347 bytes
0644
vc-tab.php
2492 bytes
0644
vc-tabs.php
4136 bytes
0644
vc-text-separator.php
943 bytes
0644
vc-toggle.php
1011 bytes
0644
vc-tour.php
659 bytes
0644
vc-tta-accordion.php
13434 bytes
0644
vc-tta-pageable.php
1465 bytes
0644
vc-tta-section.php
8749 bytes
0644
vc-tta-tabs.php
6042 bytes
0644
vc-tta-toggle-section.php
856 bytes
0644
vc-tta-toggle.php
6279 bytes
0644
vc-tta-tour.php
2277 bytes
0644
vc-tweetmeme.php
1233 bytes
0644
vc-twitter.php
297 bytes
0644
vc-video.php
289 bytes
0644
vc-widget-sidebar.php
325 bytes
0644
vc-zigzag.php
293 bytes
0644
wordpress-widgets.php
669 bytes
0644
N4ST4R_ID | Naxtarrr