Skip to content

Instantly share code, notes, and snippets.

View PH-F's full-sized avatar

Patrick PH-F

View GitHub Profile
@PH-F
PH-F / user-profile-picture.php
Created March 24, 2021 14:11 — forked from spigotdesign/user-profile-picture.php
Add WordPress image uploader to user profile.
/*
* Add custom user profile information
*
*/
add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );
function my_show_extra_profile_fields( $user ) { ?>
@PH-F
PH-F / PostMessageToSlackChannel.php
Created January 22, 2018 16:06 — forked from nadar/PostMessageToSlackChannel.php
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit: https://api.slack.com/custom-integrations/legacy-tokens
* The token will look something like this `xoxo-2100000415-0000000000-0000000000-ab1ab1`.
*
* @param string $message The message to post into a channel.
* @param string $channel The name of the channel prefixed with #, example #foobar