Skip to content

Instantly share code, notes, and snippets.

View drakebyte's full-sized avatar

Drakebyte drakebyte

View GitHub Profile
@drakebyte
drakebyte / functions.php
Created May 29, 2024 23:17 — forked from domtra/functions.php
Store complex ACF fields as JSON
<?php
namespace Flynt\AcfPerformance;
define('ACF_STORE_AS_JSON', true);
add_action('acf/init', function () {
$types = acf()->fields->types;
replaceLoadValue($types);
if (defined('ACF_STORE_AS_JSON') && ACF_STORE_AS_JSON) {
@drakebyte
drakebyte / git-reset-author.sh
Created June 26, 2022 17:15 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD