Changeset 3277337
- Timestamp:
- 04/19/2025 10:18:55 PM (9 months ago)
- Location:
- custom-iframe
- Files:
-
- 2 deleted
- 8 edited
- 1 copied
-
tags/1.0.9 (copied) (copied from custom-iframe/trunk)
-
tags/1.0.9/assets/js/widget.js (modified) (1 diff)
-
tags/1.0.9/custom-iframe-widget.php (modified) (2 diffs)
-
tags/1.0.9/includes/class-custom-iframe-widget.php (deleted)
-
tags/1.0.9/readme.txt (modified) (2 diffs)
-
tags/1.0.9/widget/class-custom-iframe-widget.php (modified) (2 diffs)
-
trunk/assets/js/widget.js (modified) (1 diff)
-
trunk/custom-iframe-widget.php (modified) (2 diffs)
-
trunk/includes/class-custom-iframe-widget.php (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/widget/class-custom-iframe-widget.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-iframe/tags/1.0.9/assets/js/widget.js
r3272696 r3277337 5 5 var iframe = scope[0].querySelector('.custif-iframe-wrapper > iframe'), 6 6 autoHeight = iframe && iframe.dataset ? iframe.dataset.autoHeight : 0, 7 refreshInterval = autoHeight ? parseInt(iframe.dataset.refreshInterval) : 0;7 refreshInterval = iframe && iframe.dataset ? parseInt(iframe.dataset.refreshInterval) : 0; 8 8 9 9 if (!iframe) { -
custom-iframe/tags/1.0.9/custom-iframe-widget.php
r3273929 r3277337 4 4 * Plugin URI: https://coderzstudio.com/plugins/custom-iframe 5 5 * Description: An advanced Elementor widget to embed iFrames with customizable options. 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: Coderz Studio 8 8 * Author URI: https://coderzstudio.com/ … … 51 51 52 52 // Define constants. 53 define( 'CUSTIF_VERSION', '1.0. 8' );53 define( 'CUSTIF_VERSION', '1.0.9' ); 54 54 define( 'CUSTIF_URL', plugin_dir_url( __FILE__ ) ); 55 55 define( 'CUSTIF_PATH', plugin_dir_path( __FILE__ ) ); 56 56 57 57 // Load required files. 58 require_once CUSTIF_PATH . 'includes/class-assets-manager.php'; 59 require_once CUSTIF_PATH . 'includes/class-notice-manager.php'; 60 require_once CUSTIF_PATH . 'includes/class-widget-manager.php'; 61 require_once CUSTIF_PATH . 'includes/class-embed-handlers-loader.php'; 58 $include_files = glob( CUSTIF_PATH . 'includes/class-*.php' ); 59 60 if ( ! empty( $include_files ) ) { 61 foreach ( $include_files as $file ) { 62 if ( file_exists( $file ) ) { 63 require_once $file; 64 } 65 } 66 } -
custom-iframe/tags/1.0.9/readme.txt
r3273929 r3277337 4 4 Requires at least: 5.8 5 5 Tested up to: 6.7 6 Stable tag: 1.0. 86 Stable tag: 1.0.9 7 7 Requires PHP: 7.4 8 8 License: GPL-2.0+ … … 102 102 == Changelog == 103 103 104 = 1.0.9 (April 20, 2025) = 105 * Fixed: Refresh Interval not working. 106 * Added: New Filter Hook : **custif_iframe_attributes** to add custom attributes. 107 104 108 = 1.0.8 (April 16, 2025) = 105 109 * Updated: Update demo and video URL in admin notice. -
custom-iframe/tags/1.0.9/widget/class-custom-iframe-widget.php
r3272696 r3277337 293 293 'show_scrollbars', 294 294 array( 295 'label' => __( 'Show Scrollbars', 'custom-iframe' ),296 'type' => Controls_Manager::SWITCHER,297 'default' => 'yes',298 'condition' => array(295 'label' => __( 'Show Scrollbars', 'custom-iframe' ), 296 'type' => Controls_Manager::SWITCHER, 297 'default' => 'yes', 298 'condition' => array( 299 299 'source' => 'default', 300 300 ), … … 907 907 } 908 908 909 $iframe_attributes = array( 910 'style' => $placeholder_style, 911 'scrolling' => $settings['show_scrollbars'] ? 'yes' : 'no', 912 'data-auto-height' => $settings['auto_height'], 913 'data-refresh-interval' => $settings['refresh_interval'], 914 'loading' => ! empty( $settings['enable_lazy_load'] ) ? 'lazy' : '', 915 'src' => esc_url( $url ), 916 ); 917 $iframe_attributes = apply_filters( 'custif_iframe_attributes', $iframe_attributes, $settings ); 918 919 $iframe_html = '<iframe'; 920 921 foreach ( $iframe_attributes as $attr => $value ) { 922 if ( '' !== $value && null !== $value ) { 923 $iframe_html .= ' ' . esc_attr( $attr ) . '="' . esc_attr( $value ) . '"'; 924 } 925 } 926 927 $iframe_html .= '></iframe>'; 928 909 929 ?> 910 930 <div class="custif-iframe-wrapper" id="<?php echo esc_attr( $iframe_id ); ?>"> 911 931 <?php if ( ( ! empty( $source ) && 'default' === $source ) || ( 'url' === $pdf_type && ! empty( $settings['pdf_file_link']['url'] ) ) ) : ?> 912 932 <?php if ( ! empty( $url ) ) : ?> 913 <?php if ( filter_var( $url, FILTER_VALIDATE_URL ) ) : ?> 914 <iframe 915 style="<?php echo esc_attr( $placeholder_style ); ?>" 916 scrolling="<?php echo esc_attr( $settings['show_scrollbars'] ? 'yes' : 'no' ); ?>" 917 data-auto-height="<?php echo esc_attr( $settings['auto_height'] ); ?>" 918 data-refresh-interval="<?php echo esc_attr( $settings['refresh_interval'] ); ?>" 919 loading="<?php echo esc_attr( ! empty( $settings['enable_lazy_load'] ) ? 'lazy' : '' ); ?>" 920 src="<?php echo esc_url( $url ); ?>" 921 ></iframe> 922 <?php else : ?> 923 <?php echo $url; ?> 924 <?php endif; ?> 933 <?php 934 if ( filter_var( $url, FILTER_VALIDATE_URL ) ) { 935 echo $iframe_html; 936 } else { 937 echo $url; 938 } 939 ?> 925 940 <?php else : ?> 926 941 <div class="custif-iframe-notice"> -
custom-iframe/trunk/assets/js/widget.js
r3272696 r3277337 5 5 var iframe = scope[0].querySelector('.custif-iframe-wrapper > iframe'), 6 6 autoHeight = iframe && iframe.dataset ? iframe.dataset.autoHeight : 0, 7 refreshInterval = autoHeight ? parseInt(iframe.dataset.refreshInterval) : 0;7 refreshInterval = iframe && iframe.dataset ? parseInt(iframe.dataset.refreshInterval) : 0; 8 8 9 9 if (!iframe) { -
custom-iframe/trunk/custom-iframe-widget.php
r3273929 r3277337 4 4 * Plugin URI: https://coderzstudio.com/plugins/custom-iframe 5 5 * Description: An advanced Elementor widget to embed iFrames with customizable options. 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: Coderz Studio 8 8 * Author URI: https://coderzstudio.com/ … … 51 51 52 52 // Define constants. 53 define( 'CUSTIF_VERSION', '1.0. 8' );53 define( 'CUSTIF_VERSION', '1.0.9' ); 54 54 define( 'CUSTIF_URL', plugin_dir_url( __FILE__ ) ); 55 55 define( 'CUSTIF_PATH', plugin_dir_path( __FILE__ ) ); 56 56 57 57 // Load required files. 58 require_once CUSTIF_PATH . 'includes/class-assets-manager.php'; 59 require_once CUSTIF_PATH . 'includes/class-notice-manager.php'; 60 require_once CUSTIF_PATH . 'includes/class-widget-manager.php'; 61 require_once CUSTIF_PATH . 'includes/class-embed-handlers-loader.php'; 58 $include_files = glob( CUSTIF_PATH . 'includes/class-*.php' ); 59 60 if ( ! empty( $include_files ) ) { 61 foreach ( $include_files as $file ) { 62 if ( file_exists( $file ) ) { 63 require_once $file; 64 } 65 } 66 } -
custom-iframe/trunk/readme.txt
r3273929 r3277337 4 4 Requires at least: 5.8 5 5 Tested up to: 6.7 6 Stable tag: 1.0. 86 Stable tag: 1.0.9 7 7 Requires PHP: 7.4 8 8 License: GPL-2.0+ … … 102 102 == Changelog == 103 103 104 = 1.0.9 (April 20, 2025) = 105 * Fixed: Refresh Interval not working. 106 * Added: New Filter Hook : **custif_iframe_attributes** to add custom attributes. 107 104 108 = 1.0.8 (April 16, 2025) = 105 109 * Updated: Update demo and video URL in admin notice. -
custom-iframe/trunk/widget/class-custom-iframe-widget.php
r3272696 r3277337 293 293 'show_scrollbars', 294 294 array( 295 'label' => __( 'Show Scrollbars', 'custom-iframe' ),296 'type' => Controls_Manager::SWITCHER,297 'default' => 'yes',298 'condition' => array(295 'label' => __( 'Show Scrollbars', 'custom-iframe' ), 296 'type' => Controls_Manager::SWITCHER, 297 'default' => 'yes', 298 'condition' => array( 299 299 'source' => 'default', 300 300 ), … … 907 907 } 908 908 909 $iframe_attributes = array( 910 'style' => $placeholder_style, 911 'scrolling' => $settings['show_scrollbars'] ? 'yes' : 'no', 912 'data-auto-height' => $settings['auto_height'], 913 'data-refresh-interval' => $settings['refresh_interval'], 914 'loading' => ! empty( $settings['enable_lazy_load'] ) ? 'lazy' : '', 915 'src' => esc_url( $url ), 916 ); 917 $iframe_attributes = apply_filters( 'custif_iframe_attributes', $iframe_attributes, $settings ); 918 919 $iframe_html = '<iframe'; 920 921 foreach ( $iframe_attributes as $attr => $value ) { 922 if ( '' !== $value && null !== $value ) { 923 $iframe_html .= ' ' . esc_attr( $attr ) . '="' . esc_attr( $value ) . '"'; 924 } 925 } 926 927 $iframe_html .= '></iframe>'; 928 909 929 ?> 910 930 <div class="custif-iframe-wrapper" id="<?php echo esc_attr( $iframe_id ); ?>"> 911 931 <?php if ( ( ! empty( $source ) && 'default' === $source ) || ( 'url' === $pdf_type && ! empty( $settings['pdf_file_link']['url'] ) ) ) : ?> 912 932 <?php if ( ! empty( $url ) ) : ?> 913 <?php if ( filter_var( $url, FILTER_VALIDATE_URL ) ) : ?> 914 <iframe 915 style="<?php echo esc_attr( $placeholder_style ); ?>" 916 scrolling="<?php echo esc_attr( $settings['show_scrollbars'] ? 'yes' : 'no' ); ?>" 917 data-auto-height="<?php echo esc_attr( $settings['auto_height'] ); ?>" 918 data-refresh-interval="<?php echo esc_attr( $settings['refresh_interval'] ); ?>" 919 loading="<?php echo esc_attr( ! empty( $settings['enable_lazy_load'] ) ? 'lazy' : '' ); ?>" 920 src="<?php echo esc_url( $url ); ?>" 921 ></iframe> 922 <?php else : ?> 923 <?php echo $url; ?> 924 <?php endif; ?> 933 <?php 934 if ( filter_var( $url, FILTER_VALIDATE_URL ) ) { 935 echo $iframe_html; 936 } else { 937 echo $url; 938 } 939 ?> 925 940 <?php else : ?> 926 941 <div class="custif-iframe-notice">
Note: See TracChangeset
for help on using the changeset viewer.