Skip to content

Instantly share code, notes, and snippets.

View faq_graph_schema.php
<?php
/**
* Render the schema graph for the acf/gb-faq block.
*
* @param array $graph Schema data for the current page.
* @param WP_Block_Parser_Block $block The block data array.
* @param Meta_Tags_Context $context A value object with context variables.
*
* @return array Our Schema graph.
*/
@Luehrsen
Luehrsen / Lazysizes.php
Created Jan 14, 2021
A lazysizes implementation for WordPress
View Lazysizes.php
<?php
/**
* Lhtheme\Lazysizes\Component class
*
* @package lhtheme
*/
namespace WpMunich\lhtheme\Lazysizes;
use WpMunich\lhtheme\Component_Interface;
use function add_action;
@Luehrsen
Luehrsen / limitBlockToPostType.js
Created Mar 28, 2019
Removes the block type on non-whitelisted post types
View limitBlockToPostType.js
/**
* Removes the block type on non-whitelisted post types
*
* @param {Array} postTypeNames An array of post type names as white list for this block
* @param {string} blockName The name of the block
*
* @example
* limitBlockToPostType( [ 'page' ], 'core/paragraph' );
*
* @return {void}
View functions.php
/**
* The function that extends the default quicklink options
*
* @param array $options The default Quicklink options.
*
* @return array The extended Quicklink options
*/
function my_extended_quicklink_options( $options ) {
// Do not preload 'add to wishlist' links.
View functions.php
/**
* The function that extends the default quicklink options
*
* @param array $options The default Quicklink options.
*
* @return array The extended Quicklink options
*/
function my_extended_quicklink_options( $options ) {
// Do not preload 'add to wishlist' links.
View Keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@Luehrsen
Luehrsen / functions.php
Last active Aug 14, 2018
WordPress Responsive Embeds
View functions.php
/**
* Change the embed code, so we can apply awesome css classes
* Called by filter "oembed_result"
*
* @author Hendrik Luehrsen
* @since 1.0
*
* @param $html string The oembed html to edit
*
* @return string The edited html