Skip to content

Instantly share code, notes, and snippets.

@dcondrey
dcondrey / mobileUA.php
Created April 27, 2014 10:36
Detect User Agent with PHP
<?php
class Mobile_Detect {
protected $accept;
protected $userAgent;
protected $isMobile = false;
protected $isAndroid = null;
protected $isBlackberry = null;
@dcondrey
dcondrey / functions.php
Created April 13, 2014 02:29
Boilerplate markup for basic Wordpress index.php. Integrated with HTML5 semantic markup and Schema.org structured data. Miscellaneous other PHP functions that I use in most of my templates can also be found here.
<?php
function my_scripts_method() {
wp_enqueue_style( 'style', get_stylesheet_uri());
wp_enqueue_style( 'fonts', get_template_directory_uri() . '/css/fonts.css');
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
wp_enqueue_script( 'jquery' );
@dcondrey
dcondrey / Fadingtabs.html
Created March 13, 2014 05:29
Bootstrap modal with tabs and pagination
<html>
<head>
<style>
.fadecontentwrapper{
position: relative;
width: 350px;
height: 250px; /* Set height to be able to contain height of largest content shown*/
border: 5px solid maroon;
overflow: hidden;