Changeset 3399229
- Timestamp:
- 11/19/2025 06:56:45 PM (4 months ago)
- Location:
- food-and-drink-menu
- Files:
-
- 10 edited
- 1 copied
-
tags/2.4.22 (copied) (copied from food-and-drink-menu/trunk)
-
tags/2.4.22/assets/js/fdm-ordering-js.js (modified) (1 diff)
-
tags/2.4.22/assets/js/fdm-sidebar-js.js (modified) (1 diff)
-
tags/2.4.22/food-and-drink-menu.php (modified) (2 diffs)
-
tags/2.4.22/readme.txt (modified) (2 diffs)
-
tags/2.4.22/views/View.Menu.class.php (modified) (4 diffs)
-
trunk/assets/js/fdm-ordering-js.js (modified) (1 diff)
-
trunk/assets/js/fdm-sidebar-js.js (modified) (1 diff)
-
trunk/food-and-drink-menu.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/View.Menu.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
food-and-drink-menu/tags/2.4.22/assets/js/fdm-ordering-js.js
r3284409 r3399229 2 2 3 3 jQuery(document).ready(function() { 4 5 jQuery( '.fdm-options-add-to-cart-button' ).attr( 'tabindex', '0' ); 4 6 5 7 jQuery( '.cart-location-bottom #fdm-ordering-contact-details, .cart-location-bottom #fdm-order-payment-toggle, .cart-location-bottom #fdm-order-submit, .cart-location-bottom #fdm-order-payment-form-div' ).addClass ( 'fdm-hidden' ); -
food-and-drink-menu/tags/2.4.22/assets/js/fdm-sidebar-js.js
r3005208 r3399229 1 1 jQuery(document).ready(function(){ 2 3 jQuery('.fdm-menu-sidebar-section-title').attr('tabindex', '0'); 2 4 jQuery('.fdm-menu-sidebar-section-title:first-of-type').addClass('fdm-menu-sidebar-section-title-selected'); 3 5 jQuery('.fdm-menu-sidebar-section-description:nth-of-type(2)').removeClass('fdm-hidden'); -
food-and-drink-menu/tags/2.4.22/food-and-drink-menu.php
r3366776 r3399229 4 4 * Plugin URI: https://www.fivestarplugins.com/plugins/five-star-restaurant-menu/ 5 5 * Description: Restaurant menu and food ordering system that is easy to set up and integrates with any theme. Includes restaurant menu blocks and patterns. 6 * Version: 2.4.2 16 * Version: 2.4.22 7 7 * Requires at least: 6.0 8 8 * Author: Five Star Plugins … … 44 44 define( 'FDM_UPGRADE_URL', 'https://www.fivestarplugins.com/license-payment/?Selected=FDM&Quantity=1' ); 45 45 define( 'FDM_TEMPLATE_DIR', 'fdm-templates' ); 46 define( 'FDM_VERSION', '2.4.2 1' );46 define( 'FDM_VERSION', '2.4.22' ); 47 47 define( 'FDM_MENU_POST_TYPE', 'fdm-menu' ); 48 48 define( 'FDM_MENUITEM_POST_TYPE', 'fdm-menu-item' ); -
food-and-drink-menu/tags/2.4.22/readme.txt
r3366776 r3399229 5 5 Requires at Least: 6.0 6 6 Tested Up To: 6.8 7 Stable tag: 2.4.2 17 Stable tag: 2.4.22 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 302 302 == Changelog == 303 303 304 = 2.4.22 (2025-11-19) = 305 - Added tabindex to sidebar section titles and add to cart buttons. 306 - Fixes for a number of menu schema notices. 307 304 308 = 2.4.21 (2025-09-23) = 305 309 - Updated admin notice capabilities. -
food-and-drink-menu/tags/2.4.22/views/View.Menu.class.php
r3064857 r3399229 275 275 '@context' => 'https://schema.org', 276 276 '@type' => 'Menu', 277 'name' => $this-> title,277 'name' => $this->post->post_title, 278 278 'hasMenuSection' => array() 279 279 ); … … 288 288 '@type' => 'MenuSection', 289 289 'name' => $section->title, 290 'description' => $section->description, 291 'image' => ! empty( $section->image_url ) ? $section->image_url : '', 290 'description' => $this->clean_schema_description( $section->description ), 292 291 'hasMenuItem' => array(), 293 292 ); 293 294 if ( ! empty( $section->image_url ) ) { 295 296 $menu_section_schema['image'] = $section->image_url; 297 } 294 298 295 299 foreach ( $section->items as $item ) { … … 298 302 '@type' => 'MenuItem', 299 303 'name' => $item->title, 300 'image' => ! empty( $item->image ) ? $item->image : '', 301 'description' => $item->content, 304 'description' => $this->clean_schema_description( $item->content ), 302 305 'offers' => array() 303 306 ); 307 308 if ( ! empty( $item->image ) ) { 309 310 $menu_item_schema['image'] = $item->image; 311 } 304 312 305 313 foreach ( $item->prices as $price ) { 306 314 307 315 $menu_item_schema['offers'][] = array( 308 '@type' => ' offer',309 'price' => $price,316 '@type' => 'Offer', 317 'price' => preg_replace('/[^0-9.,]/', '', $price), 310 318 'priceCurrency' => $fdm_controller->settings->get_setting( 'ordering-currency' ) 311 319 ); … … 320 328 321 329 $fdm_controller->schema_menu_data[] = $menu_schema; 330 } 331 332 private function clean_schema_description( $content ) { 333 334 if ( empty( $content ) ) { 335 return ''; 336 } 337 338 // 1. Remove HTML & WP comments 339 $content = preg_replace( '/<!--.*?-->/s', '', $content ); 340 341 // 2. Remove <script> and <style> blocks entirely 342 $content = preg_replace( '/<script\b[^>]*>(.*?)<\/script>/is', '', $content ); 343 $content = preg_replace( '/<style\b[^>]*>(.*?)<\/style>/is', '', $content ); 344 345 // 3. Remove shortcodes (optional — enable if needed) 346 if ( function_exists( 'strip_shortcodes' ) ) { 347 $content = strip_shortcodes( $content ); 348 } 349 350 // 4. Remove remaining HTML tags 351 $content = strip_tags( $content ); 352 353 // 5. Decode HTML entities (e.g. & → &, → space) 354 $content = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ); 355 356 // 6. Normalize whitespace 357 $content = preg_replace( '/\s+/', ' ', trim( $content ) ); 358 359 return $content; 322 360 } 323 361 -
food-and-drink-menu/trunk/assets/js/fdm-ordering-js.js
r3284409 r3399229 2 2 3 3 jQuery(document).ready(function() { 4 5 jQuery( '.fdm-options-add-to-cart-button' ).attr( 'tabindex', '0' ); 4 6 5 7 jQuery( '.cart-location-bottom #fdm-ordering-contact-details, .cart-location-bottom #fdm-order-payment-toggle, .cart-location-bottom #fdm-order-submit, .cart-location-bottom #fdm-order-payment-form-div' ).addClass ( 'fdm-hidden' ); -
food-and-drink-menu/trunk/assets/js/fdm-sidebar-js.js
r3005208 r3399229 1 1 jQuery(document).ready(function(){ 2 3 jQuery('.fdm-menu-sidebar-section-title').attr('tabindex', '0'); 2 4 jQuery('.fdm-menu-sidebar-section-title:first-of-type').addClass('fdm-menu-sidebar-section-title-selected'); 3 5 jQuery('.fdm-menu-sidebar-section-description:nth-of-type(2)').removeClass('fdm-hidden'); -
food-and-drink-menu/trunk/food-and-drink-menu.php
r3366776 r3399229 4 4 * Plugin URI: https://www.fivestarplugins.com/plugins/five-star-restaurant-menu/ 5 5 * Description: Restaurant menu and food ordering system that is easy to set up and integrates with any theme. Includes restaurant menu blocks and patterns. 6 * Version: 2.4.2 16 * Version: 2.4.22 7 7 * Requires at least: 6.0 8 8 * Author: Five Star Plugins … … 44 44 define( 'FDM_UPGRADE_URL', 'https://www.fivestarplugins.com/license-payment/?Selected=FDM&Quantity=1' ); 45 45 define( 'FDM_TEMPLATE_DIR', 'fdm-templates' ); 46 define( 'FDM_VERSION', '2.4.2 1' );46 define( 'FDM_VERSION', '2.4.22' ); 47 47 define( 'FDM_MENU_POST_TYPE', 'fdm-menu' ); 48 48 define( 'FDM_MENUITEM_POST_TYPE', 'fdm-menu-item' ); -
food-and-drink-menu/trunk/readme.txt
r3366776 r3399229 5 5 Requires at Least: 6.0 6 6 Tested Up To: 6.8 7 Stable tag: 2.4.2 17 Stable tag: 2.4.22 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 302 302 == Changelog == 303 303 304 = 2.4.22 (2025-11-19) = 305 - Added tabindex to sidebar section titles and add to cart buttons. 306 - Fixes for a number of menu schema notices. 307 304 308 = 2.4.21 (2025-09-23) = 305 309 - Updated admin notice capabilities. -
food-and-drink-menu/trunk/views/View.Menu.class.php
r3064857 r3399229 275 275 '@context' => 'https://schema.org', 276 276 '@type' => 'Menu', 277 'name' => $this-> title,277 'name' => $this->post->post_title, 278 278 'hasMenuSection' => array() 279 279 ); … … 288 288 '@type' => 'MenuSection', 289 289 'name' => $section->title, 290 'description' => $section->description, 291 'image' => ! empty( $section->image_url ) ? $section->image_url : '', 290 'description' => $this->clean_schema_description( $section->description ), 292 291 'hasMenuItem' => array(), 293 292 ); 293 294 if ( ! empty( $section->image_url ) ) { 295 296 $menu_section_schema['image'] = $section->image_url; 297 } 294 298 295 299 foreach ( $section->items as $item ) { … … 298 302 '@type' => 'MenuItem', 299 303 'name' => $item->title, 300 'image' => ! empty( $item->image ) ? $item->image : '', 301 'description' => $item->content, 304 'description' => $this->clean_schema_description( $item->content ), 302 305 'offers' => array() 303 306 ); 307 308 if ( ! empty( $item->image ) ) { 309 310 $menu_item_schema['image'] = $item->image; 311 } 304 312 305 313 foreach ( $item->prices as $price ) { 306 314 307 315 $menu_item_schema['offers'][] = array( 308 '@type' => ' offer',309 'price' => $price,316 '@type' => 'Offer', 317 'price' => preg_replace('/[^0-9.,]/', '', $price), 310 318 'priceCurrency' => $fdm_controller->settings->get_setting( 'ordering-currency' ) 311 319 ); … … 320 328 321 329 $fdm_controller->schema_menu_data[] = $menu_schema; 330 } 331 332 private function clean_schema_description( $content ) { 333 334 if ( empty( $content ) ) { 335 return ''; 336 } 337 338 // 1. Remove HTML & WP comments 339 $content = preg_replace( '/<!--.*?-->/s', '', $content ); 340 341 // 2. Remove <script> and <style> blocks entirely 342 $content = preg_replace( '/<script\b[^>]*>(.*?)<\/script>/is', '', $content ); 343 $content = preg_replace( '/<style\b[^>]*>(.*?)<\/style>/is', '', $content ); 344 345 // 3. Remove shortcodes (optional — enable if needed) 346 if ( function_exists( 'strip_shortcodes' ) ) { 347 $content = strip_shortcodes( $content ); 348 } 349 350 // 4. Remove remaining HTML tags 351 $content = strip_tags( $content ); 352 353 // 5. Decode HTML entities (e.g. & → &, → space) 354 $content = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' ); 355 356 // 6. Normalize whitespace 357 $content = preg_replace( '/\s+/', ' ', trim( $content ) ); 358 359 return $content; 322 360 } 323 361
Note: See TracChangeset
for help on using the changeset viewer.