Primary responsibility
Opens a URL — either inside an in-app webview or by punching out to the system browser. Supports per-button URL substitutions (user id, locale, account code, current post id).
Settings
| Setting |
Type |
Environment |
Purpose |
url |
text |
per-button |
The URL to open |
webview |
yes-no |
per-button |
If on, render in-app; if off, open system browser |
pass_user_id |
yes-no |
per-button |
Append ?user_id= to the URL |
pass_account_code |
yes-no |
per-button |
Append ?account_code= |
share_cookies |
yes-no |
per-button |
Inject WP auth cookies into the webview (lets the webview see the user as logged in) |
style_* |
various |
per-button |
Colors, icon |
URL substitution tokens
Inside the configured URL string:
| Token |
Replaced with |
[user_id] |
MAM_Current_Request->user_id() |
[user_email] |
Current user’s email |
[account_code] |
MAM_Account_Code_Manager::get() |
[locale] |
App’s resolved locale |
[post_id] |
Current post id (when invoked from a detail screen) |
Gotchas
webview = off punches out — once the user leaves the app, they leave. Use on for any URL the user should return from.
share_cookies = on is powerful but cross-origin. The webview only sees WP auth cookies for the same domain as the WP site. URLs on other domains see no auth state.
- Punch-out URLs are the most-common Web URL use case (terms of service, privacy policy, customer-support links). For dynamic per-user URLs, prefer the substitution tokens over building URLs in PHP via
mam_get_phone_data_before_send.
Related articles
- Content classes overview
- Content class: Punch Out
- Mobile JSON shape
| Field |
Value |
| Article type |
Screen Reference |
| Plugin slug |
mam-main |
| Applies to plugin version |
2.1.11+ |
| Category |
App Settings Reference |
| Audience |
WordPress admin / PHP developer |
| Class name |
local_app_web_url (frozen) |
| Source file |
includes/content-classes/local-app-web-url-class.php |
| Last verified |
2026-05-02 |