Skip to content

Instantly share code, notes, and snippets.

@Air-Craft
Created November 27, 2011 12:56
Show Gist options
  • Save Air-Craft/1397523 to your computer and use it in GitHub Desktop.
Save Air-Craft/1397523 to your computer and use it in GitHub Desktop.
WordPress Plugin Class Boilerplate (in progress)
<?php
/*
Plugin Name: 15CC Modernizr Plus
Plugin URI: http://www.club15cc.com/WordPress-Modernizr-Plus
Description: Adds Modernizr and uses .load to rapidly download JS and CSS scripts in parallel. Plus adds support for HTML5 and MQ's to old browsers.
Version: 1.0
Author: Hari Karam Singh
Author URI: http://www.club15cc.com
License: MIT
*
* FEATURES:
* - Supports custom Modernizr JS override in your theme
* - Optional CSS loading
*
*/
global $fifteencc_ip2country;
class FifteenCC_ModernizrPlus
{
private $base_url;
private $base_path;
private $db;
function __construct()
{
// Setup common access properties
global $wpdb;
$this->db = $wpdb;
$this->base_path = plugin_dir_path(__FILE__);
$this->base_url = plugin_dir_url(__FILE__);
//register_activation_hook(__FILE__, array( $this, 'install_db'));
}
function install_db()
{
}
}
$ftcc_modernizr_plus = new FifteenCC_ModernizrPlus;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment