Plugin Directory

Changeset 2865405


Ignore:
Timestamp:
02/15/2023 02:21:28 AM (3 years ago)
Author:
piotnetdotcom
Message:

Update 2.4.23

Location:
piotnet-addons-for-elementor
Files:
88 added
4 edited

Legend:

Unmodified
Added
Removed
  • piotnet-addons-for-elementor/trunk/piotnet-addons-for-elementor.php

    r2849626 r2865405  
    44 * Description: Piotnet Addons For Elementor (PAFE) adds many new features for Elementor
    55 * Plugin URI:  https://pafe.piotnet.com/
    6  * Version:     2.4.22
     6 * Version:     2.4.23
    77 * Author:      Piotnet
    88 * Author URI:  https://piotnet.com/
    99 * Text Domain: pafe
    10  * Elementor tested up to: 3.10.0
    11  * Elementor Pro tested up to: 3.10.1
     10 * Elementor tested up to: 3.11.0
     11 * Elementor Pro tested up to: 3.11.0
    1212 */
    1313
    1414if ( ! defined( 'ABSPATH' ) ) { exit; }
    1515
    16 define( 'PAFE_VERSION', '2.4.22' );
     16define( 'PAFE_VERSION', '2.4.23' );
    1717
    1818define( 'PAFE_DIR', plugin_dir_path(__FILE__));
     
    490490        $widget->add_wpml_support();
    491491
     492        require_once(__DIR__ . '/widgets/pafe-table.php');
     493        $widget = new PAFE_Table();
     494        $widget->add_wpml_support();
     495
    492496        require_once(__DIR__ . '/widgets/pafe-switch-content.php');
    493497        $widget = new PAFE_Switch_Content();
  • piotnet-addons-for-elementor/trunk/readme.txt

    r2849626 r2865405  
    55Tested up to: 6.1
    66Requires PHP: 5.4
    7 Stable tag: 2.4.22
     7Stable tag: 2.4.23
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    120120
    121121== Changelog ==
     122= 2.4.23 =
     123* Integrate with WPML.
     124* Update Elementor tested up to: 3.11.0
     125* Update Elementor Pro tested up to: 3.11.0
    122126= 2.4.22 =
    123127* Integrate with WPML.
  • piotnet-addons-for-elementor/trunk/widgets/pafe-table.php

    r2782341 r2865405  
    3434        ];
    3535    }
     36    public function includes() {
     37        require_once(__DIR__ . '/compatibility/wpml/pafe-table-wpml.php');
     38    }
    3639   
    3740
     
    11031106
    11041107    }
     1108
     1109    public static function check_plugin_active( $slug = '' ) {
     1110
     1111        include_once ABSPATH . 'wp-admin/includes/plugin.php';
     1112        $wpml = in_array( 'sitepress-multilingual-cms/sitepress.php', (array) get_option( 'active_plugins', array() ), true );
     1113        $wpml_trans = in_array( 'wpml-string-translation/plugin.php', (array) get_option( 'active_plugins', array() ), true );
     1114
     1115        return $wpml && $wpml_trans;
     1116    }
     1117
     1118    public function add_wpml_support() {
     1119        if ( ! self::check_plugin_active() ) {
     1120            return;
     1121        }
     1122        $this->includes();
     1123        add_filter( 'wpml_elementor_widgets_to_translate', [ $this, 'wpml_widgets_to_translate_filter' ] );
     1124    }
     1125    public function wpml_widgets_to_translate_filter( $widgets ) {
     1126
     1127        $widgets[ $this->get_name() ] = [
     1128            'conditions' => [ 'widgetType' => $this->get_name() ],
     1129            'fields'            => array(),
     1130            'integration-class' => 'PAFE\widgets\compatibility\wpml\Table',
     1131        ];
     1132
     1133        return $widgets;
     1134    }
    11051135}
  • piotnet-addons-for-elementor/trunk/widgets/pafe-video-playlist.php

    r2849626 r2865405  
    1515            return $details['title']; //return the video title
    1616        }
     17
     18        public function includes() {
     19            require_once(__DIR__ . '/compatibility/wpml/pafe-video-list-wpml.php');
     20        }
    1721        public function curl_get($url) {
    1822            $curl = curl_init($url);
     
    360364            <?php
    361365        }
     366
     367        public static function check_plugin_active( $slug = '' ) {
     368
     369            include_once ABSPATH . 'wp-admin/includes/plugin.php';
     370            $wpml = in_array( 'sitepress-multilingual-cms/sitepress.php', (array) get_option( 'active_plugins', array() ), true );
     371            $wpml_trans = in_array( 'wpml-string-translation/plugin.php', (array) get_option( 'active_plugins', array() ), true );
     372
     373            return $wpml && $wpml_trans;
     374        }
     375
    362376        public function add_wpml_support() {
     377            if ( ! self::check_plugin_active() ) {
     378                return;
     379            }
     380            $this->includes();
    363381            add_filter( 'wpml_elementor_widgets_to_translate', [ $this, 'wpml_widgets_to_translate_filter' ] );
    364382        }
     
    367385            $widgets[ $this->get_name() ] = [
    368386                'conditions' => [ 'widgetType' => $this->get_name() ],
    369                 'fields'     => [
    370                     [
     387                'fields'            => array(
     388                    array(
    371389                        'field'       => 'pafe_video_playlist_title',
    372                         'label' => __( 'Video List Title', 'pafe' ),
    373                         'editor_type' => 'LINE'
    374                     ],
    375                 ],
     390                        'type'        => __( 'Video List: Title', 'pafe' ),
     391                        'editor_type' => 'LINE',
     392                    ),
     393                ),
     394                'integration-class' => 'PAFE\widgets\compatibility\wpml\Video_List',
    376395            ];
    377396
Note: See TracChangeset for help on using the changeset viewer.