Skip to content

Instantly share code, notes, and snippets.

View JayWood's full-sized avatar

JayWood

View GitHub Profile
@jtsternberg
jtsternberg / get_oembed.php
Last active August 29, 2015 14:04
Get oembed for a url. EDIT: nevermind, use wp_oembed_get( $url, $args )
<?php
function get_oembed( $url, $post_id, $args = array() ) {
global $wp_embed;
$oembed_url = esc_url( $url );
// Sanitize object_id
$post_id = absint( $post_id );
var YMVP = {};
jQuery(document).ready(function($) {
YMVP = {
$body : $('body'),
openPopup : true,
triggerAction: function(event, data) {
data = data || {};
@adhithyan15
adhithyan15 / countdown.js
Last active April 7, 2023 19:35
A simple countdown timer in Javascript
/********************************************************************************************************************
Countdown.js is a simple script to add a countdown timer
for your website. Currently it can only do full minutes
and partial minutes aren't supported. This script is a fork of http://jsfiddle.net/HRrYG/ with some
added extensions. Since the original code that I forked was released under Creative Commons by SA license,
I have to release this code under the same license. You can view a live demo of this code at http://jsfiddle.net/JmrQE/2/.
********************************************************************************************************************/
function countdown(minutes) {
var seconds = 60;
var mins = minutes