Skip to content

Instantly share code, notes, and snippets.

@sreed-ontraport
Created August 22, 2012 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sreed-ontraport/9649e00c6acec8805f39 to your computer and use it in GitHub Desktop.
Save sreed-ontraport/9649e00c6acec8805f39 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Plugin Test
Plugin URI: http://core.trac.wordpress.org/ticket/21602
Description: Plugin Test for WP bug #21602
Version: 1.0.0
Author: Scott Reed
Author URI: http://officeautopilot.com/
Text Domain: plugintest
Copyright:
*/
if(defined("ABSPATH")) {
include_once(ABSPATH.WPINC.'/class-http.php');
include_once(ABSPATH.WPINC.'/registration.php');
register_activation_hook(__FILE__, "enable_plugintest");
register_deactivation_hook(__FILE__, "disable_plugintest");
$plugintest = new PluginTest;
}
class PluginTest {
const VERSION = "1.0.0";
const WP_MIN = "3.0.0";
const NSPACE = "_plugintest_";
function __construct() {
$this->bind_hooks();
}
private function bind_hooks() {
add_action('wp', array(&$this, 'post_process'));
}
function post_process() {
is_front_page();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment