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
| // RSS Dashboard Widget | |
| function freshDashboardRSS() { | |
| if(function_exists('fetch_feed')) { | |
| include_once(ABSPATH . WPINC . '/feed.php'); // include the required file | |
| $feed = fetch_feed('http://blog.onestepcreative.com/feed/rss/'); // specify the source feed | |
| $limit = $feed->get_item_quantity(7); // specify number of items | |
| $items = $feed->get_items(0, $limit); // create an array of items | |
| } | |
| if ($limit == 0) echo '<div>The RSS Feed is either empty or unavailable.</div>'; // fallback message | |
| else foreach ($items as $item) : ?> |
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
| for ($i = 1; $i < 5; $i++) { | |
| $content = get_post_meta($post->ID, 'video_card'.$i, true); | |
| $max = // Number of videos that were returned. | |
| echo '<li>'; | |
| if ($content) { | |
| echo $content; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Stripe Getting Started Form</title> | |
| <script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
| <!-- jQuery is used only for this example; it isn't required to use Stripe --> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| // this identifies your website in the createToken call below |
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
| <!-- // I FIND IT BEST TO LEAVE THIS TO "BLACK" // --> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | |
| <!-- // GIVE YOUR APP A NAME // --> | |
| <meta name="application-name" content="Alvin Nguyen Photo" /> | |
| <!-- // THIS IS JUST LETS THE IPAD KNOW WE'RE WANTING TO RENDER A "WEB APP" // --> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <!-- // THESE ARE THE ICON IMAGES USED FOR THE "APP" ICON THAT APPEARS AFTER "SAVING TO HOMESCREEN" // --> |
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 scrollTop(step) { | |
| var start = window.pageYOffset; | |
| var count = 0; | |
| var intervalRef = setInterval( (function(interval, curOffset) { | |
| return function() { | |
| curOffset -= (interval * step); | |
| console.info("offset = " + curOffset); | |
| window.scrollTo(0, curOffset); | |
| console.info("pageYoffset = " + window.pageYOffset); | |
| count++; |
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
| <?php | |
| // ========================================================================= | |
| // ====== MORE ROBUST CUSTOM POST TYPE INTEGRATIONS | |
| // ========================================================================= | |
| function combatPostTypeArchives($query) { | |
| if(is_category() || is_tag() && empty( $query->query_vars['suppress_filters'])) { | |
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 TO SUPPORT CROSS-DOMAIN AJAX REQUESTS FOR CAT TREE === | |
| // =================================================================== | |
| jQuery.ajax = (function(_ajax){ | |
| var protocol = location.protocol, | |
| hostname = location.hostname, | |
| exRegex = RegExp(protocol + '//' + hostname), | |
| YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?', |
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($, window, document, undefined) { | |
| // INIT FOUNDATION *REQUIRED* | |
| $(document).foundation(); | |
| // GLOBAL CLOSURE VARIABLES | |
| var w = $(window), d = $(document); | |
| // WINDOW HEIGHT + WIDTH VARS |
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
| var objEmpty = function(obj) { | |
| return (JSON.stringify(obj) == '{}'); | |
| } | |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| </head> |
OlderNewer