Skip to content

Instantly share code, notes, and snippets.

View daltonrooney's full-sized avatar

Dalton Rooney daltonrooney

View GitHub Profile
@mgratch
mgratch / remove-html.php
Last active October 19, 2016 17:38
Batch Strip HTML tags from post/page content. BACKUP YOUR DB BEFORE USING THIS! The plugin should deactivate itself if it's successful.
<?php
/*
* Plugin Name: Remove HTML
* Description: batch Remove HTML from post_content
* Author: Marc Gratch
* Author URI: http://marcgratch.com
* Version: 0.1.0
*/
function rh_get_all_ids(){
$args = array ('post_type' => array('post','page'), 'fields' => 'ids', 'posts_per_page' => -1);
@brettburwell
brettburwell / img.html
Last active June 26, 2018 09:05
Craft macro to centralize the markup and config for responsive images
{# ================================================================== #}
{# Responsive Image Macro
{# ================================================================== #}
{#
Macro to centralize the markup and config for responsive images.
Based on an article by Marion Newlevant (@marionnewlevant) and
adapted for the Lazysizes plugin. Read more:
https://straightupcraft.com/articles/responsive-images-with-twig-macros
@HMilbradt
HMilbradt / formulate-mapper.js
Last active January 2, 2021 17:52
Maps Formulate
/*
Usage:
let person = {
name: "Harrison",
age: 200,
address: {
street: "12345 Street",
zip: "abcde"
},