WordPress plugin: announce posts via Slack
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
class-wp-publish-to-slack.php
readme.txt
wp-slack.php

README.md

A Slackbot that announces whenever a new WordPress post is published. Includes author, title and link. Customizable via filters to support additional metadata.

Installation

  1. Upload wp-slack to the /wp-content/plugins/ directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Set up the wp_slack_endpoint filter
add_filter( 'wp_slack_endpoint', function() {
  return 'https://hooks.slack.com/services/xyzxyz/abcabcabc/defdef';
});

Selected filters

  • Use wp_slack_is_enabled to disable posting in development or staging environments
  • Use wp_slack_post_types to add support for custom post types.
  • Use wp_slack_label1/wp_slack_value1 (and wp_slack_label2/wp_slack_value2) for custom metadata.

See source code for complete list of filters.

Changelog

0.5

  • Initial release