| 开发者 | morehawes |
|---|---|
| 更新时间 | 2026年11月21日 11:22 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.3 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[Waymark] Shortcode, or link to the Map Details page.
<img src="https://example.com/icon.svg">, or a more complex structure). So you can pretty much create any kind of Icon you want.
For developers:
waymark- classes.
waymark_map.waymark_collection Taxonomy.[Waymark] Shortcode anywhere they are supported, or dynamically using the do_shortcode(["Waymark"]) function.type Property, i.e. {feature: { geometry: { type: 'Point', coordinates: [0, 0] } }, properties: { type: 'Alert', title: 'Bridge Removed!' }.layer.feature.properties Object.waymark_loaded_callback callback function.help/, built with @nuxt/content. Node 24.15 or newer is required.
bash
cd help
npm ci
npm run sync-assets
npm run dev
The local preview runs at http://localhost:11003. To build the static site for GitHub Pages:
bash
NUXT_APP_BASE_URL=/waymark-wp/ npm run generate
Assets
Styles and scripts are compiled from Less and JavaScript sources into the minified bundles enqueued by the plugin — edit the sources, not the build output:
assets/ — the plugin CSS (compiled from assets/less/) and JavaScript, served as the front and admin bundles.waymark-js/ — the bundled Waymark JS library powering the Viewer and Editor: sources in src/ and libs/, built into dist/.waymark text domain, with the translation template at languages/waymark.pot.
Waymark_Lang, the JavaScript language defaults and the documentation demo config, so update all three when adding or changing a string.npm run i18n:check verifies that the PHP, JavaScript and documentation language defaults stay in parity, and that waymark_php_lang keys are both localised and read.npm run grunt rebuilds the POT and compiled assets after source changes.npm run dev may seed that instance with demo data when it is untouched. The wp-env environment (npm run dev) must be running first.
```bash
JavaScript unit tests (Vitest, jsdom) — Viewer, Editor and description sanitisation
npm run test:js
PHP integration tests (PHPUnit against the WordPress test library)
npm run test:php
Browser end-to-end tests (Playwright/Chromium) — login, Maps, Markers, responsive admin layout, front-end
npm run test:e2e
Run all three in sequence
npm test
One-off: prepare the tests container (after a fresh "wp-env destroy")
npm run test:php:setup
```
All three suites also run automatically in CI on pull requests and pushes to master.
wp-env pins PHP 8.3 to match the plugin's declared floor. WP_ENV_PHP_VERSION and WP_ENV_CORE override the PHP and WordPress versions — useful for testing a release candidate or a newer PHP:
bash
WP_ENV_PHP_VERSION=8.5 WP_ENV_CORE=WordPress/WordPress#trunk npm run test:php
npm run test:php:lint checks PHP syntax at the floor. CI exercises both boundaries — WordPress 6.4 with PHP 8.3, and current WordPress with PHP 8.5 — while the browser suite runs on current WordPress only.
Yes, please view the Help.
Yes! While the Google Maps API is not used, Google Basemaps can be added to Waymark as raster tiles.
Please! Waymark is localization ready, translation contributions are greatly appreciated.
npm run dev seeds an untouched development instance with demo data, whose photos carry EXIF metadata and whose markers carry descriptions.temp/ directory.