Plugin Directory

Changeset 3094318


Ignore:
Timestamp:
05/29/2024 07:37:51 AM (20 months ago)
Author:
nicdark
Message:

edit files for version 2.2

Location:
nd-elements/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • nd-elements/trunk/nd-elements.php

    r2827787 r3094318  
    33Plugin Name:       Elements For Elementor
    44Description:       The plugin adds some useful Elementor components that can be integrated very easily on your own theme.
    5 Version:           2.1
     5Version:           2.2
    66Plugin URI:        https://nicdark.com
    77Author:            Nicdark
  • nd-elements/trunk/readme.txt

    r2827787 r3094318  
    33Tags: elementor, components, shortcodes, framework, post-grid, prices, team, testimonials, services
    44Requires at least: 4.5
    5 Tested up to: 6.0
    6 Stable tag: 2.1
     5Tested up to: 6.5
     6Stable tag: 2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2323
    2424== Changelog ==
     25
     26= 2.2 =
     27* added sanitize_key() on all $nd_elements_layout of all widgets
    2528
    2629= 2.1 =
  • nd-elements/trunk/widgets/beforeafter/index.php

    r2728472 r3094318  
    128128        //default values
    129129        if ($nd_elements_layout == '') { $nd_elements_layout = "layout-1"; }
     130        $nd_elements_number_layout_selected = str_replace('layout-','', $nd_elements_layout);
    130131
    131132        //check with realpath
     133        $nd_elements_layout = sanitize_key($nd_elements_layout);
    132134        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$nd_elements_layout.'.php';
    133         include realpath($nd_elements_layout_selected);
     135        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     136
     137        if ( $nd_elements_number_layout_selected != '' ) {
     138
     139            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     140                include realpath($nd_elements_layout_selected);
     141            }
     142
     143        }
     144
    134145
    135146        $nd_elements_allowed_html = [
  • nd-elements/trunk/widgets/eventsgrid/index.php

    r2827787 r3094318  
    116116        if ($eventsgrid_qnt == '') { $eventsgrid_qnt = 3; }
    117117        if ($nd_elements_eventsgrid_order == '') { $nd_elements_eventsgrid_order = 'DESC'; }
    118         if ($eventsgrid_layout == '') { $eventsgrid_layout = "layout-1"; }
     118       
    119119
    120120        //args
     
    127127        $the_query = new WP_Query( $args );
    128128
     129
     130        //default values
     131        if ($eventsgrid_layout == '') { $eventsgrid_layout = "layout-1"; }
     132        $nd_elements_number_layout_selected = str_replace('layout-','', $eventsgrid_layout);
     133
    129134        //check with realpath
     135        $eventsgrid_layout = sanitize_key($eventsgrid_layout);
    130136        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$eventsgrid_layout.'.php';
    131         include realpath($nd_elements_layout_selected);
     137        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     138
     139        if ( $nd_elements_number_layout_selected != '' ) {
     140
     141            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     142                include realpath($nd_elements_layout_selected);
     143            }
     144
     145        }
    132146
    133147        wp_reset_postdata();
  • nd-elements/trunk/widgets/list/index.php

    r2728472 r3094318  
    415415        //default values
    416416        if ($list_layout == '') { $list_layout = "layout-1"; }
     417        $nd_elements_number_layout_selected = str_replace('layout-','', $list_layout);
    417418
    418419        //check with realpath
     420        $list_layout = sanitize_key($list_layout);
    419421        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$list_layout.'.php';
    420         include realpath($nd_elements_layout_selected);
     422        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     423
     424        if ( $nd_elements_number_layout_selected != '' ) {
     425
     426            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     427                include realpath($nd_elements_layout_selected);
     428            }
     429
     430        }
    421431
    422432        $nd_elements_allowed_html = [
  • nd-elements/trunk/widgets/marquee/index.php

    r2728472 r3094318  
    204204        //default values
    205205        if ($marquee_layout == '') { $marquee_layout = "layout-1"; }
     206        $nd_elements_number_layout_selected = str_replace('layout-','', $marquee_layout);
    206207
    207208        //check with realpath
     209        $marquee_layout = sanitize_key($marquee_layout);
    208210        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$marquee_layout.'.php';
    209         include realpath($nd_elements_layout_selected);
     211        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     212
     213        if ( $nd_elements_number_layout_selected != '' ) {
     214
     215            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     216                include realpath($nd_elements_layout_selected);
     217            }
     218
     219        }
    210220
    211221        $nd_elements_allowed_html = [
  • nd-elements/trunk/widgets/postgrid/index.php

    r2728472 r3094318  
    191191        //default values
    192192        if ($postgrid_width == '') { $postgrid_width = "nd_elements_width_100_percentage"; }
    193         if ($postgrid_layout == '') { $postgrid_layout = "layout-1"; }
    194193        if ($postgrid_qnt == '') { $postgrid_qnt = 3; }
    195194        if ($nd_elements_postgrid_order == '') { $nd_elements_postgrid_order = 'DESC'; }
     
    209208        $the_query = new WP_Query( $args );
    210209
     210        //default values
     211        if ($postgrid_layout == '') { $postgrid_layout = "layout-1"; }
     212        $nd_elements_number_layout_selected = str_replace('layout-','', $postgrid_layout);
     213
    211214        //check with realpath
     215        $postgrid_layout = sanitize_key($postgrid_layout);
    212216        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$postgrid_layout.'.php';
    213         include realpath($nd_elements_layout_selected);
     217        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     218
     219        if ( $nd_elements_number_layout_selected != '' ) {
     220
     221            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     222                include realpath($nd_elements_layout_selected);
     223            }
     224
     225        }
    214226
    215227        wp_reset_postdata();
  • nd-elements/trunk/widgets/woocart/index.php

    r2728472 r3094318  
    248248        //default values
    249249        if ($woocart_layout == '') { $woocart_layout = "layout-1"; }
     250        $nd_elements_number_layout_selected = str_replace('layout-','', $woocart_layout);
    250251
    251252        //check with realpath
     253        $woocart_layout = sanitize_key($woocart_layout);
    252254        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$woocart_layout.'.php';
    253         include realpath($nd_elements_layout_selected);
     255        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     256
     257        if ( $nd_elements_number_layout_selected != '' ) {
     258
     259            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     260                include realpath($nd_elements_layout_selected);
     261            }
     262
     263        }
    254264
    255265        $nd_elements_allowed_html = [
  • nd-elements/trunk/widgets/woogrid/index.php

    r2728472 r3094318  
    155155        //default values
    156156        if ($woogrid_width == '') { $woogrid_width = "nd_elements_width_100_percentage"; }
    157         if ($woogrid_layout == '') { $woogrid_layout = "layout-1"; }
    158157        if ($woogrid_qnt == '') { $woogrid_qnt = 3; }
    159158        if ($nd_elements_woogrid_order == '') { $nd_elements_woogrid_order = 'DESC'; }
     
    170169        $the_query = new WP_Query( $args );
    171170
     171        //default values
     172        if ($woogrid_layout == '') { $woogrid_layout = "layout-1"; }
     173        $nd_elements_number_layout_selected = str_replace('layout-','', $woogrid_layout);
     174
    172175        //check with realpath
     176        $woogrid_layout = sanitize_key($woogrid_layout);
    173177        $nd_elements_layout_selected = dirname( __FILE__ ).'/layout/'.$woogrid_layout.'.php';
    174         include realpath($nd_elements_layout_selected);
     178        $nd_elements_string_layout_selected = '/layout/layout-'.$nd_elements_number_layout_selected.'.php';
     179
     180        if ( $nd_elements_number_layout_selected != '' ) {
     181
     182            if ( str_contains($nd_elements_layout_selected, $nd_elements_string_layout_selected) ) {
     183                include realpath($nd_elements_layout_selected);
     184            }
     185
     186        }
    175187
    176188        wp_reset_postdata();
Note: See TracChangeset for help on using the changeset viewer.