This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// make sure you have enough time to download all pictures | |
ini_set('max_execution_time', 6000); | |
ini_set('memory_limit', '64M'); | |
// include the Facebook PHP SDK - https://github.com/facebook/php-sdk/ | |
require 'facebook.php'; | |
// enter your App ID and App Secret | |
// register an FB App at https://developers.facebook.com/apps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var slider = $('.stories-slider'); | |
var list = slider.find('#carousel'); | |
var items = list.find('> .slide'); | |
var thumbs = slider.find('.thumb'); | |
var duration = 500; | |
var current = 0; | |
list.css({ width: items.length * 100 + '%' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());'><img src='http://www.brandaiddesignco.com/blog/PinIt.png'/></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HTML 5 Backwards Compatibility Test</title> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "utf-8"; | |
* { margin: 0; padding: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } | |
html, body { width: auto; height: auto; } | |
body { background: #E0E0E0; color: #202020; font: normal 12px Arial, Helvetica, sans-serif; } | |
h1, h2, h3, h4, h5, h6 { font: small-caps bold 100%/120% Georgia, "Times New Roman", Times, serif; } | |
h1 { font-size: 300%; } | |
h2 { font-size: 240%; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// new WP_Query( array( 'p2p_query'=>array( array('p2p_type'=>'', 'direction'=>'') ) ) ); | |
// set p2p_type to an existing registered p2p_type | |
// set direction to the direction for queries post type in the connection p2p_type | |
// this will return only items that have connections from the p2p_type | |
add_filter('posts_join', 'mu_p2p_join', 10, 2); | |
add_filter('posts_where', 'my_p2p_where', 10, 2); | |
function my_p2p_join($join, $query) { | |
if (isset($query->query_vars['p2p_query'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$connections = P2P_Connection_Type_Factory::get_all_instances(); | |
if (!empty($connections)) { | |
foreach ($connections as $type => $conn) { | |
p2p_connection_box($type, $conn, $post); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Theme Mobile Detector | |
Version: 1.0 | |
*/ | |
# Replace all occurrences of "theme" with your theme name | |
if (get_option('template') == 'theme') { | |
if (!session_id()) session_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.form').submit(function() { | |
var valid = true; | |
var errors = ''; | |
$(this).find('.required').each(function() { | |
if ($(this).val() == '') { | |
$(this).addClass('field-error'); | |
errors += 'The "' + $(this).attr('title') + '" field is required\n'; | |
if (valid) { | |
$(this).focus(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.shuffle = function () { | |
for (var i = this.length - 1; i > 0; i--) { | |
var j = Math.floor(Math.random() * (i + 1)); | |
var tmp = this[i]; | |
this[i] = this[j]; | |
this[j] = tmp; | |
} | |
return this; | |
} |
OlderNewer