Skip to content

Instantly share code, notes, and snippets.

@gummiforweb
gummiforweb / .jsbeautifyrc
Last active July 28, 2017 05:01
HTMLPrettify Sample
{
"html": {
"allowed_file_extensions": ["php", "htm", "html", "xhtml", "shtml", "xml", "svg"],
"max_preserve_newlines" : 1
}
}
@gummiforweb
gummiforweb / slack-cleaner.js
Last active August 12, 2022 11:51 — forked from firatkucuk/delete-slack-messages.js
Clean up your Slack messages or files from either public channel, private channel, private message or group message. Fully interactive.
/**
* User Defined Values
*/
const agreedDisclaimer = false;
const apiToken = '';
/**
* Dont need to touch anything below
*/
const readline = require('readline');
@gummiforweb
gummiforweb / functions.php
Created January 27, 2018 22:25
ACF Gallery Field: Pull from default language's images
<?php
add_filter('acf/load_value/type=gallery', 'acf_load_translated_attachment_ids');
function acf_load_translated_attachment_ids($value) {
// if the current language is the default language,
// then we don't need to fetch the translated ids
if (acf_get_setting('default_language') == acf_get_setting('current_language')) {
return $value;
}
@gummiforweb
gummiforweb / functions.php
Last active February 21, 2019 09:49
ACF Component Field - Save component in sub folders
<?php
// NOTE: You'd have to create /acf-json/components/ foler in the theme manually first,
// just like how you'd manutally create the acf-json folder
/**
* In /includes/json.php:17, is where the acf_json write the local json file.
* So this hook has to be 9, just before acf write the file.
*/