Skip to content

Instantly share code, notes, and snippets.

View bryanmonzon's full-sized avatar
🧇

Bryan Monzon bryanmonzon

🧇
View GitHub Profile
@bryanmonzon
bryanmonzon / pwp_vimeo.php
Created November 11, 2013 17:29
String Replace Issue. Can you help me out with this?
<?php
/**
* Code block 1
* This block doesn't work. Having "://" in there makes this not work at all.
*/
$vimeo_id = 72170966; //Example ID.
$hash = unserialize(file_get_contents("https://vimeo.com/api/v2/video/$vimeo_id.php")); //Parses JSON to get Video info
$vimeo_thumb = $hash[0]['thumbnail_small']; //this ends up being http://secure-b.vimeocdn.com/ts/153/182/15318283_100.jpg
<script>
function moveScroller() {
var move = function() {
var st = jQuery(window).scrollTop();
var ot = jQuery("#white_bar_stop").offset().top;
var s = jQuery("#white_bar");
if(st > ot) {
s.css({
@bryanmonzon
bryanmonzon / posttypes.php
Last active January 3, 2016 22:49
Register your post type like this for some added flexibility.
<?php
/**
* Post Type Functions
*
* @package FFW
* @subpackage Functions
* @copyright Copyright (c) 2013, Fifty and Fifty
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0
*/
@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>
@bryanmonzon
bryanmonzon / footer-widget.html
Last active August 29, 2015 13:56
Footer Widget Markup
@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 / 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 / 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 / debug.php
Created March 11, 2014 17:01
Log WordPress debugging constantants
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );