Skip to content

Instantly share code, notes, and snippets.

View bryanmonzon's full-sized avatar
🧇

Bryan Monzon bryanmonzon

🧇
View GitHub Profile
@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
*/
<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 / 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