Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
@ericakfranz
ericakfranz / .htaccess
Created March 27, 2015 20:04
Block spam bots originating from social-buttons.com
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*social\-buttons\.com\ [NC,OR]
RewriteRule .* – [F]
@ericakfranz
ericakfranz / javascript_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@ericakfranz
ericakfranz / css_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

<?php
add_filter( 'optin_monster_pre_optin_mailchimp', 'tgm_om_custom_mailchimp_data', 10, 4 );
/**
* Filter the data sent to Mailchimp.
*
* See here for more info on what is passed: https://apidocs.mailchimp.com/api/2.0/lists/subscribe.php
*
* @param array $data Array of data being sent to Mailchimp.
* @param array $lead Array of lead data captured from the optin submission.
* @param string $list_id The unique list ID to subscribe the lead to.
@ericakfranz
ericakfranz / functions.php
Created April 10, 2015 18:36
Automatically wrap each Soliloquy caption text line in a paragraph tag.
add_filter( 'soliloquy_output_item_data', 'ekf_filter_caption_paragraph_tags', 10, 3 );
function ekf_filter_caption_paragraph_tags( $image, $id, $data) {
// Wrap the image caption text in paragraph tags
$image['caption'] = wpautop( $image['caption'] );
// Return the modified data.
return $image;
}
@ericakfranz
ericakfranz / style.css
Created April 13, 2015 17:40
Modify Soliloquy Lightbox Style
.soliloquybox-overlay-fixed, .soliloquybox-wrap, .soliloquybox-skin, .soliloquybox-outer, soliloquybox-inner { height: 100% !important; width: auto !important; }
.soliloquybox-wrap {
top: 0 !important;
bottom: 0 !important;
left: 0 !important;
width: 60% !important;
height: 100% !important;
padding: 20px 0 20px 20px !important
}
.soliloquybox-skin {
@ericakfranz
ericakfranz / om-add-after-post-optin.php
Last active August 29, 2015 14:19
Plugin to add the OptinMonster After Post template tag.
<?php
/**
* Plugin Name: OptinMonster Add After Post Optin
* Description: Add the 'd1ztn1euuw-post' After Post optin to single blog posts.
* Version: 1.0.0
*/
add_filter( 'the_content', 'ekf_add_om_after_post_optin', 100 );
function ekf_add_om_after_post_optin() {
@ericakfranz
ericakfranz / functions.php
Created April 19, 2015 23:00
Filter WP SEO's OpenGraph and Twitter image meta tags
<?php
/**
* Return 'medium' image for mobile devices since that is what we're
* loading to display as the featured image on each post.
*/
//* Filter WP SEO's OpenGraph image output
add_filter('wpseo_opengraph_image_size', 'disi_opengraph_image_size');
function disi_opengraph_image_size($val) {
if( wp_is_mobile() ) {
@ericakfranz
ericakfranz / optin-monster-mailchimp-single-optin.php
Created April 22, 2015 15:32
OptinMonster single-optin for MailChimp as a plugin.
<?php
/**
* Plugin Name: OptinMonster MailChimp Single Optin
* Plugin URI: http://optinmonster.com/docs/how-to-enable-single-optin-for-mailchimp-in-optinmonster/
* Description: Enable single optin for MailChimp.
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me
* License: MIT
*/
@ericakfranz
ericakfranz / soliloquy-caption-plugin.php
Last active August 29, 2015 14:19
Soliloquy titled caption plugin.
<?php
/**
* Plugin Name: Soliloquy Titled Caption
* Plugin URI: http://soliloquywp.com/
* Description: Customizes the Soliloquy caption output to show the title before the caption text.
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me
*/