{"id":42520732,"url":"https://github.com/badasswp/ping-me-on-slack","last_synced_at":"2026-01-28T15:18:09.049Z","repository":{"id":246896014,"uuid":"824068525","full_name":"badasswp/ping-me-on-slack","owner":"badasswp","description":"Get notified on Slack for changes made on WP.","archived":false,"fork":false,"pushed_at":"2025-08-15T16:14:28.000Z","size":1696,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T01:44:44.891Z","etag":null,"topics":["ping","plugin","slack","wordpress"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/ping-me-on-slack/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badasswp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-04T09:50:12.000Z","updated_at":"2025-10-02T09:21:15.000Z","dependencies_parsed_at":"2025-01-02T02:23:47.126Z","dependency_job_id":"348a42f7-342e-4d71-bbdc-bcc10520b6f9","html_url":"https://github.com/badasswp/ping-me-on-slack","commit_stats":null,"previous_names":["badasswp/ping-my-slack"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/badasswp/ping-me-on-slack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fping-me-on-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fping-me-on-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fping-me-on-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fping-me-on-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badasswp","download_url":"https://codeload.github.com/badasswp/ping-me-on-slack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badasswp%2Fping-me-on-slack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ping","plugin","slack","wordpress"],"created_at":"2026-01-28T15:18:08.356Z","updated_at":"2026-01-28T15:18:09.041Z","avatar_url":"https://github.com/badasswp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ping-me-on-slack\n\nGet notifications on Slack when changes are made on your WP website.\n\n[![Coverage Status](https://coveralls.io/repos/github/badasswp/ping-me-on-slack/badge.svg?branch=master)](https://coveralls.io/github/badasswp/ping-me-on-slack?branch=master)\n\n![screenshot-1](https://github.com/user-attachments/assets/667ab2fb-24c1-4d4d-ae83-5a89fc848710)\n\n## Download\n\nDownload from [WordPress plugin repository](https://wordpress.org/plugins/ping-me-on-slack/).\n\nYou can also get the latest version from any of our [release tags](https://github.com/badasswp/ping-me-on-slack/releases).\n\n## Getting Started\n\nTo get started, you would need to have an incoming webhook of your own. Head over to the URL below and follow the instructions to generate your webhook:\n\n```\nhttps://api.slack.com/messaging/webhooks\n```\n\nIf you have done this successfully, you should have something that looks like so:\n\n```\nhttps://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\n```\n\nSave these details into your __Ping Me On Slack__ options page and you are ready to go!\n\n![ping-me-on-slack](https://github.com/badasswp/ping-me-on-slack/assets/149586343/1da2be61-ab22-42ac-bf9b-63df814c093d)\n\n## Why Ping Me On Slack?\n\nEver needed to keep track of what's happening on your website? No need to look further. It does a fantastic job of logging every single activity on your website to your preferred Slack channels. It is simple and fast!\n\n* Get notified when a user creates, modifies or deletes a Post, Page or Image.\n* Get notified when a user creates, or posts a Comment.\n* Get notified when a user installs or activates, a Theme or Plugin.\n* Get notified when a user creates, modifies or deletes a User.\n* Get notified when a user logs in \u0026 out.\n\n### Hooks\n\n#### `ping_me_on_slack_dispatcher`\n\nThis custom hook (filter) provides the ability to customise the global Slack client. For e.g. To use your own custom Slack client, you can do:\n\n```php\nuse MySlackClient;\n\nadd_filter( 'ping_me_on_slack_dispatcher', [ $this, 'slack_client' ], 10, 1 );\n\npublic function slack_client( $client ) {\n    return new MySlackClient();\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Interfaces\\Dispatcher}`_ By default this will be the global Slack client class that implements the `Dispatcher` interface.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_{$post_type}_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_post_client', [ $this, 'post_client' ], 10, 1 );\n\npublic function post_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#posts'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_{$post_type}_message`\n\nThis custom hook (filter) provides the ability to add a custom `Post` message to be sent to your Slack Workspace. For e.g. To send a custom message when a Post draft is created by a user, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_post_message', [ $this, 'post_message' ], 10, 3 );\n\npublic function post_message( $message, $post, $event ): string {\n    if ( 'draft' === $event ) {\n        $message = sprintf(\n            'Attention: A Post draft with ID: %d was just created, by %s!',\n            $post-\u003eID,\n            get_user_by( 'id', $post-\u003epost_author )-\u003edisplay_name\n        );\n    }\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- post _`{WP_Post}`_ By default this will be the WP Post object.\n- event _`{string}`_ By default this will be the event that just happened.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_form_fields`\n\nThis custom hook (filter) provides a way to implement new Admin fields in the plugin's admin page. For e.g. To add a new text field, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_form_fields', [ $this, 'custom_field' ] );\n\npublic function custom_field( $fields ): array {\n    return wp_parse_args(\n        [\n            'telephone' =\u003e [\n                'type'  =\u003e 'text',\n                'name'  =\u003e 'ping_me_on_slack_telephone',\n                'html'  =\u003e esc_html__( 'My Telephone', 'ping-me-on-slack' ),\n                'label' =\u003e esc_html__( '(555) 555-1234', 'ping-me-on-slack' ),\n            ]\n        ],\n        $fields\n    );\n}\n```\n\n**Parameters**\n\n- fields _`{mixed[]}`_ By default this will be an associative array, containing fields options.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_comment_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_comment_client', [ $this, 'comment_client' ], 10, 1 );\n\npublic function comment_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#comments'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_comment_message`\n\nThis custom hook (filter) provides the ability to add a custom `Comment` message to be sent to your Slack Workspace. For e.g. To send a custom message when a Comment is trashed by a user, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_comment_message', [ $this, 'comment_message' ], 10, 3 );\n\npublic function comment_message( $message, $comment, $event ): string {\n    if ( 'trash' === $event ) {\n        $message = sprintf(\n            'Attention: A Comment with ID: %d was just trashed, by %s!',\n            $comment-\u003eID,\n            wp_get_current_user()-\u003edisplay_name\n        );\n    }\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- comment _`{WP_Comment}`_ By default this will be the WP Comment object.\n- event _`{string}`_ By default this will be the event that just happened.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_on_ping_error`\n\nThis custom hook (action) fires immediately after the Ping call is made and an exception is thrown. For e.g. you can capture errors here like so:\n\n```php\nadd_action( 'ping_me_on_slack_on_ping_error', [ $this, 'log_ping_errors' ], 10, 1 );\n\npublic function log_ping_errors( $e ): void {\n    if ( $e instanceOf \\Exception ) {\n        wp_insert_post(\n            [\n                'post_type'   =\u003e 'ping_me_on_slack_logs',\n                'post_title'  =\u003e sprintf(\n                  'Fatal Error: %s'\n                  (string) $e-\u003egetMessage()\n                ),\n            ]\n        )\n    }\n}\n```\n\n**Parameters**\n\n- e _`{Exception}`_ By default this will be an Exception.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_login_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_login_client', [ $this, 'login_client' ], 10, 1 );\n\npublic function login_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#login-attempts'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_login_message`\n\nThis custom hook (filter) provides the ability to add a custom `Login` message to be sent to your Slack Workspace. For e.g. To send a custom message when an Administrator logs in, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_login_message', [ $this, 'login_message' ], 10, 2 );\n\npublic function login_message( $message, $user ): string {\n    if ( in_array( 'administrator', $user-\u003eroles, true ) ) {\n        $message = sprintf(\n            'Attention: An Administrator with ID: %d just logged in!',\n            $user-\u003eID\n        );\n    }\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- user _`{WP_User}`_ By default this will be the WP User object.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_logout_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_logout_client', [ $this, 'logout_client' ], 10, 1 );\n\npublic function logout_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#logout-attempts'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_logout_message`\n\nThis custom hook (filter) provides the ability to add a custom `Logout` message to be sent to your Slack Workspace. For e.g. To send a custom message when an Administrator logs out, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_logout_message', [ $this, 'logout_message' ], 10, 2 );\n\npublic function logout_message( $message, $user ): string {\n    if ( in_array( 'administrator', $user-\u003eroles, true ) ) {\n        $message = sprintf(\n            'Attention: An Administrator with ID: %d just logged out!',\n            $user-\u003eID\n        );\n    }\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- user _`{WP_User}`_ By default this will be the WP User object.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_theme_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_theme_client', [ $this, 'theme_client' ], 10, 1 );\n\npublic function theme_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#theme-changes'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_theme_message`\n\nThis custom hook (filter) provides the ability to add a custom `theme` message to be sent to your Slack Workspace. For e.g. To send a custom message when a user switches a theme:\n\n```php\nadd_filter( 'ping_me_on_slack_theme_message', [ $this, 'theme_message' ], 10, 2 );\n\npublic function theme_message( $message, $user ): string {\n    if ( in_array( 'administrator', $user-\u003eroles, true ) ) {\n        $message = sprintf(\n            'Attention: An Administrator with ID: %d just logged out!',\n            $user-\u003eID\n        );\n    }\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- theme _`{WP_Theme}`_ By default this will be the WP Theme object.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_creation_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_creation_client', [ $this, 'user_creation_client' ], 10, 1 );\n\npublic function user_creation_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#user-additions'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_creation_message`\n\nThis custom hook (filter) provides the ability to add a custom `user_creation` message to be sent to your Slack Workspace. For e.g. To send a custom message when a User is created, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_creation_message', [ $this, 'user_creation_message' ], 10, 2 );\n\npublic function user_creation_message( $message, $user_id ): string {\n    $message = sprintf(\n        'Attention: A User with ID: %d was just created!',\n        $user_id\n    );\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- user_id _`{int}`_ By default this will be the User ID.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_deletion_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_deletion_client', [ $this, 'user_deletion_client' ], 10, 1 );\n\npublic function user_deletion_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#user-deletions'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_deletion_message`\n\nThis custom hook (filter) provides the ability to add a custom `user_deletion` message to be sent to your Slack Workspace. For e.g. To send a custom message when a User is created, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_deletion_message', [ $this, 'user_deletion_message' ], 10, 2 );\n\npublic function user_deletion_message( $message, $user_id ): string {\n    $message = sprintf(\n        'Attention: A User with ID: %d was just deleted!',\n        $user_id\n    );\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- user_id _`{int}`_ By default this will be the User ID.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_modification_client`\n\nThis custom hook (filter) provides the ability to customise the Slack client. For e.g. To send with a custom username, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_modification_client', [ $this, 'user_modification_client' ], 10, 1 );\n\npublic function user_modification_client( $client ) {\n    $client-\u003eargs = [\n        'username' =\u003e 'John Doe',\n        'channel'  =\u003e '#user-edits'\n    ];\n\n    return $client;\n}\n```\n\n**Parameters**\n\n- client _`{\\PingMeOnSlack\\Core\\Client}`_ By default this will be the Client instance.\n\u003cbr/\u003e\n\n#### `ping_me_on_slack_user_modification_message`\n\nThis custom hook (filter) provides the ability to add a custom `user_modification` message to be sent to your Slack Workspace. For e.g. To send a custom message when a User is created, you could do:\n\n```php\nadd_filter( 'ping_me_on_slack_user_modification_message', [ $this, 'user_modification_message' ], 10, 2 );\n\npublic function user_modification_message( $message, $user_id ): string {\n    $message = sprintf(\n        'Attention: A User with ID: %d was just modified!',\n        $user_id\n    );\n\n    return (string) $message;\n}\n```\n\n**Parameters**\n\n- message _`{string}`_ By default this will be the passed message.\n- user_id _`{int}`_ By default this will be the User ID.\n\u003cbr/\u003e\n\n---\n\n## Contribute\n\nContributions are __welcome__ and will be fully __credited__. To contribute, please fork this repo and raise a PR (Pull Request) against the `master` branch.\n\n### Pre-requisites\n\nYou should have the following tools before proceeding to the next steps:\n\n- Composer\n- Yarn\n- Docker\n\nTo enable you start development, please run:\n\n```bash\nyarn start\n```\n\nThis should spin up a local WP env instance for you to work with at:\n\n```bash\nhttp://ping.localhost:4017\n```\n\nYou should now have a functioning local WP env to work with. To login to the `wp-admin` backend, please username as `admin` \u0026 password as `password`.\n\n__Awesome!__ - Thanks for being interested in contributing your time and code to this project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fping-me-on-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadasswp%2Fping-me-on-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadasswp%2Fping-me-on-slack/lists"}