You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wish: extend Shortcode/IsOpen.php / next_format by %5$s- %6$s in order to allow display of complete working hours of a day even if team takes a two hour break to eat in between.
#1
Open
ash-tsc opened this issue
Jul 1, 2019
· 2 comments
[op-is-open set_id="352" open_text="Unsere Praxis in Arbergen ist geöffnet." closed_text="Unsere Praxis in Arbergen ist geschlossen." closed_holiday_text="Unsere Praxis in Arbergen ist aufgrund von %1$s geschlossen." show_next="true" next_format="Wir sind am %2$s den %1$s von %3$s bis %4$s und %5$s- %6$s Uhr wieder für Sie da!" show_today="open" today_format="Heutige Öffnungszeiten: %1$s"]
Warning: sprintf(): Too few arguments in /www/htdocs/w011cae2/wordpress.zoum.de/wp-content/plugins/wp-opening-hours/classes/OpeningHours/Module/Shortcode/IsOpen.php
The text was updated successfully, but these errors were encountered:
ash-tsc
changed the title
wish: extend Shortcode/IsOpen.php / next_format by %5$s- %6$s in order to allow display of complete working hours of a day even if teams takes a two hour break to eat in between.
wish: extend Shortcode/IsOpen.php / next_format by %5$s- %6$s in order to allow display of complete working hours of a day even if team takes a two hour break to eat in between.
Jul 1, 2019
The problem here is that the next_format is static but the number of periods per day may change (so the number of placeholder parameters changes per day if not all have the same number of periods). So when the parameters were just extended, the error message above would occur on some days and on some days not, which will probably lead to more confusion.
The only possible solution ATM is to use the appropriate filter as suggested in the linked issue:
Custom next period message with all periods of the day: You can use the op_is_open_format_next filter for this. The filter function will get the $todayData as the fourth argument which contains all of the periods, holidays and irregular openings on that day
Bummer. Then we will have to go for:
Because not displaying the complete working hours of the day seems to confuse doctors and patients! ;)
Thanks anyway!
[op-is-open set_id="352" open_text="Unsere Praxis in Arbergen ist geöffnet." closed_text="Unsere Praxis in Arbergen ist geschlossen." closed_holiday_text="Unsere Praxis in Arbergen ist aufgrund von %1$s geschlossen." show_next="true" next_format="Wir sind am %2$s den %1$s von %3$s bis %4$s und %5$s- %6$s Uhr wieder für Sie da!" show_today="open" today_format="Heutige Öffnungszeiten: %1$s"]
Warning: sprintf(): Too few arguments in /www/htdocs/w011cae2/wordpress.zoum.de/wp-content/plugins/wp-opening-hours/classes/OpeningHours/Module/Shortcode/IsOpen.php
The text was updated successfully, but these errors were encountered: