Plugin Directory

Changeset 3277337


Ignore:
Timestamp:
04/19/2025 10:18:55 PM (9 months ago)
Author:
coderzstudio
Message:

release version 1.0.9

Location:
custom-iframe
Files:
2 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • custom-iframe/tags/1.0.9/assets/js/widget.js

    r3272696 r3277337  
    55        var iframe = scope[0].querySelector('.custif-iframe-wrapper > iframe'),
    66            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;
    88
    99        if (!iframe) {
  • custom-iframe/tags/1.0.9/custom-iframe-widget.php

    r3273929 r3277337  
    44 * Plugin URI: https://coderzstudio.com/plugins/custom-iframe
    55 * Description: An advanced Elementor widget to embed iFrames with customizable options.
    6  * Version: 1.0.8
     6 * Version: 1.0.9
    77 * Author: Coderz Studio
    88 * Author URI: https://coderzstudio.com/
     
    5151
    5252// Define constants.
    53 define( 'CUSTIF_VERSION', '1.0.8' );
     53define( 'CUSTIF_VERSION', '1.0.9' );
    5454define( 'CUSTIF_URL', plugin_dir_url( __FILE__ ) );
    5555define( 'CUSTIF_PATH', plugin_dir_path( __FILE__ ) );
    5656
    5757// 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
     60if ( ! 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  
    44Requires at least: 5.8
    55Tested up to: 6.7
    6 Stable tag: 1.0.8
     6Stable tag: 1.0.9
    77Requires PHP: 7.4
    88License: GPL-2.0+
     
    102102== Changelog ==
    103103
     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
    104108= 1.0.8 (April 16, 2025) =
    105109* Updated: Update demo and video URL in admin notice.
  • custom-iframe/tags/1.0.9/widget/class-custom-iframe-widget.php

    r3272696 r3277337  
    293293            'show_scrollbars',
    294294            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(
    299299                    'source' => 'default',
    300300                ),
     
    907907        }
    908908
     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
    909929        ?>
    910930        <div class="custif-iframe-wrapper" id="<?php echo esc_attr( $iframe_id ); ?>">
    911931            <?php if ( ( ! empty( $source ) && 'default' === $source ) || ( 'url' === $pdf_type && ! empty( $settings['pdf_file_link']['url'] ) ) ) : ?>
    912932                <?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                    ?>
    925940                <?php else : ?>
    926941                    <div class="custif-iframe-notice">
  • custom-iframe/trunk/assets/js/widget.js

    r3272696 r3277337  
    55        var iframe = scope[0].querySelector('.custif-iframe-wrapper > iframe'),
    66            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;
    88
    99        if (!iframe) {
  • custom-iframe/trunk/custom-iframe-widget.php

    r3273929 r3277337  
    44 * Plugin URI: https://coderzstudio.com/plugins/custom-iframe
    55 * Description: An advanced Elementor widget to embed iFrames with customizable options.
    6  * Version: 1.0.8
     6 * Version: 1.0.9
    77 * Author: Coderz Studio
    88 * Author URI: https://coderzstudio.com/
     
    5151
    5252// Define constants.
    53 define( 'CUSTIF_VERSION', '1.0.8' );
     53define( 'CUSTIF_VERSION', '1.0.9' );
    5454define( 'CUSTIF_URL', plugin_dir_url( __FILE__ ) );
    5555define( 'CUSTIF_PATH', plugin_dir_path( __FILE__ ) );
    5656
    5757// 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
     60if ( ! 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  
    44Requires at least: 5.8
    55Tested up to: 6.7
    6 Stable tag: 1.0.8
     6Stable tag: 1.0.9
    77Requires PHP: 7.4
    88License: GPL-2.0+
     
    102102== Changelog ==
    103103
     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
    104108= 1.0.8 (April 16, 2025) =
    105109* Updated: Update demo and video URL in admin notice.
  • custom-iframe/trunk/widget/class-custom-iframe-widget.php

    r3272696 r3277337  
    293293            'show_scrollbars',
    294294            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(
    299299                    'source' => 'default',
    300300                ),
     
    907907        }
    908908
     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
    909929        ?>
    910930        <div class="custif-iframe-wrapper" id="<?php echo esc_attr( $iframe_id ); ?>">
    911931            <?php if ( ( ! empty( $source ) && 'default' === $source ) || ( 'url' === $pdf_type && ! empty( $settings['pdf_file_link']['url'] ) ) ) : ?>
    912932                <?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                    ?>
    925940                <?php else : ?>
    926941                    <div class="custif-iframe-notice">
Note: See TracChangeset for help on using the changeset viewer.