XMPP Enabled provides a single function API for other plugins that use Jabber/XMPP messaging protocol.
See API section for details if you want to use XMPP protocol in your notifications.
- GitHub page: https://github.com/sandfox-im/xmpp-enabled
- Packagist page: https://packagist.org/packages/sandfox-im/xmpp-enabled
- Mako N (Japanese translation and i18n support)
The Single Function
The single function for sending XMPP Messages is
xmpp_enabled. It can be called directly from any WordPress plugin
xmpp_enabled($recipient, $message, $subject='', $type='normal');
- $recipient is a valid (bare or full) JID of the recipient like ‘firstname.lastname@example.org’
- $message is a plain text message to be sent
- $subject is a title line for message. It is usually omitted for chat-type messages
- $type is a type of message. It can be ‘chat’, ‘normal’ or ‘headline’. See RFC 3921 for details
xmpp_send('email@example.com',"Read our new post:\nhttp://something.com/new-post",'New post is published','headline');
Create submenu in the XMPP Enabled section
XMPP Enabled creates it’s own section and you’re free to use it for your plugins. The code is
add_submenu_page('xmpp-enabled', 'Jabber Comment Notifications', 'Comment Notifications', 'administrator', __FILE__, 'jcommnotify_settings');
See Adding Administration Menus in WordPress Codex for further details
xmpp-enabledfolder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Set up default Jabber account in XMPP Enabled Settings page
- Why the distinct plugin?
To provide a single XMPP account settings page for all Jabber notification plugins
- Can it send messages to multiple contacts?
It’s safe to use xmpp_send() multiple times. All calls will use the same connection
Contributors & Developers
“XMPP Enabled” is open source software. The following people have contributed to this plugin.Contributors
- Japanese translation and internationalisation support from Mako N
- Consider plugin is stable 🙂
- Installation via composer
sand-fox.com to sandfox.org
- minor bugfixes
- Fixed array serialization in logs
- PHP5 is now required minimum
- Bugfix for disabling encryption
- Multiple calls to xmpp_send() now use single connection
- Now user can disable encryption
- Fixed menu creation priority
- Fixed wrong behaviour for custom hostnames.
- Improved logging
- A small usability change.
- A first public beta.