This file contains hidden or 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
// display content to logged in users via shortcode | |
function member_only($atts, $content = null) { | |
if (is_user_logged_in()) | |
return '<div class="memberContent">' . do_shortcode($content) . '</div>'; | |
return ''; | |
} | |
add_shortcode('member_only', 'member_only'); | |
// display content to logged out users via shortcode | |
function non_member($atts, $content = null) { |
This file contains hidden or 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 median($numbers){ | |
//loop through each value in the array and if it is a number add it to a new array | |
foreach ($numbers as $num) { | |
if(is_numeric($num)){ | |
$num_array[]=$num; | |
} | |
} | |
rsort($num_array); //sort the array for our operation |
This file contains hidden or 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
<!--[if IE]> | |
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script> | |
<![endif]--> |
This file contains hidden or 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
google.load("feeds", "1"); | |
function feed_init() { | |
} | |
google.setOnLoadCallback(feed_init); | |
function getRecentPosts(url,num_max,title,target){ | |
google.feeds.lookupFeed(url, function(result) { |
This file contains hidden or 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
// build the url from whatever data we already have on the page. | |
var feedsrc = "http://www.bayeast.org/frontpage/feed"; | |
// Load the feeds api from google | |
google.load("feeds", "1"); | |
// this function is run when google has loaded everything it needs using the setOnLoadCallback below | |
function GetFeed() { | |
// define the feed |
This file contains hidden or 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
/* | |
* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery | |
* | |
* Copyright (c) 2009 jQuery HowTo | |
* | |
* Licensed under the GPL license: | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* URL: | |
* http://jquery-howto.blogspot.com |
This file contains hidden or 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
$(id).on('mouseenter', function () { | |
var $this = this; | |
$($this).tooltip("show"); | |
$(".tooltip").on("mouseleave", function () { | |
$($this).tooltip('hide'); | |
}); | |
}).on("mouseleave", function () { | |
var $this = this, | |
timeout = setInterval(function () { | |
if (!$(".tooltip:hover").length) { |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 isMobile() { | |
try{ document.createEvent("TouchEvent"); return true; } | |
catch(e){ return false; } | |
} |
This file contains hidden or 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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
OlderNewer