Plugin Directory

Changeset 3291763


Ignore:
Timestamp:
05/12/2025 10:18:51 AM (9 months ago)
Author:
endzevich
Message:

Version: 1.0.7

Location:
getwid-megamenu/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • getwid-megamenu/trunk/getwid-megamenu.php

    r2997201 r3291763  
    55 * Plugin URI: https://motopress.com/products/wordpress-mega-menu-block/
    66 * Description: Build better navigation menus with the WordPress mega menu blocks.
    7  * Version: 1.0.6
     7 * Version: 1.0.7
    88 * Author: MotoPress
    99 * Author URI: https://motopress.com/
  • getwid-megamenu/trunk/includes/blocks/MegaMenu.php

    r2915930 r3291763  
    2323        );
    2424
    25         $html = '<div class="wp-block-getwid-megamenu gw-mm ' . implode( ' ', $classes ) . '"';
     25        $html = '<div class="wp-block-getwid-megamenu gw-mm ' . esc_attr( implode( ' ', $classes ) ) . '"';
    2626        if ( isset( $attributes['dropdownMaxWidth'] ) ) {
    27             $html .= ' data-dropdown-width="' . $attributes['dropdownMaxWidth'] . '"';
     27            $html .= ' data-dropdown-width="' . absint( $attributes['dropdownMaxWidth'] ) . '"';
    2828        }
    2929        if ( isset( $attributes['dropdownContentMaxWidth'] ) ) {
    30             $html .= ' data-dropdown-content-width="' . $attributes['dropdownContentMaxWidth'] . '"';
     30            $html .= ' data-dropdown-content-width="' . absint( $attributes['dropdownContentMaxWidth'] ) . '"';
    3131        }
    3232
    33         $responsive_breakpoint = isset( $attributes['responsiveBreakpoint'] ) ? $attributes['responsiveBreakpoint'] : 782;
     33        $responsive_breakpoint = isset( $attributes['responsiveBreakpoint'] ) ? absint( $attributes['responsiveBreakpoint'] ) : 782;
    3434
    3535        $html .= ' data-responsive-breakpoint="' . $responsive_breakpoint . '"';
     
    3838        $html .= '<nav class="gw-mm__wrapper"';
    3939        if ( isset( $attributes['menuMaxWidth'] ) ) {
    40             $html .= ' style="max-width:' . $attributes['menuMaxWidth'] . 'px"';
     40            $html .= ' style="max-width:' . absint( $attributes['menuMaxWidth'] ) . 'px"';
    4141        }
    4242        $html .= '>';
    4343
    4444        if ( $collapse_on_mobile ) {
    45             $toggle_button_alignment_style = isset( $attributes['toggleButtonAlignment'] ) ? 'style="text-align: ' . $attributes['toggleButtonAlignment'] . ';"' : '';
     45            $toggle_button_alignment_style = isset( $attributes['toggleButtonAlignment'] ) ? 'style="text-align: ' . esc_attr( $attributes['toggleButtonAlignment'] ) . ';"' : '';
    4646
    4747            $button = '<button class="gw-mm__toggle"><span class="dashicons dashicons-menu"></span>' . esc_html__( 'Menu', 'getwid-megamenu' ) . '</button>';
  • getwid-megamenu/trunk/includes/blocks/MegaMenuItem.php

    r2915930 r3291763  
    6565
    6666        $html .= '<li class="' . esc_attr( implode( ' ', $item_classes ) ) . '">';
    67         $html .= '<div class="' . implode( ' ', $item_link_classes ) . '" style="' . $item_link_style . '">';
     67        $html .= '<div class="' . esc_attr( implode( ' ', $item_link_classes ) ) . '" style="' . esc_attr( $item_link_style ) . '">';
    6868        $html .= '<a href="';
    6969        if ( isset( $attributes['url'] ) ) {
     
    7575
    7676        if ( isset( $attributes['linkTarget'] ) ) {
    77             $html .= ' target="' . $attributes['linkTarget'] . '"';
     77            $html .= ' target="' . esc_attr( $attributes['linkTarget'] ) . '"';
    7878        }
    7979
    8080        if ( isset( $attributes['rel'] ) ) {
    81             $html .= ' rel="' . $attributes['rel'] . '"';
     81            $html .= ' rel="' . esc_attr( $attributes['rel'] ) . '"';
    8282        }
    8383
  • getwid-megamenu/trunk/includes/blocks/PlainMenu.php

    r2697543 r3291763  
    1818        );
    1919
    20         $html = '<nav class="wp-block-getwid-plain-menu gw-pm ' . implode( ' ', $classes ) . '">';
     20        $html = '<nav class="wp-block-getwid-plain-menu gw-pm ' . esc_attr( implode( ' ', $classes ) ) . '">';
    2121        $html .= '<ul class="gw-pm__content">';
    2222        $html .= $content;
  • getwid-megamenu/trunk/includes/blocks/PlainMenuItem.php

    r2697543 r3291763  
    3838        );
    3939
    40         $is_active = $attributes['kind'] == 'post-type' && $attributes['id'] === get_the_ID();
     40        $is_active = false;
     41        if ( isset( $attributes['kind'] ) && isset( $attributes['id'] ) ) {
     42            $is_active = $attributes['kind'] == 'post-type' && $attributes['id'] === get_the_ID();
     43        }
    4144
    4245        $item_classes = array_merge(
     
    5962        );
    6063
    61         $item_link_style = ' style="' . $font_size['inline_styles'] . $colors['inline_styles'] . '" ';
     64        $item_link_style = ' style="' . esc_attr( $font_size['inline_styles'] ) . esc_attr( $colors['inline_styles'] ) . '" ';
    6265
    6366        $html .= '<li class="' . esc_attr( implode( ' ', $item_classes ) ) . '">';
    64         $html .= '<div class="' . implode( ' ', $item_link_classes ) . '" ' . $item_link_style . '>';
     67        $html .= '<div class="' . esc_attr( implode( ' ', $item_link_classes ) ) . '" ' . $item_link_style . '>';
    6568        $html .= '<a href="';
    6669        if ( isset( $attributes['url'] ) ) {
     
    7275
    7376        if ( isset( $attributes['linkTarget'] ) ) {
    74             $html .= ' target="' . $attributes['linkTarget'] . '"';
     77            $html .= ' target="' . esc_attr( $attributes['linkTarget'] ) . '"';
    7578        }
    7679
    7780        if ( isset( $attributes['rel'] ) ) {
    78             $html .= ' rel="' . $attributes['rel'] . '"';
     81            $html .= ' rel="' . esc_attr( $attributes['rel'] ) . '"';
    7982        }
    8083
  • getwid-megamenu/trunk/readme.txt

    r3188628 r3291763  
    44Tags: mega menu, megamenu, WordPress menu, navigation, block
    55Requires at least: 5.7
    6 Tested up to: 6.7
     6Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 1.0.6
     8Stable tag: 1.0.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858== Changelog ==
    5959
     60= 1.0.7, May 12 2025 =
     61* Minor bugfixes and improvements.
     62
    6063= 1.0.6, Nov 16 2023 =
    6164* Improved compatibility with WordPress 6.4.
Note: See TracChangeset for help on using the changeset viewer.