Build Status:
Tested with: WordPress 3.6.1, WordPress 4.1.1 and WordPress 4.2.2
Tested with: PHP 5.4 and PHP 5.5
License: The MIT License
short_open_tag
must be enabled in php.ini file, it's usually enabled by default. If not, check this.
This plugin sends notifications when
- a new post/page/custom post type published
- a post/page/custom post type updated
- a post/page/custom post type deleted
- a new comment pending approval
- a new category created
- a new category deleted
- a new ping received
- a new trackback received
- theme switched
- a new user registered
- a user is removed
- a user logged in NEW FEATURE
You can send custom Slack notifications within your theme or plugin . To achieve this, slack-wordpress declares a global variable $slack_plugin
for you. You can send notification like this :
<?php
global $slack_plugin;
$channel_to_post = 'CXXXXXXXX';
$msg = 'test';
$slack_plugin->getApi()->publish_post($channel_to_post, $msg);
publish_post()
returns response of chat.postMessage , you can look at Response section. Also you can check Formatting section to formatting your message.