A lightweight, performance-focused WordPress plugin using the native Web Share API with graceful fallbacks for Twitter, Facebook, and LinkedIn.
- 🧠 Uses native Web Share API (if supported)
- 🌗 Auto Dark Mode support (via
prefers-color-scheme) - 💨 No dependencies (zero jQuery)
- ⚙️ Configurable from WordPress Dashboard:
- Button position (above, below, both content)
- Enable/disable specific social platforms (Twitter, Facebook, LinkedIn)
- 🧱 Lightweight: ~10KB including CSS + JS
- Download the latest release from Releases.
- Upload the folder to your WordPress site at:
/wp-content/plugins/native-social-share-wp/ - Activate the plugin from Plugins → Installed Plugins.
- Go to Settings → Native Social Share to configure:
- Position: Above or below or both post content
- Which social buttons to show
/native-social-share-wp/
├── assets/
│ ├── css/
│ │ └── style.css
│ └── js/
│ └── share.js
├── native-social-share.php
└── readme.txt
| Option | Description | Default |
|---|---|---|
| Position | Where to show buttons (Above / Below / Both content) | Below |
| Enabled Buttons | Choose which social buttons appear | All enabled |
| Auto Dark Mode | Adapts to system theme automatically | Enabled |
| Feature | Supported Browsers |
|---|---|
Native Share (navigator.share) |
Chrome, Edge, Safari, Android WebView |
| Fallback Links | All browsers |
- 🔧 Updated prefix from
nss→natssh(WordPress.org compliance) - 🧩 Added PHP namespace
Mkhuda\NativeSocialShare - ⚙️ Improved option migration for smoother upgrades
- 🧾 Fixed license mismatch between files (
GPL-2.0-or-later) - 🧼 Minor code cleanup and PHPCS/WPCS compliance
- 📦 Updated readme + assets for submission to WP Plugin Directory
- Added “Both (Above & Below)” position option for more flexibility
- Initial public release with native share + fallback buttons
- ✨ Added Auto Dark Mode support
- 🧰 Added configurable social buttons
- 🪶 Simplified CSS for cleaner look
- Written in pure PHP + Vanilla JS
- Safe to use with caching/CDN
- 100% compliant with WordPress coding standards
- License: GPLv3 or later
M Khoirul Huda
https://mkhuda.com
If you like this plugin, give it a ⭐ on GitHub or mention it on your blog!

