This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foundation_gutenberg_wrappers() | |
{ | |
if (defined('WP_DEBUG') && WP_DEBUG) { | |
$gutenberg_file = '/js/raw/gutenberg.js?no_cache=' . time(); | |
} else { | |
$gutenberg_file = '/js/raw/gutenberg.js'; | |
} | |
wp_enqueue_script('foundation-gutenberg-extensions', get_template_directory_uri() . $gutenberg_file, array('wp-blocks')); | |
} | |
add_action('enqueue_block_editor_assets', 'foundation_gutenberg_wrappers'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
sourceMap: true, | |
sourceMapIncludeSources: true, | |
sourceMapIn: 'js/app.coffee.js.map' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acf.addFilter('color_picker_args', function (args) { | |
const settings = wp.data.select( "core/editor" ).getEditorSettings(); | |
let colors = settings.colors.map(x => x.color); | |
args.palettes = colors; | |
return args; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This is all you need to configure. | |
$app_key = ''; | |
$app_token = ''; | |
//These are our constants. | |
$api_base = 'https://api.twitter.com/'; | |
$bearer_token_creds = base64_encode($app_key.':'.$app_token); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Grunt Sitemap Generator | |
* Plugin URI: http://www.github.com/lgladdy | |
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
* Author: Liam Gladdy | |
* Author URI: http://gladdy.co.uk | |
* Version: 1.0 | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//block.json | |
{ | |
"name": "simple-test-block", | |
"title": "Simple Test Block", | |
"description": "Simple Test Block", | |
"category": "theme", | |
"icon": "admin-comments", | |
"acf": { | |
"mode": "preview", | |
"renderTemplate": "render.php" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* =WordPress Core - Sassified. | |
-------------------------------------------------------------- */ | |
.alignnone { | |
margin: 5px 20px 20px 0; | |
} | |
.aligncenter, div.aligncenter { | |
display: block; | |
margin: 5px auto 5px auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acf.addFilter('acf_blocks_parse_node_attr', function( currentValue, nodeAttr ){ | |
if (nodeAttr.name.startsWith('v-')) { | |
return { name: nodeAttr.name, value: nodeAttr.value }; | |
} | |
return currentValue; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "automatic-wide-width", | |
"title": "Automatically Align Wide", | |
"description": "A demo block.json for a forced align-wide block", | |
"apiVersion": 2, | |
"acf": { | |
"mode": "edit", | |
"renderTemplate": "render.php" | |
}, | |
"supports": { |