Plugin Directory

Changeset 3433671


Ignore:
Timestamp:
01/06/2026 01:54:58 PM (3 months ago)
Author:
curato
Message:

Permalink Update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • travelmanager-buchungssoftware/trunk/index.php

    r3433630 r3433671  
    44Plugin URI: https://travelmanager.de/support/wordpress/
    55Description: Inhalte aus der Travelmanager, Tickyt Buchungssoftware und Gastrozack Gastrokasse direkt in WordPress einbinden
    6 Version: 22.19
     6Version: 22.20
    77Author: Philipp Stäbler
    88Text Domain: travelmanager
     
    10611061function tm_register_rewrite_rules(): void
    10621062{
    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    );
    10931068}
    10941069add_action('init', 'tm_register_rewrite_rules', 5);
Note: See TracChangeset for help on using the changeset viewer.