View Remove Wordpress Layout Support
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
// remove terrible experimental layout support | |
remove_filter( 'render_block', 'wp_render_layout_support_flag', 10, 2 ); | |
function understrap_experimental_layout( $metadata ) { | |
if ( !empty($metadata['supports']['__experimentalLayout'])) { | |
$metadata['supports']['__experimentalLayout'] = false; | |
} | |
return $metadata; | |
} | |
add_filter( 'block_type_metadata', 'understrap_experimental_layout', 10, 1 ); |
View marketo-form-overrides.scss
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
// marketo form overrides | |
// from https://jennamolby.com/how-to-create-responsive-marketo-forms/ | |
.mktoForm { | |
&, | |
.mktoLabel , | |
.mktoHtmlText , | |
.mktoFormRow, |
View favorite linux commands
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
sudo chown -vR webuser /not/webuser/ |
View Init responsive carousel
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
/** | |
* | |
* @file | |
* carousel.js - responsive carousel | |
* @author | |
* Andrew Magill <amagill@greaterthanone.com> | |
* | |
*/ | |
(function($) { |
View .htaccess
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# don't rewrite anything in docs folder to wordpress | |
RewriteCond %{REQUEST_URI} !^/(docs/*) [NC] |
View gulpfile.js
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
var gulp = require("gulp"); | |
var sass = require("gulp-sass"); | |
var sourcemaps = require('gulp-sourcemaps'); | |
function styles() { | |
return ( | |
gulp.src('scss/**/*.scss') | |
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) | |
.pipe(sourcemaps.init()) |
View add_page_name_class.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
<?php | |
// Add page name to body classes | |
function add_page_name_class($classes) | |
{ | |
global $post; | |
if ( is_page() || is_singular() ) { | |
$classes[] = sanitize_html_class($post->post_name); | |
} | |
return $classes; | |
} |
View message.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
<?php | |
$message = file_get_contents(__DIR__ . '/confirmation.html'); | |
$replace = array( | |
'[site_url]' => get_site_url() . '/wp-content/themes/artists-working/img/email/', | |
'[email]' => $email, | |
'[event_id]' => $event_id, | |
'[address]' => $event_address | |
); |
View gist:60ef259986fff30e71bb7633d763246e
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
$message = file_get_contents(__DIR__ . '/confirmation.html'); | |
$replace = array( | |
'[site_url]' => get_site_url() . '/wp-content/themes/artists-working/img/email/', | |
'[email]' => $email, | |
'[event_id]' => $event_id, | |
'[address]' => $event_address | |
); | |
foreach ($replace as $placeholder => $info) { |