Changeset 3291763
- Timestamp:
- 05/12/2025 10:18:51 AM (9 months ago)
- Location:
- getwid-megamenu/trunk
- Files:
-
- 6 edited
-
getwid-megamenu.php (modified) (1 diff)
-
includes/blocks/MegaMenu.php (modified) (2 diffs)
-
includes/blocks/MegaMenuItem.php (modified) (2 diffs)
-
includes/blocks/PlainMenu.php (modified) (1 diff)
-
includes/blocks/PlainMenuItem.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
getwid-megamenu/trunk/getwid-megamenu.php
r2997201 r3291763 5 5 * Plugin URI: https://motopress.com/products/wordpress-mega-menu-block/ 6 6 * Description: Build better navigation menus with the WordPress mega menu blocks. 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Author: MotoPress 9 9 * Author URI: https://motopress.com/ -
getwid-megamenu/trunk/includes/blocks/MegaMenu.php
r2915930 r3291763 23 23 ); 24 24 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 ) ) . '"'; 26 26 if ( isset( $attributes['dropdownMaxWidth'] ) ) { 27 $html .= ' data-dropdown-width="' . $attributes['dropdownMaxWidth']. '"';27 $html .= ' data-dropdown-width="' . absint( $attributes['dropdownMaxWidth'] ) . '"'; 28 28 } 29 29 if ( isset( $attributes['dropdownContentMaxWidth'] ) ) { 30 $html .= ' data-dropdown-content-width="' . $attributes['dropdownContentMaxWidth']. '"';30 $html .= ' data-dropdown-content-width="' . absint( $attributes['dropdownContentMaxWidth'] ) . '"'; 31 31 } 32 32 33 $responsive_breakpoint = isset( $attributes['responsiveBreakpoint'] ) ? $attributes['responsiveBreakpoint']: 782;33 $responsive_breakpoint = isset( $attributes['responsiveBreakpoint'] ) ? absint( $attributes['responsiveBreakpoint'] ) : 782; 34 34 35 35 $html .= ' data-responsive-breakpoint="' . $responsive_breakpoint . '"'; … … 38 38 $html .= '<nav class="gw-mm__wrapper"'; 39 39 if ( isset( $attributes['menuMaxWidth'] ) ) { 40 $html .= ' style="max-width:' . $attributes['menuMaxWidth']. 'px"';40 $html .= ' style="max-width:' . absint( $attributes['menuMaxWidth'] ) . 'px"'; 41 41 } 42 42 $html .= '>'; 43 43 44 44 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'] ) . ';"' : ''; 46 46 47 47 $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 65 65 66 66 $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 ) . '">'; 68 68 $html .= '<a href="'; 69 69 if ( isset( $attributes['url'] ) ) { … … 75 75 76 76 if ( isset( $attributes['linkTarget'] ) ) { 77 $html .= ' target="' . $attributes['linkTarget']. '"';77 $html .= ' target="' . esc_attr( $attributes['linkTarget'] ) . '"'; 78 78 } 79 79 80 80 if ( isset( $attributes['rel'] ) ) { 81 $html .= ' rel="' . $attributes['rel']. '"';81 $html .= ' rel="' . esc_attr( $attributes['rel'] ) . '"'; 82 82 } 83 83 -
getwid-megamenu/trunk/includes/blocks/PlainMenu.php
r2697543 r3291763 18 18 ); 19 19 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 ) ) . '">'; 21 21 $html .= '<ul class="gw-pm__content">'; 22 22 $html .= $content; -
getwid-megamenu/trunk/includes/blocks/PlainMenuItem.php
r2697543 r3291763 38 38 ); 39 39 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 } 41 44 42 45 $item_classes = array_merge( … … 59 62 ); 60 63 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'] ) . '" '; 62 65 63 66 $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 . '>'; 65 68 $html .= '<a href="'; 66 69 if ( isset( $attributes['url'] ) ) { … … 72 75 73 76 if ( isset( $attributes['linkTarget'] ) ) { 74 $html .= ' target="' . $attributes['linkTarget']. '"';77 $html .= ' target="' . esc_attr( $attributes['linkTarget'] ) . '"'; 75 78 } 76 79 77 80 if ( isset( $attributes['rel'] ) ) { 78 $html .= ' rel="' . $attributes['rel']. '"';81 $html .= ' rel="' . esc_attr( $attributes['rel'] ) . '"'; 79 82 } 80 83 -
getwid-megamenu/trunk/readme.txt
r3188628 r3291763 4 4 Tags: mega menu, megamenu, WordPress menu, navigation, block 5 5 Requires at least: 5.7 6 Tested up to: 6. 76 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 1.0. 68 Stable tag: 1.0.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 58 58 == Changelog == 59 59 60 = 1.0.7, May 12 2025 = 61 * Minor bugfixes and improvements. 62 60 63 = 1.0.6, Nov 16 2023 = 61 64 * Improved compatibility with WordPress 6.4.
Note: See TracChangeset
for help on using the changeset viewer.