Changeset 3433671
- Timestamp:
- 01/06/2026 01:54:58 PM (3 months ago)
- File:
-
- 1 edited
-
travelmanager-buchungssoftware/trunk/index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
travelmanager-buchungssoftware/trunk/index.php
r3433630 r3433671 4 4 Plugin URI: https://travelmanager.de/support/wordpress/ 5 5 Description: Inhalte aus der Travelmanager, Tickyt Buchungssoftware und Gastrozack Gastrokasse direkt in WordPress einbinden 6 Version: 22. 196 Version: 22.20 7 7 Author: Philipp Stäbler 8 8 Text Domain: travelmanager … … 1061 1061 function tm_register_rewrite_rules(): void 1062 1062 { 1063 /** 1064 * Dynamic SEO prefix. 1065 * URL format: 1066 * /<seo>/<human-slug>--<relationKey>/ 1067 * Example: 1068 * /relation/fahrt-zu-den-seehunden--ent_tm-6003-13-13/ 1069 * /events/fahrt-zu-den-seehunden--ent_tm-6003-13-13/ 1070 * 1071 * The first segment (<seo>) must be the slug of a real WP page that contains the [travelmanager] shortcode. 1072 * That page should render eventinfo when a relation key is present. 1073 */ 1074 add_rewrite_rule( 1075 '^([^/]+)/([^/]+)--([A-Za-z0-9_-]+)/?$', 1076 'index.php?pagename=$matches[1]&relation=$matches[3]', 1077 'top' 1078 ); 1079 1080 // Backward compatibility: older links without the double-dash delimiter (only works if key has no hyphens) 1081 add_rewrite_rule( 1082 '^([^/]+)/([^/]+)-([A-Za-z0-9_]+)/?$', 1083 'index.php?pagename=$matches[1]&relation=$matches[3]', 1084 'top' 1085 ); 1086 1087 // Optional: allow /<seo>/<relationKey>/ (works, but only if you intentionally link to it) 1088 add_rewrite_rule( 1089 '^([^/]+)/([A-Za-z0-9_-]+)/?$', 1090 'index.php?pagename=$matches[1]&relation=$matches[2]', 1091 'top' 1092 ); 1063 add_rewrite_rule( 1064 '^([^/]+)/([^/]+)--([A-Za-z0-9_-]+)/?$', 1065 'index.php?pagename=$matches[1]&relation=$matches[3]', 1066 'top' 1067 ); 1093 1068 } 1094 1069 add_action('init', 'tm_register_rewrite_rules', 5);
Note: See TracChangeset
for help on using the changeset viewer.