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 | |
| for ($i = 0; $i <= 1440; $i+=15) : | |
| $date = date("g:i A",mktime(0,$i,0,1,1,2000)); | |
| ?> | |
| <select> | |
| <option value="<?php echo $date; ?>"><?php echo $date; ?></option> | |
| </select> | |
| <?php | |
| endfor; | |
| ?> |
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
| add_action( 'wp_head', 'show_me_the_template' ); | |
| function show_me_the_template() { | |
| global $template, $current_user, $wp_admin_bar; | |
| get_currentuserinfo(); | |
| /* If you have more than one user deny. Be sure to use your user ID! */ | |
| if ( !is_user_logged_in() && $current_user->ID != '1' ) | |
| return; | |
| if ( is_admin_bar_showing() ) | |
| $wp_admin_bar->add_menu( array( |
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 | |
| $transactions = array( | |
| 0 => array('date'=>1324235252, 'day'=>'monday'), | |
| 1 => array('date'=>1326516552, 'day'=>'tuesday'), | |
| 2 => array('date'=>1333453235, 'day'=>'wednesday') | |
| ) | |
| function sortByOrder($a, $b) { | |
| return $b['date'] - $a['date']; | |
| } |
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
| add_shortcode('iframe', 'iframe'); | |
| function iframe($atts) { | |
| extract(shortcode_atts(array( | |
| 'src' => "", | |
| 'width' => "800", | |
| 'height' => "600" | |
| ), $atts)); | |
| $iframe = '<iframe src="'.$src.'" width="'.$width.'" height="'.$height.'" scrolling="no" allowtransparency="yes" frameborder="0" ></iframe>'; | |
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
| // make it safe to use console.log always | |
| (function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());){a[d]=a[d]||b;}}) | |
| (function(){try{console.log();return window.console;}catch(a){return (window.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(){ | |
| var tabindex = 1; | |
| $('input,select').each(function() { | |
| if (this.type != "hidden") { | |
| var $input = $(this); | |
| $input.attr("tabindex", tabindex); | |
| tabindex++; | |
| } | |
| }); | |
| }); |
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
| $(document).ready(function() { | |
| if(!Modernizr.input.placeholder){ | |
| $("input").each(function(){ | |
| if($(this).val()=="" && $(this).attr("placeholder")!=""){ | |
| $(this).val($(this).attr("placeholder")); | |
| $(this).focus(function(){ | |
| if($(this).val()==$(this).attr("placeholder")) $(this).val(""); | |
| }); | |
| $(this).blur(function(){ | |
| if($(this).val()=="") $(this).val($(this).attr("placeholder")); |
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 | |
| // Set the current page at 1 if it's not already set | |
| if(!isset($_GET['p'])){$_GET['p']=1;} | |
| $per_page = 100; | |
| $count_transactions = count($transactions); | |
| $pages = ceil($count_transactions / $per_page); | |
| $current_page = (isset($_GET['p'])) ? $_GET['p'] : 1; | |
| $clean_query_string = (isset($_GET['user_id'])) ? str_ireplace("p=".@$_GET['p']."&", "", $_SERVER['QUERY_STRING']) : str_ireplace("p=".@$_GET['p'], "", $_SERVER['QUERY_STRING']); | |
| if(substr($clean_query_string,-1)=="&"){$clean_query_string = substr_replace($clean_query_string, "", -1);} |
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 touchHandler(event) | |
| { | |
| var touches = event.changedTouches, | |
| first = touches[0], | |
| type = ""; | |
| switch(event.type) | |
| { | |
| case "touchstart": type = "mousedown"; break; | |
| case "touchmove": type="mousemove"; break; |
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
| <script type="text/javascript"> | |
| // <![CDATA[ | |
| $(document).ready( function() { | |
| //URL Title js | |
| $("input#title").keyup( function() { | |
| var titleText = $("input#title").val().replace(/ /g,"_").toLowerCase(); | |
| $("input#url_title").val(titleText); | |
| }); | |