Skip to content

Instantly share code, notes, and snippets.

View mikedance's full-sized avatar

Michael Dance mikedance

  • The Motley Fool
  • Washington D.C.
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:mi="http://schemas.ingestion.microsoft.com/common/"
xmlns:dcterms="http://purl.org/dc/terms/">
<channel>
<title>Motley Fool Headlines</title>
<link>https://www.fool.com</link>
<description>Latest Motley Fool Headlines</description>
@mikedance
mikedance / generate-gutenberg-css.php
Created October 9, 2018 19:50
Generate CSS class rules for custom color palettes and font sizes in WordPress/Gutenberg
/**
* Generate CSS for Gutenberg's has-*-color, has-*-background-color
* and has-*-font-size, based on our colors/sizes. This works on the
* frontend and in the backend editor.
*/
add_action( 'wp_print_scripts', function() {
$string = '<style>';
// color palette