Skip to content

Instantly share code, notes, and snippets.

View bryanmonzon's full-sized avatar
🧇

Bryan Monzon bryanmonzon

🧇
View GitHub Profile
@bryanmonzon
bryanmonzon / images.php
Created March 18, 2014 18:05
Output the image URL of an ACF field
/**
* This function is intended to help you grab an image uploaded with ACF.
*
* @param [string] $field The ACF field you want to grab content from
* @param [string] $size The size of the image (defaults to thumbnail)
* @param boolean $subfield If the field is in a repeater, you need to use get_sub_field()
* @uses get_field()
* @uses get_sub_field()
* @return [string] the URL of the image
@bryanmonzon
bryanmonzon / functions.php
Created March 14, 2014 23:14
functions init file
<?php
/**
* Functions File
*
* @package WordPress
* @subpackage Imag
* @since 1.0
*/
@bryanmonzon
bryanmonzon / scripts.php
Created March 14, 2014 23:14
scripts.php
<?php
/**
* GMC Functions
*
* @package GMC
*
* @since 1.0
*/
// Exit if accessed directly
// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );
@bryanmonzon
bryanmonzon / debug.php
Created March 11, 2014 17:01
Log WordPress debugging constantants
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
@bryanmonzon
bryanmonzon / gmc_widget.html
Created March 5, 2014 23:11
GMC Widget Code
<script src='https://s3.amazonaws.com/globalmomschallenge/widget/gmc.min.js' rel='gmc' data-width='300' data-height='600'></script>
<script src='https://s3.amazonaws.com/globalmomschallenge/widget/gmc.min.js' rel='gmc' data-width='300' data-height='1050'></script>
<script src='https://s3.amazonaws.com/globalmomschallenge/widget/gmc.min.js' rel='gmc' data-width='350' data-height='350'></script>
@bryanmonzon
bryanmonzon / gmc.js
Created March 5, 2014 22:54
GMC Widget
/*! jQuery v1.10.2 -effects | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */
;(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2 -effects",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},M=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(O(),x.ready())},O=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",M,!1),e.removeEventListener("load",M,!1)):(a.detachEvent("onreadystatechange",M),e.detachEvent("onload",M))};x.fn=x.proto
@bryanmonzon
bryanmonzon / globalmomsrelay.php
Created March 4, 2014 18:54
GMR - About Container
<div class="gmr-about container-full visible">
<div class="container">
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<div class="row stats">
<div class="span4">
<h5>Social actions</h5>
<p><span class="icon icon-message"><?php gmc_widget_get_share_number(); ?></span></p>
</div>
@bryanmonzon
bryanmonzon / footer-widget.html
Last active August 29, 2015 13:56
Footer Widget Markup
@bryanmonzon
bryanmonzon / .htaccess
Created February 3, 2014 18:03
.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>