Skip to content

Instantly share code, notes, and snippets.

@jeroenlammerts
jeroenlammerts / functions.php
Last active May 22, 2021
Get Wordpress image in ACF style array.
View functions.php
<?php
function my_image($image_id) {
// Optional placeholder image
// if (! $image_id) {
// return get_field('placeholder', 'option');
// }
$img_sizes = get_intermediate_image_sizes();
View keybase.md

Keybase proof

I hereby claim:

  • I am jeroenlammerts on github.
  • I am jlammerts (https://keybase.io/jlammerts) on keybase.
  • I have a public key ASAcbU9ZSWxNqRkefabCJSylbwDFMTt2Ahv0LlpYUCT_Pwo

To claim this, I am signing this object:

@jeroenlammerts
jeroenlammerts / gist:de0471dc210749f4afe8d2e69bab46d8
Created Aug 31, 2017
Craft CMS 3 content migrations - create field
View gist:de0471dc210749f4afe8d2e69bab46d8
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
/**
* m170831_195046_second_migration migration.
*/
@jeroenlammerts
jeroenlammerts / gist:c5d8a5f56662264a90cb
Last active Aug 29, 2015
Check batch badges status on untappd
View gist:c5d8a5f56662264a90cb
// ==UserScript==
// @name Untappd show badges
// @namespace http://www.jeroenlammerts.nl/untappd
// @version 0.1
// @description Untappd show badges
// @match https://untappd.com/user/#username#/badges
// @copyright 2014, Jeroen Lammerts
// ==/UserScript==
View gist:9596159
<?php
function pre_option_posts_per_rss( $option ) {
return 2;
}
add_filter( 'pre_option_posts_per_rss', 'pre_option_posts_per_rss' );
@jeroenlammerts
jeroenlammerts / gist:9596095
Last active Aug 29, 2015
Wordpress RSS no limit
View gist:9596095
<?php
if (isset ($query->query_vars['feed']) and ($query->query_vars['feed'] == 'ics'))
add_filter('post_limits','no_limits_for_feed');
function no_limits_for_feed($limits) {
return ('') ;
}