Changeset 2986331
- Timestamp:
- 10/30/2023 05:34:29 PM (2 years ago)
- Location:
- bellows-accordion-menu/trunk
- Files:
-
- 6 edited
-
admin/assets/css/admin.control-panel.css (modified) (1 diff)
-
bellows-accordion-menu.php (modified) (2 diffs)
-
includes/bellows.api.php (modified) (11 diffs)
-
includes/functions.php (modified) (4 diffs)
-
languages/bellows.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bellows-accordion-menu/trunk/admin/assets/css/admin.control-panel.css
r2860904 r2986331 91 91 text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.2), 1px 0 1px rgba(0, 0, 0, 0.2), 92 92 0 1px 1px rgba(0, 0, 0, 0.2), -1px 0 1px rgba(0, 0, 0, 0.2); 93 } 94 .wp-core-ui .ssmenu-wrap .button-primary:focus, 95 .wp-core-ui .ssmenu-wrap .button-tertiary:focus { 96 outline: 2px solid #4997ea; 97 outline-offset: 2px; 93 98 } 94 99 .wp-core-ui .ssmenu-wrap .button-tertiary { -
bellows-accordion-menu/trunk/bellows-accordion-menu.php
r2860904 r2986331 5 5 * Plugin URI: http://getbellows.com 6 6 * Description: A flexible and robust WordPress accordion menu plugin 7 * Version: 1.4. 27 * Version: 1.4.3 8 8 * Requires at least: 5.0 9 9 * Requires PHP: 7.4 10 10 * Author: SevenSpark 11 * Author URI: http ://sevenspark.com11 * Author URI: https://sevenspark.com 12 12 * Text Domain: bellows 13 13 * Domain Path: /languages … … 16 16 if( ! defined( 'WPINC' ) ) die; // If this file is called directly, abort. 17 17 18 if( ! defined( 'BELLOWS_VERSION' ) ) define( 'BELLOWS_VERSION', '1.4. 2' );18 if( ! defined( 'BELLOWS_VERSION' ) ) define( 'BELLOWS_VERSION', '1.4.3' ); 19 19 if( ! defined( 'BELLOWS_PRO' ) ) define( 'BELLOWS_PRO' , false ); 20 20 -
bellows-accordion-menu/trunk/includes/bellows.api.php
r2860904 r2986331 3 3 function bellows_menu_toggle( $menu_id, $content, $btn_class, $args ){ 4 4 $content = apply_filters( 'bellows_menu_toggle_content', $content, $menu_id, $args ); 5 $btn = '<button class="bellows-menu-toggle '. $btn_class.'" aria-controls="'.$menu_id.'">'.$content.'</button>';5 $btn = '<button class="bellows-menu-toggle '.esc_attr($btn_class).'" aria-controls="'.esc_attr($menu_id).'">'.$content.'</button>'; 6 6 return apply_filters( 'bellows_menu_toggle', $btn, $menu_id, $args ); 7 7 } … … 16 16 function bellows( $config_id = 'main' , $menu_args = [] ){ 17 17 18 $config_id = bellows_validate_config_id( $config_id ); 19 18 20 _BELLOWS()->set_current_config_id( $config_id ); 19 21 20 22 $menu_args['bellows_source'] = 'menu'; // Default source 21 23 $args = bellows_get_nav_menu_args( $config_id , $menu_args ); 22 23 // Should the toggle and menu be printed 24 $print = isset( $args['echo'] ) ? $args['echo'] : true; 25 26 // Get the toggle based on config settings 27 $toggle = bellows_menu_toggle_default( $args['container_id'], $config_id, $args ); 28 29 // If we're printing, print the toggle. 30 if( $print ){ 31 echo $toggle; 32 } 24 $toggle = bellows_output_responsive_toggle($config_id, $args); 33 25 34 26 // Generate the menu (wp_nav_menu will print if we're printing) … … 47 39 'theme_location' => '', 48 40 'menu' => '', 49 50 51 41 ), $atts)); 52 42 43 53 44 $args = array(); 54 45 $args['echo'] = false; … … 71 62 */ 72 63 function bellows_section( string $config_id, array $menu_args, array $section_args ){ 64 65 $config_id = bellows_validate_config_id( $config_id ); 73 66 74 67 if( !BELLOWS_PRO ){ … … 93 86 $args['container_id'] = 'bellows-'.$config_id.'-'.sanitize_key( $menu_args['menu'] ).'-section-'.$section_args['root']; 94 87 95 // Should the toggle and menu be printed 96 $print = isset( $args['echo'] ) ? $args['echo'] : true; 97 98 // Get the toggle based on config settings 99 $toggle = bellows_menu_toggle_default( $args['container_id'], $config_id, $args ); 100 101 // If we're printing, print the toggle. 102 if( $print ){ 103 echo $toggle; 104 } 88 // // Should the toggle and menu be printed 89 // $print = isset( $args['echo'] ) ? $args['echo'] : true; 90 91 // // Get the toggle based on config settings 92 // $toggle = bellows_menu_toggle_default( $args['container_id'], $config_id, $args ); 93 94 // // If we're printing, print the toggle. 95 // if( $print ){ 96 // echo $toggle; 97 // } 98 99 $toggle = bellows_output_responsive_toggle($config_id, $args); 105 100 106 101 // Generate the menu (wp_nav_menu will print if we're printing) … … 152 147 ); 153 148 } 149 150 $config_id = bellows_validate_config_id( $config_id ); 154 151 155 152 // If 'taxonomies' is passed, convert to 'taxonomy' … … 201 198 // bellp( $menu_args ); 202 199 200 $toggle = bellows_output_responsive_toggle($config_id, $menu_args); 201 203 202 //add_filter( 'wp_get_nav_menu_items' , 'bellows_populate_terms' , 10, 3 ); 204 203 add_filter( 'wp_nav_menu_objects' , 'bellows_populate_terms' , 10, 2 ); … … 209 208 //TODO: ECHO OR RETURN CHECK 210 209 211 return $ menu;210 return $toggle . $menu; 212 211 } 213 212 … … 278 277 ); 279 278 } 279 280 $config_id = bellows_validate_config_id( $config_id ); 280 281 281 282 $post_arg_defaults = array( … … 344 345 $menu_args = bellows_get_nav_menu_args( $config_id , $menu_args ); 345 346 347 $toggle = bellows_output_responsive_toggle($config_id, $menu_args); 348 346 349 //bellp( get_term( 73, 'nav_menu' ) ); 347 350 … … 357 360 358 361 //TODO: ECHO OR RETURN CHECK 359 return $ menu;362 return $toggle.$menu; 360 363 361 364 } -
bellows-accordion-menu/trunk/includes/functions.php
r2860904 r2986331 6 6 7 7 function bellows_get_nav_menu_args( $config_id , $args = array() ){ 8 9 // Config ID should be pre-validated 8 10 9 11 $args['container'] = bellows_op( 'container_tag' , $config_id ); … … 43 45 _BELLOWS()->count_menu_instance( $nav_menu_id ); 44 46 45 //ID 47 //ID (Config ID is pre-validated and pre-escaped) 46 48 $args['container_id'] = 'bellows-'.$config_id.'-'.sanitize_key( $nav_menu_id ); 47 49 if( $theme_location ){ … … 60 62 61 63 //Config 62 $args['container_class'] .= ' bellows-'.$config_id; 64 $args['container_class'] .= ' bellows-'.$config_id; // Already escaped 63 65 64 66 //Source … … 253 255 254 256 257 function bellows_output_responsive_toggle($config_id, $args){ 258 // Should the toggle and menu be printed 259 $print = isset( $args['echo'] ) ? $args['echo'] : true; 260 261 // Get the toggle based on config settings 262 $toggle = bellows_menu_toggle_default( $args['container_id'], $config_id, $args ); 263 264 // If we're printing, print the toggle. 265 if( $print ){ 266 echo $toggle; 267 } 268 269 return $toggle; 270 } 271 272 273 /** 274 * Validates that the passed config ID matches an existing configuration, 275 * after escaping unsafe characters that may have been passed 276 * 277 * If the config is invalid, returns the default configuration 278 * 279 */ 280 function bellows_validate_config_id( $config_id, $default = 'main' ){ 281 282 // Escape the string to defend against XSS attacks 283 $config_id = esc_attr( $config_id ); 284 285 // If this is the main ID, we don't actually need to query the DB, as this always exists 286 if( $config_id === 'main' ){ 287 return $config_id; 288 } 289 290 // Find the valid configurations 291 $valid_configs = bellows_get_menu_configurations(); 292 293 // If the ID matches a valid configuration, we're good to go 294 if( in_array( $config_id, $valid_configs ) ){ 295 return $config_id; 296 } 297 298 // If not, return a valid config (main by default) 299 return $default; 300 } 301 255 302 256 303 function bellp( $d ){ -
bellows-accordion-menu/trunk/languages/bellows.pot
r2860904 r2986331 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Bellows Pro - Accordion Menu 1.4. 2\n"5 "Project-Id-Version: Bellows Pro - Accordion Menu 1.4.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bellows-pro\n" 7 "POT-Creation-Date: 2023- 02-03 20:49:52+00:00\n"7 "POT-Creation-Date: 2023-10-30 17:08:51+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" … … 280 280 msgstr "" 281 281 282 #: includes/functions.php:9 3includes/widget.php:169282 #: includes/functions.php:95 includes/widget.php:169 283 283 #: pro/admin/settings.control-panel.generator.php:346 284 284 msgid "Menu" -
bellows-accordion-menu/trunk/readme.txt
r2860904 r2986331 4 4 Tags: menu, navigation, accordion, images, widgets, icons, shortcodes, responsive, expand, toggle, reveal, accordian 5 5 Requires at least: 5.0 6 Tested up to: 6. 1.16 Tested up to: 6.3.2 7 7 Requires PHP: 7.4 8 Stable tag: 1.4. 28 Stable tag: 1.4.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 57 57 58 58 == Changelog == 59 60 = 1.4.3 = 61 62 * Security: Fix XSS vulnerability - Authenticated (Contributor+) Stored cross-site scripting via shortcode 59 63 60 64 = 1.4.2 =
Note: See TracChangeset
for help on using the changeset viewer.