| 开发者 | icptd |
|---|---|
| 更新时间 | 2026年10月31日 00:37 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[ptd_gtfs_lines]: the list of lines. Options: modes="tram,bus", layout="destinations", tabs="yes", night="mixed", heading="3".[ptd_gtfs_line]: the line page. Put it, or the Line timetable block, on one page: every list of lines links there.[ptd_gtfs_timetable stop="123"]: the timetable of a stop; add route="7" for one line only.[ptd_gtfs_departures stop="123" limit="8"]: the next departures from a stop.Many transport authorities publish theirs as open data, you can export a GTFS feed from your scheduling system, or contact us: we can help your company or municipality create and maintain one.
Import it from its public address instead, or with WP-CLI on the server: wp ptd-gtfs-schedules import --file=feed.zip.
As often as you choose in the settings: daily, weekly or manually. Automatic updates import from the feed's address at night through WP-Cron. On sites with little traffic, set up a real cron job for wp-cron.php, or run wp ptd-gtfs-schedules import from the server's cron. Automatic updates replace data imported from an uploaded file.
Use the ptd_gtfs_schedules_line_url filter to give each line the address you want. The ptd_gtfs_schedules_is_night_line filter decides which lines count as night lines, and the ptd_gtfs_schedules_imported action runs after every import.
Many open data licences require it. Enter the credit under Data source credit in the settings, and it is shown under the timetables.