Skip to content

Instantly share code, notes, and snippets.

@darinronne
darinronne / gist:e3c57f9ac5da1a1f1b710c61d633dc4a
Created February 21, 2018 16:56 — forked from i556/gist:1661623
Cross Domain iframe Resizing
http://mohumohu/parent.html
http://hogehoge.com/iframe.html
//parent.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
@darinronne
darinronne / acf.json
Last active February 13, 2018 14:00
Wordpress | ACF | Foundation - Social Media Links using Advanced Custom Fields and FontAwesome 4.7
[
{
"key": "group_5a821be5c1b91",
"title": "Social Media",
"fields": [
{
"key": "field_5a7cba5f6d07a",
"label": "Social Media",
"name": "footer_social_icons",
"type": "repeater",
@darinronne
darinronne / zurb_foundation_interchange_retina_media_queries.js
Last active February 13, 2018 14:03
Zurb Foundation Retina 'Named Media Queries' for use with Interchange
/**
* Create retina 'Named Media Queries' for use with Interchange.
* Insert before the Foundation init.
* https://foundation.zurb.com/sites/docs/interchange.html
*
* Update the variables to match your SASS breakpoints.
* Leave any un-needed sizes empty.
*/
var ic_small = '0';
@darinronne
darinronne / Useful_Wordpress_Plugins.md
Last active February 12, 2018 22:06
Useful Wordpress Plugins
@darinronne
darinronne / _notes-removal-command.md
Last active November 1, 2017 19:09
Remove all _notes directories using Terminal
find [site_directory]/* -name _notes -print0 | xargs -0 rm -rf

Replace [site_directory] with root site folder path.

Accessibility

Design

  • Use more than one sense for instructions (1.3.3)
  • Color should not be the only way to convey information or distinguish visual elements. (1.4.1)
  • A contrast ratio of 4.5:1 for normal text and 3:1 for large text. (1.4.3)
    https://webaim.org/resources/contrastchecker/
  • Don't use images of text. (1.4.5)
@darinronne
darinronne / wp-local-to-live.md
Last active January 9, 2019 13:23
Transfer Local WP Install to Live

Install on both Local and Live

  • WP Migrate DB
  • All-in-One WP Migration

Use WP Migrate DB to get the URL and File paths.

Use All-in-One WP Migration on local site to create the Export file.

  • Create two "Find and Replace"s. One for URL, the other for File paths.

Import the file on Live site using All-in-One WP Migration.

@darinronne
darinronne / yoast_the-events-calendar_breadcrumbs.php
Last active September 20, 2017 19:01
Yoast Breadcrumbs on The Events Calendar pages
<?php /*
As of this writing (Sep 2017) Yoast doesn't output the
breadcrumbs correctly on a Single Tribe Events page.
It only outputs "Home".
I couldn't find anything helpful or a solution
that works, so I am doing it this way.
I copy/pasted the breadcrumbs from another page that was two levels deep as a starting point.
@darinronne
darinronne / yoast_the-events-calendar_breadcrumbs.php
Created September 20, 2017 18:51
Yoast Breadcrumbs on The Events Calendar pages
<?php if ( function_exists( 'yoast_breadcrumb' ) ) : ?>
<?php if( is_singular( 'tribe_events' ) ) : ?>
<div class="breadcrumbs-bar__breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="<?php echo home_url(); ?>" rel="v:url" property="v:title">Home</a> &gt; <span rel="v:child" typeof="v:Breadcrumb"><a href="<?php echo home_url( 'events' ); ?>" rel="v:url" property="v:title">Events</a> &gt; <span class="breadcrumb_last"><?php single_post_title(); ?></span></span></span></span></div>
<?php else : ?>
<?php yoast_breadcrumb( '<div class="breadcrumbs-bar__breadcrumbs">', '</div>' ); ?>
@darinronne
darinronne / functions.php
Created August 23, 2017 16:07
Wordpress: Insert Admin Menu Separator and Style Seperators
// Register Admin Menu Seperators
function m13_add_admin_menu_separator( $position ) {
global $menu;
$menu[ $position ] = array(
0 => '',
1 => 'read',
2 => 'separator' . $position,
3 => '',
4 => 'wp-menu-separator'
);