Skip to content

Instantly share code, notes, and snippets.

View danielpost's full-sized avatar

Daniel Post danielpost

View GitHub Profile

Keybase proof

I hereby claim:

  • I am danielpost on github.
  • I am danielpost (https://keybase.io/danielpost) on keybase.
  • I have a public key ASCuupmXsGBf5Ty9o_cgesJEsf40Y_LcbynZIB_xnJicxgo

To claim this, I am signing this object:

@danielpost
danielpost / actions.php
Last active March 11, 2017 10:32
Preload blurred image and fade in full image
<?php
/**
* Adds a Base64 encoded version of the Featured Image thumbnail
* to post meta
*
* @param int $post_id ID of the post that's being updated.
*/
function dp_add_base64_featured_image_thumb($post_id) {
// If this is just a revision, don't do anything.
if (wp_is_post_revision($post_id)) {
@danielpost
danielpost / acf-options.php
Last active May 6, 2020 15:28
ACF Wrapper - easier way to register ACF fields using PHP
<?php
$reusable_checkbox_field = array(
'type' => 'checkbox',
'choices' => array(
'red' => __('Red', THEME_SLUG),
'white' => __('White', THEME_SLUG),
'blue' => __('Blue', THEME_SLUG),
),
);