# Falah Shortcodes — WordPress Plugin Implements all missing shortcodes for ummah.falahos.my. ## Installation 1. Upload the `falah-shortcodes/` folder to `/wp-content/plugins/` 2. Activate in **Plugins → Installed Plugins** 3. Configure in **Settings → Falah Shortcodes**: - Set **Falah Mobile URL** (default: `https://falahos.my/mobile`) - Set default prayer city/country ## Shortcodes | Shortcode | Page | Notes | |-----------|------|-------| | `[prayer_times]` | /tools | Calls Aladhan API — no key needed | | `[dhikr_counter]` | /tools | localStorage — works offline | | `[qibla_compass]` | /tools | Requires browser geolocation permission | | `[daily_verse]` | /tools | Calls Al-Quran Cloud API — no key needed | | `[nur_ai_chat]` | /nur | Iframes Falah Mobile `/nur` | | `[falah_wallet]` | /wallet | Iframes Falah Mobile `/wallet` | | `[souq_marketplace]` | /souq | Iframes Falah Mobile `/souq` | | `[falah_dashboard]` | /dashboard | Auto-injected if dashboard page is empty | ## Deploying Falah Mobile (required for nur/wallet/souq) Run from the falah-os-ce directory: ```bash bash deploy-falah-mobile.sh 13.140.161.244 root ``` Then add this to the Nginx vhost for falahos.my: ```nginx location /mobile { proxy_pass http://127.0.0.1:4013; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } ``` Update **Settings → Falah Shortcodes → Falah Mobile URL** to `https://falahos.my/mobile`. ## What each standalone feature uses - **Prayer Times** — [Aladhan API](https://aladhan.com/prayer-times-api) (free, no auth) - **Daily Verse** — [AlQuran.cloud API](https://alquran.cloud/api) (free, no auth) - **Dhikr Counter** — browser localStorage (no network call) - **Qibla Compass** — browser Geolocation + DeviceOrientation APIs (no network call)