├── .gitignore ├── assets ├── css │ └── fields.css └── js │ └── fields.js ├── downloadButton ├── css │ ├── frontend.css │ └── index.php ├── downloadButton.php ├── includes │ ├── frontend.php │ └── index.php ├── index.php └── js │ ├── index.php │ └── settings.js ├── fl-twistermc-modules.php ├── fullImage ├── fullImage.php └── includes │ ├── frontend.css.php │ └── frontend.php ├── pdf-select ├── index.php ├── pdf_select.css ├── pdf_select.js └── pdf_select.php ├── readme.md ├── slick ├── css │ ├── frontend.css │ ├── frontend.responsive.css │ └── settings.css ├── includes │ ├── frontend.css.php │ ├── frontend.js.php │ ├── frontend.php │ └── settings-example.php ├── js │ ├── frontend.js │ ├── froogaloop2.min.js │ ├── settings.js │ └── slick.js └── slick.php └── youtube-videos ├── class-youtube-videos.php ├── css ├── frontend.css └── index.php ├── includes ├── frontend.php └── index.php ├── index.php └── js ├── index.php └── settings.js /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | wp-config.php 3 | wp-content/advanced-cache.php 4 | wp-content/backup-db/ 5 | wp-content/backups/ 6 | wp-content/blogs.dir/ 7 | wp-content/cache/ 8 | wp-content/upgrade/ 9 | wp-content/uploads/ 10 | wp-content/wp-cache-config.php 11 | wp-content/plugins/hello.php 12 | 13 | /.htaccess 14 | /license.txt 15 | /readme.html 16 | /sitemap.xml 17 | /sitemap.xml.gz 18 | /.idea/* 19 | 20 | 21 | # Created by https://www.gitignore.io/api/macos,phpstorm 22 | 23 | ### macOS ### 24 | *.DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must end with two \r 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | .com.apple.timemachine.donotpresent 42 | 43 | # Directories potentially created on remote AFP share 44 | .AppleDB 45 | .AppleDesktop 46 | Network Trash Folder 47 | Temporary Items 48 | .apdisk 49 | 50 | ### PhpStorm ### 51 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 52 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 53 | 54 | # User-specific stuff: 55 | .idea/**/workspace.xml 56 | .idea/**/tasks.xml 57 | .idea/dictionaries 58 | 59 | # Sensitive or high-churn files: 60 | .idea/**/dataSources/ 61 | .idea/**/dataSources.ids 62 | .idea/**/dataSources.xml 63 | .idea/**/dataSources.local.xml 64 | .idea/**/sqlDataSources.xml 65 | .idea/**/dynamic.xml 66 | .idea/**/uiDesigner.xml 67 | 68 | # Gradle: 69 | .idea/**/gradle.xml 70 | .idea/**/libraries 71 | 72 | # CMake 73 | cmake-build-debug/ 74 | 75 | # Mongo Explorer plugin: 76 | .idea/**/mongoSettings.xml 77 | 78 | ## File-based project format: 79 | *.iws 80 | 81 | ## Plugin-specific files: 82 | 83 | # IntelliJ 84 | /out/ 85 | 86 | # mpeltonen/sbt-idea plugin 87 | .idea_modules/ 88 | 89 | # JIRA plugin 90 | atlassian-ide-plugin.xml 91 | 92 | # Cursive Clojure plugin 93 | .idea/replstate.xml 94 | 95 | # Crashlytics plugin (for Android Studio and IntelliJ) 96 | com_crashlytics_export_strings.xml 97 | crashlytics.properties 98 | crashlytics-build.properties 99 | fabric.properties 100 | 101 | ### PhpStorm Patch ### 102 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 103 | 104 | # *.iml 105 | # modules.xml 106 | # .idea/misc.xml 107 | # *.ipr 108 | 109 | # Sonarlint plugin 110 | .idea/sonarlint 111 | 112 | # End of https://www.gitignore.io/api/macos,phpstorm 113 | 114 | -------------------------------------------------------------------------------- /assets/css/fields.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TwisterMc/twistermc-bb-modules/acd1dc9add8498d66985f16f646eedb0292c9a9c/assets/css/fields.css -------------------------------------------------------------------------------- /assets/js/fields.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TwisterMc/twistermc-bb-modules/acd1dc9add8498d66985f16f646eedb0292c9a9c/assets/js/fields.js -------------------------------------------------------------------------------- /downloadButton/css/frontend.css: -------------------------------------------------------------------------------- 1 | .fl-builder-content a.mix-flexbox { 2 | display: inline-flex; 3 | align-items: center; 4 | } 5 | -------------------------------------------------------------------------------- /downloadButton/css/index.php: -------------------------------------------------------------------------------- 1 | __( 'Download Button', 'fl-builder' ), 23 | 'description' => __( 'Displays a button for downloading files.', 'fl-builder' ), 24 | 'category' => __( 'Advanced Modules', 'fl-builder' ), 25 | 'partial_refresh' => true, 26 | 'dir' => TMC_BB_DIR . 'downloadButton/', 27 | 'url' => TMC_BB_URL . 'downloadButton/', 28 | 'editor_export' => true, // Defaults to true and can be omitted. 29 | 'enabled' => true, // Defaults to true and can be omitted. 30 | ) 31 | ); 32 | } 33 | 34 | /** 35 | * Register the module and its form settings with Beaver Builder. 36 | * 37 | * What's implied, but not specifically stated, is that BB handles the instantiation of the object. 38 | * 39 | * @see \FLBuilderModel::register_module() 40 | * 41 | * @action init 42 | */ 43 | } 44 | FLBuilder::register_module( 45 | 'DownloadButton', 46 | array( 47 | 'general' => array( 48 | 'title' => __( 'General', 'fl-builder' ), 49 | 'sections' => array( 50 | 'general' => array( 51 | 'title' => __( 'Settings', 'fl-builder' ), 52 | 'fields' => array( 53 | 'pdf_url' => array( 54 | 'type' => 'zestsms-pdf', 55 | 'label' => __( 'PDF', 'fl-builder' ), 56 | 'show_remove' => true, 57 | ), 58 | 'pdf_icon' => array( 59 | 'type' => 'icon', 60 | 'label' => __( 'Icon', 'fl-builder' ), 61 | 'show_remove' => true, 62 | ), 63 | 'pdf_title' => array( 64 | 'type' => 'text', 65 | 'label' => __( 'Link Text', 'fl-builder' ), 66 | 'default' => '', 67 | 'placeholder' => __( 'My Great PDF', 'fl-builder' ), 68 | ), 69 | ), 70 | ), 71 | ), 72 | ), 73 | ) 74 | ); 75 | 76 | 77 | -------------------------------------------------------------------------------- /downloadButton/includes/frontend.php: -------------------------------------------------------------------------------- 1 | node ). 13 | * @var stdClass $settings The module's settings ( i.e. $module->settings ). 14 | */ 15 | 16 | // If this file is called directly, abort. 17 | if ( ! defined( 'ABSPATH' ) ) { 18 | die; 19 | } 20 | 21 | $pdf_title = 'PDF'; 22 | if ( $settings->pdf_title ) { 23 | $pdf_title = $settings->pdf_title; 24 | } 25 | 26 | $pdf_url = wp_get_attachment_url( $settings->pdf_url ); 27 | 28 | ?> 29 | 30 | 31 | pdf_icon ) { ?> 32 |
33 | 34 | 35 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /downloadButton/includes/index.php: -------------------------------------------------------------------------------- 1 | 0, 43 | 'byline' => 0, 44 | 'portrait' => 0, 45 | 'badge' => 0, 46 | //'autoplay' => 1, 47 | 'loop' => 1, 48 | 'transparent' => 0, 49 | ); 50 | $provider = add_query_arg( $args, $provider ); 51 | } 52 | return $provider; 53 | } 54 | 55 | // Forked from Badabing and https://github.com/ZestSMS/BB-PDF-field 56 | 57 | define( 'BBEXTRA_FIELDS_VERSION' , '1.1' ); 58 | define( 'BBEXTRA_FIELDS_DIR', plugin_dir_path( __FILE__ ) ); 59 | define( 'BBEXTRA_FIELDS_URL', plugins_url( '/', __FILE__ ) ); 60 | 61 | function BBEXTRA_extra_fields() { 62 | 63 | if ( class_exists( 'FLBuilder' ) ) { 64 | require_once ( 'pdf-select/pdf_select.php' ); 65 | } 66 | } 67 | 68 | add_action( 'init', 'BBEXTRA_extra_fields' ); 69 | 70 | // Create a dummy class so we can do a quick test when loading custom modules 71 | // if ( ! class_exists ( bbExtraFields ) ) { return; } 72 | class bbExtraFields { } 73 | -------------------------------------------------------------------------------- /fullImage/fullImage.php: -------------------------------------------------------------------------------- 1 | __('Full Image', 'fl-builder'), 18 | 'description' => __('Full Width Image', 'fl-builder'), 19 | 'category' => __('Advanced Modules', 'fl-builder'), 20 | 'dir' => TMC_BB_DIR . 'fullImage/', 21 | 'url' => TMC_BB_URL . 'fullImage/', 22 | 'editor_export' => true, // Defaults to true and can be omitted. 23 | 'enabled' => true, // Defaults to true and can be omitted. 24 | )); 25 | 26 | /** 27 | * Use these methods to enqueue css and js already 28 | * registered or to register and enqueue your own. 29 | */ 30 | // Already registered 31 | $this->add_css('font-awesome'); 32 | } 33 | 34 | /** 35 | * Use this method to work with settings data before 36 | * it is saved. You must return the settings object. 37 | * 38 | * @method update 39 | * @param $settings {object} 40 | */ 41 | public function update($settings) 42 | { 43 | $settings->textarea_field .= ' - this text was appended in the update method.'; 44 | 45 | return $settings; 46 | } 47 | 48 | /** 49 | * This method will be called by the builder 50 | * right before the module is deleted. 51 | * 52 | * @method delete 53 | */ 54 | public function delete() 55 | { 56 | 57 | } 58 | 59 | /** 60 | * Add additional methods to this class for use in the 61 | * other module files such as preview.php, frontend.php 62 | * and frontend.css.php. 63 | * 64 | * 65 | * @method example_method 66 | */ 67 | public function example_method() 68 | { 69 | 70 | } 71 | } 72 | 73 | /** 74 | * Register the module and its form settings. 75 | */ 76 | FLBuilder::register_module('BBFullImage', array( 77 | 'general' => array( // Tab 78 | 'title' => __('Full Image', 'fl-builder'), // Tab title 79 | 'sections' => array( // Tab Sections 80 | 'general' => array( // Section 81 | 'title' => __('Photo Settings', 'fl-builder'), // Section Title 82 | 'fields' => array( // Section Fields 83 | 'photo_field' => array( 84 | 'type' => 'photo', 85 | 'label' => __('Photo', 'fl-builder'), 86 | ), 87 | 'forceImageSize' => array( 88 | 'type' => 'select', 89 | 'label' => __('Force Image to Full Width', 'fl-builder'), 90 | 'default' => 'true', 91 | 'options' => array( 92 | 'true' => __('Yes', 'fl-builder'), 93 | 'false' => __('No', 'fl-builder') 94 | ), 95 | 'toggle' => array( 96 | 'false' => array( 97 | 'fields' => array( 'imageAlign' ), 98 | ), 99 | ) 100 | ), 101 | 'imageAlign' => array( 102 | 'type' => 'select', 103 | 'label' => __('Image Align', 'fl-builder'), 104 | 'default' => 'left', 105 | 'options' => array( 106 | 'left' => __('Left', 'fl-builder'), 107 | 'center' => __('Center', 'fl-builder'), 108 | 'right' => __('Right', 'fl-builder') 109 | ) 110 | ), 111 | 'showCaption' => array( 112 | 'type' => 'select', 113 | 'label' => __('Show Caption', 'fl-builder'), 114 | 'default' => 'false', 115 | 'options' => array( 116 | 'true' => __('Yes', 'fl-builder'), 117 | 'false' => __('No', 'fl-builder') 118 | ), 119 | 'toggle' => array( 120 | 'true' => array( 121 | 'sections' => array( 'captionStyle' ), 122 | ), 123 | ) 124 | ), 125 | ) 126 | ), 127 | 'captionStyle' => array( // Section 128 | 'title' => __('Caption Style', 'fl-builder'), // Section Title 129 | 'fields' => array( // Section Fields 130 | 'captionSize' => array( 131 | 'type' => 'text', 132 | 'size' => 3, 133 | 'label' => __('Caption Text Size', 'fl-builder'), 134 | 'default' => 14, 135 | 'description' => 'px' 136 | ), 137 | 'captionAlign' => array( 138 | 'type' => 'select', 139 | 'label' => __('Text Align', 'fl-builder'), 140 | 'default' => 'center', 141 | 'options' => array( 142 | 'left' => __('Left', 'fl-builder'), 143 | 'center' => __('Center', 'fl-builder'), 144 | 'right' => __('Right', 'fl-builder') 145 | ) 146 | ), 147 | 'captionColor' => array( 148 | 'type' => 'color', 149 | 'label' => __('Caption Text Color', 'fl-builder'), 150 | 'default' => 'ffffff' 151 | ), 152 | 'captionBackgroundColor' => array( 153 | 'type' => 'color', 154 | 'label' => __('Caption Background Color', 'fl-builder'), 155 | 'default' => '333333', 156 | 'show_reset' => true 157 | ), 158 | 'captionPadding' => array( 159 | 'type' => 'text', 160 | 'size' => 3, 161 | 'label' => __('Caption Padding', 'fl-builder'), 162 | 'default' => 5, 163 | 'description' => 'px' 164 | ), 165 | ) 166 | ) 167 | ) 168 | ), 169 | 'link' => array( // Tab 170 | 'title' => __('Link', 'fl-builder'), // Tab title 171 | 'sections' => array( // Tab Sections 172 | 'general-link' => array( // Section 173 | 'title' => __('Link', 'fl-builder'), // Section Title 174 | 'fields' => array( // Section Fields 175 | 'linkImage' => array( 176 | 'type' => 'select', 177 | 'label' => __('Link Image', 'fl-builder'), 178 | 'default' => 'false', 179 | 'options' => array( 180 | 'true' => __('Yes', 'fl-builder'), 181 | 'false' => __('No', 'fl-builder') 182 | ), 183 | 'toggle' => array( 184 | 'true' => array( 185 | 'sections' => array( 'linkdetails' ), 186 | ), 187 | ) 188 | ), 189 | ) 190 | ), 191 | 'linkdetails' => array( // Section 192 | 'title' => __('Link Details'), // Section Title 193 | 'fields' => array( // Section Fields 194 | 'linkurl' => array( 195 | 'type' => 'link', 196 | 'label' => __('Link', 'fl-builder'), 197 | ), 198 | 'linktarget' => array( 199 | 'type' => 'select', 200 | 'label' => __('Target', 'fl-builder'), 201 | 'default' => '_self', 202 | 'options' => array( 203 | '_self' => __('Same Window', 'fl-builder'), 204 | '_blank' => __('New Window', 'fl-builder'), 205 | ) 206 | ), 207 | ) 208 | ) 209 | ) 210 | ), 211 | )); -------------------------------------------------------------------------------- /fullImage/includes/frontend.css.php: -------------------------------------------------------------------------------- 1 | /** 2 | * This file should contain frontend styles that 3 | * will be applied to individual module instances. 4 | * 5 | * You have access to three variables in this file: 6 | * 7 | * $module An instance of your module class. 8 | * $id The module's ID. 9 | * $settings The module's settings. 10 | * 11 | * Example: 12 | */ 13 | 14 | forceImageSize == 'true') { ?> 15 | .fl-node- .tm_bb_fullImage img { 16 | width: 100%; 17 | height: auto; 18 | } 19 | 20 | .fl-node- .tm_bb_fullImage { 21 | text-align: imageAlign; ?>; 22 | } 23 | 24 | 25 | showCaption == 'true') { 26 | if ($settings->captionBackgroundColor == '') { 27 | $backgroundColor = 'transparent'; 28 | } else { 29 | $backgroundColor = '#' . $settings->captionBackgroundColor; 30 | } 31 | 32 | if ($settings->captionPadding == '') { 33 | $captionPadding = '0'; 34 | } else { 35 | $captionPadding = $settings->captionPadding; 36 | } 37 | 38 | ?> 39 | .fl-node- .tm_bb_fullImage_caption { 40 | padding: px; 41 | background: ; 42 | text-align: captionAlign; ?>; 43 | color: #captionColor; ?>; 44 | font-size: captionSize; ?>px; 45 | } 46 | -------------------------------------------------------------------------------- /fullImage/includes/frontend.php: -------------------------------------------------------------------------------- 1 | photo_field); 14 | $image_caption = $image->post_excerpt; 15 | 16 | ?> 17 | 18 |
19 | linkImage == 'true' && $settings->linkurl != '') { echo ''; } ?> 20 | photo_field, $size = 'full', $icon = false, $attr = '' ); ?> 21 | linkImage == 'true') { echo ''; } ?> 22 |
23 | 24 | showCaption == 'true') { ?> 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /pdf-select/index.php: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | filename; ?> 19 | 20 |
21 | 22 |
23 | 24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 |
32 | example_method(); ?> 15 | 16 | .tmc_isVisibilyHidden { 17 | width: 1px; 18 | height: 1px; 19 | margin: -1px; 20 | padding: 0; 21 | border: 0; 22 | position: absolute; 23 | clip: rect(0 0 0 0); 24 | overflow: hidden; 25 | } 26 | 27 | /* --------------------------------------------------------------------- 28 | Slick 29 | ------------------------------------------------------------------------ */ 30 | 31 | .slickModule_bb { 32 | position: relative; 33 | } 34 | 35 | .slickModule_bb button, 36 | .slickModule_bb button:hover, 37 | .slickModule_bb button:active, 38 | .slick-active button, 39 | .slick-active button:focus, 40 | .slick-active button:active { 41 | border: none; 42 | } 43 | 44 | .fl-node- .slick-arrow, 45 | .fl-node- .slickModule_bb_Pause { 46 | arrowBackgroundColor != '') { ?>background: #arrowBackgroundColor; ?>; background: transparent; 47 | color: #arrowColor; ?>; 48 | } 49 | 50 | .fl-node- .slick-arrow:before, 51 | .fl-node- .slickModule_bb_Pause:before { 52 | font-size: arrowSize; ?>px; 53 | } 54 | 55 | .fl-node- .slick-arrow:hover, 56 | .fl-node- .slickModule_bb_Pause:hover { 57 | arrowHoverBackgroundColor != '') { ?>background: #arrowHoverBackgroundColor; ?>; background: transparent; 58 | color: #arrowHoverColor; ?>; 59 | } 60 | 61 | /* --------------------------------------------------------------------- 62 | Dots 63 | ------------------------------------------------------------------------ */ 64 | .slickModule_bb .slick-dots { 65 | text-align: center; 66 | } 67 | 68 | .slickModule_bb .slick-dots li { 69 | display: inline-block; 70 | padding: 5px 5px; 71 | } 72 | 73 | .fl-node- .slick-dots button { 74 | dotBackgroundColor != '') { ?>background: #dotBackgroundColor; ?>; background: transparent; 75 | color: #dotColor; ?>; 76 | font-size: dotSize; ?>px; 77 | 78 | } 79 | 80 | .fl-node- .slick-dots button:hover { 81 | dotHoverBackgroundColor != '') { ?>background: #dotHoverBackgroundColor; ?>; background: transparent; 82 | color: #dotHoverColor; ?>; 83 | } 84 | 85 | .fl-node- .slick-active button { 86 | dotActiveBackgroundColor != '') { ?>background: #dotActiveBackgroundColor; ?>; background: transparent; 87 | color: #dotActiveColor; ?>; 88 | } 89 | 90 | /* --------------------------------------------------------------------- 91 | Play/Pause 92 | ------------------------------------------------------------------------ */ 93 | 94 | .slickModule_bb_Pause, 95 | .slickModule_bb_Pause:active, 96 | .slickModule_bb_Pause:focus { 97 | position: absolute; 98 | top: 10px; 99 | right: 10px; 100 | z-index: 10; 101 | } 102 | 103 | /* --------------------------------------------------------------------- 104 | Arrows 105 | ------------------------------------------------------------------------ */ 106 | 107 | .slickModule_bb .slick-arrow, 108 | .slickModule_bb .slick-arrow:active, 109 | .slickModule_bb .slick-arrow:focus { 110 | position: absolute; 111 | top: 40%; 112 | z-index: 10; 113 | } 114 | 115 | .slickModule_bb .slick-arrow.slick-prev { 116 | left: 10px; 117 | } 118 | 119 | .slickModule_bb .slick-arrow.slick-next { 120 | right: 10px; 121 | } 122 | 123 | forceImageSize == 'false') { ?> 124 | .fl-node- .slick-slide img { 125 | object-fit: contain; 126 | } 127 | 128 | 129 | forceImageSize == 'true' ) { ?> 130 | /* --------------------------------------------------------------------- 131 | Force Image Size 132 | ------------------------------------------------------------------------ */ 133 | .fl-node- .slick-slide img { 134 | width: 100%; 135 | height: auto; 136 | } 137 | 138 | 139 | showCaptions == 'true') { ?> 140 | /* --------------------------------------------------------------------- 141 | Photo Captions 142 | ------------------------------------------------------------------------ */ 143 | .fl-node- .slickPhotoCaption { 144 | background-color: #000; 145 | padding: 10px; 146 | text-align: center; 147 | color: #fff; 148 | } 149 | 150 | 151 | adaptiveHeight == 'false') { ?> 152 | /* --------------------------------------------------------------------- 153 | Fixed Height Size 154 | ------------------------------------------------------------------------ */ 155 | .fl-node- .slick-slide { 156 | height: fixedHeightSize; ?>px; 157 | } 158 | 159 | .fl-node- .slick-slide img { 160 | max-height: 100%; 161 | } 162 | 163 | 164 | /* --------------------------------------------------------------------- 165 | Embeds 166 | ------------------------------------------------------------------------ */ 167 | .videoWrapper { 168 | position: relative; 169 | padding-bottom: 56.25%; 170 | height: 0; 171 | overflow: hidden; 172 | max-width: 100%; 173 | } 174 | .videoWrapper iframe { 175 | position: absolute; 176 | top: 0; 177 | left: 0; 178 | width: 100%; 179 | height: 100%; 180 | } 181 | -------------------------------------------------------------------------------- /slick/includes/frontend.js.php: -------------------------------------------------------------------------------- 1 | /** 2 | * This file should contain frontend JavaScript that 3 | * will be applied to individual module instances. 4 | * 5 | * You have access to three variables in this file: 6 | * 7 | * $module An instance of your module class. 8 | * $id The module's ID. 9 | * $settings The module's settings. 10 | * 11 | * Example: 12 | */ 13 | 14 | (function($){ 15 | 16 | var $slickSlider_bb = $(".fl-node- .slickWrapper_bb"); 17 | var $slickSlider_bb_pauseButton = $(".fl-node- .js-slickModule_bb_Pause"); 18 | var $slickSlider_bb_autoplay = autoPlay; ?>; 19 | var $slickSlider_bb_autoplaySpeed = autoPlaySpeed; ?>; 20 | var $slickSlider_bb_adaptiveHeight = adaptiveHeight; ?>; 21 | var $slickSlider_bb_arrows = arrows; ?>; 22 | var $slickSlider_bb_dots = dots; ?>; 23 | var $slickSlider_bb_pauseOnHover = pauseOnHover; ?>; 24 | var $slickSlider_bb_pauseOnDotsHover = pauseOnDotsHover; ?>; 25 | var $slickSlider_bb_variableWidth = variableWidth; ?>; 26 | var $slickSlider_bb_centerMode = centerMode; ?>; 27 | var $slickSlider_bb_fade = fade; ?>; 28 | var $slickSlider_bb_infinite = infinite; ?>; 29 | var $slickSlider_bb_slidesToShow = slidesToShow; ?>; 30 | var $slickSlider_bb_slidesToScroll = slidesToScroll; ?>; 31 | var $slickSlider_bb_oneSlide = oneSlide; ?>; 32 | var $slickSlider_bb_verticalCarousel = verticalCarousel; ?>; 33 | 34 | photoVideo === 'video' && $settings->autoplay_videos === 'true' && !FLBuilderModel::is_builder_active()) { ?> 35 | $slickSlider_bb.on('init', function(event, slick){ 36 | var srcVideo = $("iframe", slick.$slides[0])[0].src; 37 | isYouTubeVideo = srcVideo.includes('youtube'); 38 | isVimeoVideo = srcVideo.includes('vimeo'); 39 | 40 | function callback(isYouTubeVideo,isVimeoVideo){ 41 | // YouTube 42 | if (isYouTubeVideo == true) { 43 | $("iframe", slick.$slides[0])[0].contentWindow.postMessage('{"event":"command","func":"' + 'playVideo' + '","args":""}', '*'); 44 | } 45 | 46 | // Vimeo 47 | if (isVimeoVideo == true) { 48 | var iframe = $("iframe", slick.$slides[0])[0]; 49 | var player = $f(iframe); 50 | player.api('play'); 51 | } 52 | 53 | } 54 | /* Attempt to auto play the first slide video. */ 55 | setTimeout(function() { 56 | callback(isYouTubeVideo,isVimeoVideo); 57 | }, 5000); 58 | }); 59 | 60 | 61 | /* we have to setup the slider based on the number of slides we're showing and scrolling */ 62 | if ($slickSlider_bb_oneSlide == true) { 63 | $slickSlider_bb.slick({ 64 | autoplay: $slickSlider_bb_autoplay, 65 | autoplaySpeed: $slickSlider_bb_autoplaySpeed, 66 | arrows: $slickSlider_bb_arrows, 67 | dots: $slickSlider_bb_dots, 68 | pauseOnHover: $slickSlider_bb_pauseOnHover, 69 | pauseOnDotsHover: $slickSlider_bb_pauseOnDotsHover, 70 | vertical: $slickSlider_bb_verticalCarousel, 71 | infinite: $slickSlider_bb_infinite, 72 | adaptiveHeight: $slickSlider_bb_adaptiveHeight 73 | }); 74 | } else { 75 | $slickSlider_bb.slick({ 76 | autoplay: $slickSlider_bb_autoplay, 77 | autoplaySpeed: $slickSlider_bb_autoplaySpeed, 78 | arrows: $slickSlider_bb_arrows, 79 | dots: $slickSlider_bb_dots, 80 | pauseOnHover: $slickSlider_bb_pauseOnHover, 81 | pauseOnDotsHover: $slickSlider_bb_pauseOnDotsHover, 82 | vertical: $slickSlider_bb_verticalCarousel, 83 | infinite: $slickSlider_bb_infinite, 84 | slidesToShow: $slickSlider_bb_slidesToShow, 85 | slidesToScroll: $slickSlider_bb_slidesToScroll, 86 | variableWidth: $slickSlider_bb_variableWidth, 87 | centerMode: $slickSlider_bb_centerMode 88 | }); 89 | } 90 | 91 | $ss_nextArrow = ''; 92 | $ss_prevArrow = ''; 93 | $ss_downArrow = ''; 94 | $ss_upArrow = ''; 95 | 96 | 97 | /* only use fade setting when using a horizontal carousel */ 98 | if ($slickSlider_bb_verticalCarousel == false) { 99 | $slickSlider_bb.slick("slickSetOption", "fade", $slickSlider_bb_fade, false); 100 | $slickSlider_bb.slick("slickSetOption", "nextArrow", $ss_nextArrow, true); 101 | $slickSlider_bb.slick("slickSetOption", "prevArrow", $ss_prevArrow, true); 102 | } else { 103 | $slickSlider_bb.slick("slickSetOption", "nextArrow", $ss_downArrow, true); 104 | $slickSlider_bb.slick("slickSetOption", "prevArrow", $ss_upArrow, true); 105 | } 106 | 107 | if ($slickSlider_bb_autoplay === false) { 108 | $slickSlider_bb_pauseButton.addClass('paused'); 109 | $slickSlider_bb_pauseButton.addClass('fa-play-circle'); 110 | $slickSlider_bb_pauseButton.removeClass('fa-pause-circle'); 111 | } 112 | 113 | $slickSlider_bb_pauseButton.on( "click", function() { 114 | if ($slickSlider_bb_pauseButton.hasClass('paused')) { 115 | $slickSlider_bb_pauseButton.removeClass('paused'); 116 | $slickSlider_bb_pauseButton.removeClass('fa-play-circle'); 117 | $slickSlider_bb_pauseButton.addClass('fa-pause-circle'); 118 | $slickSlider_bb.slick('slickPlay'); 119 | } else { 120 | $slickSlider_bb_pauseButton.addClass('paused'); 121 | $slickSlider_bb_pauseButton.addClass('fa-play-circle'); 122 | $slickSlider_bb_pauseButton.removeClass('fa-pause-circle'); 123 | $slickSlider_bb.slick('slickPause'); 124 | } 125 | 126 | }); 127 | 128 | photoVideo === 'video') { ?> 129 | /* --------------------------------------------------------------------- 130 | Pause videos when changing slides 131 | Author: Thomas McMahon 132 | ------------------------------------------------------------------------ */ 133 | $slickSlider_bb.on('beforeChange', function(event, slick, currentSlide, nextSlide){ 134 | $('iframe').each(function(){ 135 | var srcVideo = $(this)[0].src; 136 | isYouTubeVideo = srcVideo.includes('youtube'); 137 | isVimeoVideo = srcVideo.includes('vimeo'); 138 | 139 | // YouTube 140 | if (isYouTubeVideo == true) { 141 | $(this)[0].contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*'); 142 | } 143 | 144 | // Vimeo 145 | if (isVimeoVideo == true) { 146 | var iframe = $(this)[0]; 147 | var player = $f(iframe); 148 | player.api('pause'); 149 | } 150 | }); 151 | }); 152 | 153 | /* --------------------------------------------------------------------- 154 | Auto play current slide video 155 | Author: Thomas McMahon 156 | ------------------------------------------------------------------------ */ 157 | autoplay_videos === 'true') { ?> 158 | $slickSlider_bb.on('afterChange', function(event, slick, currentSlide, nextSlide){ 159 | var srcVideo = $("iframe", slick.$slides[currentSlide])[0].src; 160 | isYouTubeVideo = srcVideo.includes('youtube'); 161 | isVimeoVideo = srcVideo.includes('vimeo'); 162 | 163 | // YouTube 164 | if (isYouTubeVideo == true) { 165 | $("iframe", slick.$slides[currentSlide])[0].contentWindow.postMessage('{"event":"command","func":"' + 'playVideo' + '","args":""}', '*'); 166 | } 167 | 168 | // Vimeo 169 | if (isVimeoVideo == true) { 170 | var iframe = $("iframe", slick.$slides[currentSlide])[0]; 171 | var player = $f(iframe); 172 | player.api('play'); 173 | } 174 | 175 | }); 176 | 177 | 178 | 179 | 180 | })(jQuery); 181 | -------------------------------------------------------------------------------- /slick/includes/frontend.php: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
17 | photoVideo === 'photo' ) { 20 | $arr = $settings->multiple_photos_field; 21 | if ( is_array( $arr ) ) { 22 | foreach ( $arr as &$value ) { 23 | echo '
  • '; 24 | echo wp_get_attachment_image( $value, 'large', '', array( 'class' => 'img-responsive' ) ); 25 | 26 | if ( $settings->showCaptions === 'true' ) { 27 | $imageInfo = get_post( $value ); 28 | echo '
    ' . $imageInfo->post_excerpt . '
    '; 29 | } 30 | 31 | echo '
  • '; 32 | } 33 | } 34 | } else { 35 | $arr = $settings->multiple_video_field; 36 | foreach ( $arr as &$value ) { 37 | echo '
  • '; 38 | echo '
    '; 39 | $embed_code = wp_oembed_get( $value ); 40 | echo $embed_code; 41 | echo '
    '; 42 | echo '
  • '; 43 | } 44 | } 45 | ?> 46 |
    47 | 48 |
    49 | 50 | -------------------------------------------------------------------------------- /slick/includes/settings-example.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    4 | 5 |

    6 | 7 | 8 | 9 | 10 | 13 | 14 |
    11 | 12 |
    15 | 16 |
    -------------------------------------------------------------------------------- /slick/js/frontend.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file should contain frontend logic for 3 | * all module instances. 4 | */ -------------------------------------------------------------------------------- /slick/js/froogaloop2.min.js: -------------------------------------------------------------------------------- 1 | var Froogaloop=function(){function e(a){return new e.fn.init(a)}function g(a,c,b){if(!b.contentWindow.postMessage)return!1;a=JSON.stringify({method:a,value:c});b.contentWindow.postMessage(a,h)}function l(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(e){}"ready"!=b||k||(k=!0);if(!/^https?:\/\/player.vimeo.com/.test(a.origin))return!1;"*"===h&&(h=a.origin);a=c.value;var m=c.data,f=""===f?null:c.player_id;c=f?d[f][b]:d[b];b=[];if(!c)return!1;void 0!==a&&b.push(a);m&&b.push(m);f&&b.push(f); 2 | return 0 'form'. 59 | // */ 60 | // FLBuilder._registerModuleHelper('example_settings_form', { 61 | // 62 | // rules: { 63 | // example: { 64 | // required: true 65 | // } 66 | // }, 67 | // 68 | // init: function() 69 | // { 70 | // 71 | // }, 72 | // 73 | // submit: function() 74 | // { 75 | // var result = confirm('Do you really want to save this form?'); 76 | // 77 | // return result; 78 | // } 79 | // }); 80 | // 81 | // })(jQuery); -------------------------------------------------------------------------------- /slick/js/slick.js: -------------------------------------------------------------------------------- 1 | /* 2 | _ _ _ _ 3 | ___| (_) ___| | __ (_)___ 4 | / __| | |/ __| |/ / | / __| 5 | \__ \ | | (__| < _ | \__ \ 6 | |___/_|_|\___|_|\_(_)/ |___/ 7 | |__/ 8 | 9 | Version: 1.6.0 10 | Author: Ken Wheeler 11 | Website: http://kenwheeler.github.io 12 | Docs: http://kenwheeler.github.io/slick 13 | Repo: http://github.com/kenwheeler/slick 14 | Issues: http://github.com/kenwheeler/slick/issues 15 | 16 | */ 17 | /* global window, document, define, jQuery, setInterval, clearInterval */ 18 | (function(factory) { 19 | 'use strict'; 20 | if (typeof define === 'function' && define.amd) { 21 | define(['jquery'], factory); 22 | } else if (typeof exports !== 'undefined') { 23 | module.exports = factory(require('jquery')); 24 | } else { 25 | factory(jQuery); 26 | } 27 | 28 | }(function($) { 29 | 'use strict'; 30 | var Slick = window.Slick || {}; 31 | 32 | Slick = (function() { 33 | 34 | var instanceUid = 0; 35 | 36 | function Slick(element, settings) { 37 | 38 | var _ = this, dataSettings; 39 | 40 | _.defaults = { 41 | accessibility: true, 42 | adaptiveHeight: false, 43 | appendArrows: $(element), 44 | appendDots: $(element), 45 | arrows: true, 46 | asNavFor: null, 47 | prevArrow: '', 48 | nextArrow: '', 49 | autoplay: false, 50 | autoplaySpeed: 3000, 51 | centerMode: false, 52 | centerPadding: '50px', 53 | cssEase: 'ease', 54 | customPaging: function(slider, i) { 55 | return $('