Skip to content

Instantly share code, notes, and snippets.

View frnwtr's full-sized avatar
🦧

Walter Franchetti frnwtr

🦧
View GitHub Profile
const WordpressPurgeCSS = {
whitelist: [
"rtl",
"home",
"blog",
"archive",
"date",
"error404",
"logged-in",
"admin-bar",
### Keybase proof
I hereby claim:
* I am frnwtr on github.
* I am frnwtr (https://keybase.io/frnwtr) on keybase.
* I have a public key whose fingerprint is 5C60 02A8 1C71 387C C94D 4F4D 019D 688B 8386 96B3
To claim this, I am signing this object:
@frnwtr
frnwtr / wp_facebook_cache_update.php
Last active January 3, 2016 00:39
Auto update Facebook OG cache on Wordpress post save
<?php
function facebook_cache_update( $post_id ) {
// If this is just a revision, don't update
if ( wp_is_post_revision( $post_id ) )
return;
$url="https://graph.facebook.com/";
$post_url = get_permalink( $post_id );
$response = wp_remote_post( $url, array(