... vertragen sich leider nicht. Das Sprachmodul Polyglot hängt an der URL hinten "?lp_lang_pref=en" dran und danach wp-print "print/". Klickt man dann weiter, kommen immer mehr "print/"s dran. Umgekehrt mit .../print/?lp_lang_pref=en würde es funktionieren. Hat sich damit zufällig schon jemand beschäftigt?
Dank, Nico
wp-print und polyglot
-
-
- Gerade eben
- Anzeige
Hallo!
Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.
- ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
- ✔️ Deutsche Server & DSGVO-konform
- ✔️ Persönlicher Support (kein 0815-Ticket-System)
-
Problem gelöst
Ich hab's gelöst. Der Entwickler von wp-print Lester Chan hat mir eine print.php gesandt, die ich dann nochmal verändert habe. So sehen seine Veränderungen aus:
PHP
Alles anzeigen### Function: Display Print Link function print_link($deprecated = '', $deprecated2 ='') { global $id; if (function_exists('polyglot_get_lang')){ global $polyglot_settings; $polyglot_append = $polyglot_settings['uri_helpers']['lang_view'].'/'.polyglot_get_lang().'/'; } $using_permalink = get_option('permalink_structure'); $print_options = get_option('print_options'); $print_style = intval($print_options['print_style']); $print_text = stripslashes($print_options['post_text']); $print_icon = get_option('siteurl').'/wp-content/plugins/print/images/'.$print_options['print_icon']; $print_link = get_permalink(); $print_html = stripslashes($print_options['print_html']); if(!empty($using_permalink)) { if(is_page()) { $print_text = stripslashes($print_options['page_text']); $print_link = $print_link.'printpage/'.$polyglot_append; } else { $print_link = $print_link.'print/'.$polyglot_append; } } else { if(is_page()) { $print_text = stripslashes($print_options['page_text']); } $print_link = $print_link.'&print=1'; }
...Ich habe, weil - warum auch immer - ich die Printseiten nicht als Permalink hingekriegt habe, noch folgende Veränderungen gemacht:
PHP
Alles anzeigen### Function: Display Print Link function print_link($deprecated = '', $deprecated2 ='') { global $id; if (function_exists('polyglot_get_lang')){ global $polyglot_settings; ### veraenderte Endung: $polyglot_append = '?lp_lang_pref='.polyglot_get_lang(); } $using_permalink = get_option('permalink_structure'); $print_options = get_option('print_options'); $print_style = intval($print_options['print_style']); $print_text = stripslashes($print_options['post_text']); $print_icon = get_option('siteurl').'/wp-content/plugins/print/images/'.$print_options['print_icon']; $print_link = get_permalink(); ### erster Teil vor dem Fragezeichen: if(explode ("?",$print_link)) { $print_link = $array[1]; } $print_html = stripslashes($print_options['print_html']);
...
So läuft's. -
Maximilian Rupp
13. Mai 2026 um 02:00 Hat das Thema aus dem Forum Plugin-Vorstellung nach Plugins verschoben.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!