Browse Source

debug-bar/thumbs

windhamdavid 11 years ago
parent
commit
3667a2d900

+ 6 - 0
.gitmodules

@@ -16,3 +16,9 @@
 [submodule "app/themes/roots"]
 	path = app/themes/roots
 	url = git@github.com:roots/roots.git
+[submodule "app/plugins/theme-check"]
+	path = app/plugins/theme-check
+	url = git@github.com:Pross/theme-check.git
+[submodule "app/plugins/regenerate-thumbnails"]
+	path = app/plugins/regenerate-thumbnails
+	url = git@github.com:Viper007Bond/regenerate-thumbnails.git

File diff suppressed because it is too large
+ 0 - 0
app/plugins/debug-bar/css/debug-bar.css


+ 450 - 0
app/plugins/debug-bar/css/debug-bar.dev.css

@@ -0,0 +1,450 @@
+/* =========================================================================
+ *   Admin bar styling
+ * ========================================================================= */
+
+#wpadminbar #wp-admin-bar-debug-bar {
+	float: right;
+}
+
+#wpadminbar #wp-admin-bar-debug-bar.active {
+	background: #555;
+	background: -moz-linear-gradient(bottom,  #555,  #3e3e3e);
+	background: -webkit-gradient(linear, left bottom, left top, from(#555), to(#3e3e3e));
+}
+
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary,
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary .ab-item:focus {
+	background-color: #ff8922;
+	background-image: -moz-linear-gradient(bottom, #ee6f00, #ff8922);
+	background-image: -webkit-gradient(linear, left bottom, left top, from(#ee6f00), to(#ff8922));
+}
+
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary .ab-item:hover,
+.debug-bar-visible #wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary,
+.debug-bar-visible #wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary .ab-item:focus {
+	background-color: #ee6f00;
+	background-image: -moz-linear-gradient(bottom, #ff8922, #ee6f00 );
+	background-image: -webkit-gradient(linear, left bottom, left top, from(#ff8922), to(#ee6f00));
+}
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-notice-summary .ab-item {
+	color: #fff;
+	text-shadow: 0 -1px 0 #884000;
+}
+
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary,
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary .ab-item:focus {
+	background-color: #f44;
+	background-image: -moz-linear-gradient(bottom, #d00, #f44);
+	background-image: -webkit-gradient(linear, left bottom, left top, from(#d00), to(#f44));
+}
+
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary .ab-item:hover,
+.debug-bar-visible #wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary,
+.debug-bar-visible #wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary .ab-item:focus {
+	background-color: #d00;
+	background-image: -moz-linear-gradient(bottom, #f44, #d00 );
+	background-image: -webkit-gradient(linear, left bottom, left top, from(#f44), to(#d00));
+}
+#wpadminbar #wp-admin-bar-debug-bar.debug-bar-php-warning-summary .ab-item {
+	color: #fff;
+	text-shadow: 0 -1px 0 #700;
+}
+
+#wpadminbar #wp-admin-bar-debug-bar ul {
+	right: 0;
+}
+
+/**
+ * Debug bar styling
+ */
+
+#querylist {
+	display: none;
+	position: fixed;
+	height: 33%;
+	min-height: 350px;
+	font-family: "Helvetica Neue", sans-serif;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background: #f1f1f1;
+	z-index: 99000;
+	color: #000;
+	line-height: 150% !important;
+	text-align: left;
+	font-size: 12px;
+}
+
+/* reset debug bar links */
+#querylist a {
+	border: 0;
+}
+
+.debug-bar-visible #querylist {
+	display: block;
+}
+
+.debug-bar-maximized #querylist {
+	position: fixed;
+	top: 28px;
+	height: auto;
+}
+
+body.debug-bar-maximized.debug-bar-visible {
+	overflow: hidden;
+}
+
+#debug-bar-info {
+	height: 60px;
+	width: 100%;
+	position: absolute;
+	z-index: 200;
+
+	background: #f1f1f1;
+	border-bottom: 1px solid #fff;
+	box-shadow: 0 0 6px rgba( 0, 0, 0, 0.4 );
+
+	background-color: #f1f1f1; /* Fallback */
+	background-image: -ms-linear-gradient(top, #f9f9f9, #dfdfdf); /* IE10 */
+	background-image: -moz-linear-gradient(top, #f9f9f9, #dfdfdf); /* Firefox */
+	background-image: -o-linear-gradient(top, #f9f9f9, #dfdfdf); /* Opera */
+	background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#dfdfdf)); /* old Webkit */
+	background-image: -webkit-linear-gradient(top, #f9f9f9, #dfdfdf); /* new Webkit */
+	background-image: linear-gradient(top, #f9f9f9, #dfdfdf); /* proposed W3C Markup */
+}
+
+#debug-bar-menu {
+	position: absolute;
+	top: 61px;
+	left: 0;
+	width: 250px;
+	bottom: 0;
+	z-index: 100;
+
+	overflow: hidden;
+	text-shadow: 0 1px 1px rgba( 0, 0, 0, 0.9 );
+	background: #333;
+	-webkit-box-shadow: inset -3px 0 6px rgba( 0, 0, 0, 0.4 );
+	-moz-box-shadow:    inset -3px 0 6px rgba( 0, 0, 0, 0.4 );
+	box-shadow:         inset -3px 0 6px rgba( 0, 0, 0, 0.4 );
+}
+
+#debug-menu-targets {
+	overflow: auto;
+	position: absolute;
+	top: 61px;
+	left: 250px;
+	right: 0;
+	bottom: 0;
+	z-index: 150;
+}
+
+#debug-status {
+	float: left;
+	padding-left: 20px;
+	color: #bbb;
+	font-size: 14px;
+	line-height: 60px;
+}
+
+.debug-status {
+	float: left;
+	margin-right: 40px;
+}
+
+#debug-status .debug-status-title {
+	color: #555;
+	font-weight: 500;
+	line-height: 18px;
+	font-size: 12px;
+	margin-top: 10px;
+}
+#debug-status .debug-status-data {
+	color: #999;
+	font-weight: 200;
+	line-height: 20px;
+	font-size: 18px;
+}
+#debug-status #debug-status-warning {
+	font-weight: bold;
+	color: red;
+}
+#debug-status #debug-status-site {
+	font-weight: bold;
+}
+
+#querylist pre {
+	font-size: 12px;
+	padding: 10px;
+}
+
+#querylist .left {
+	float: left;
+}
+
+#querylist .right {
+	float: right;
+}
+
+#querylist h1, #querylist h2, #querylist h3 {
+	font-weight: normal;
+}
+
+#debug-menu-links {
+	overflow: hidden;
+	list-style: none;
+	margin: 0;
+}
+
+#debug-menu-links li {
+	float: left;
+	margin-bottom: 0 !important;
+}
+
+#debug-menu-links li a {
+	padding: 0 20px;
+	width: 210px;
+	line-height: 40px;
+	outline: none;
+	display: block;
+	margin: 0;
+	color: #fff !important;
+	text-decoration: none !important;
+	font-weight: 500 !important;
+	font-size: 14px;
+}
+
+#debug-menu-links li a.current {
+	background: rgba( 0, 0, 0, 0.2 );
+}
+
+#querylist h2 {
+	float: left;
+	min-width: 150px;
+	border: 1px solid #eee;
+	padding: 5px 10px 15px;
+	clear: none;
+	text-align: center;
+	font-family: georgia, times, serif;
+	font-size: 28px;
+	margin: 15px 10px 15px 0 !important;
+}
+
+#querylist h2 span {
+	font-size: 12px;
+	color: #888;
+	text-transform: uppercase;
+	white-space: nowrap;
+	display: block;
+	margin-bottom: 5px;
+}
+
+#object-cache-stats h2 {
+	border: none;
+	float: none;
+	text-align: left;
+	font-size: 22px;
+	margin-bottom: 0;
+}
+
+#querylist h3 {
+	margin-bottom: 15px;
+}
+
+#querylist ol.wpd-queries {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#querylist ol.wpd-queries li {
+	padding: 10px;
+	background: #f0f0f0;
+	margin: 0 0 10px 0;
+}
+
+#querylist ol.wpd-queries li div.qdebug {
+	background: #e8e8e8;
+	margin: 10px -10px -10px -10px;
+	padding: 5px 150px 5px 5px;
+	font-size: 11px;
+	position: relative;
+	min-height: 20px;
+}
+
+#querylist ol.wpd-queries li div.qdebug span {
+	position: absolute;
+	right: 10px;
+	top: 5px;
+	white-space: nowrap;
+}
+
+#querylist a {
+	text-decoration: underline !important;
+	color: blue !important;
+}
+
+#querylist a:hover {
+	text-decoration: none !important;
+}
+
+#querylist .debug-menu-target {
+	margin: 20px;
+	display: none;
+}
+
+#querylist ol {
+	font: 12px Monaco, "Courier New", Courier, Fixed !important;
+	line-height: 180% !important;
+}
+
+#debug-bar-php ol.debug-bar-php-list {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#debug-bar-php ol.debug-bar-php-list li {
+	padding: 10px;
+	margin: 0 0 10px 0;
+}
+
+#debug-bar-php .debug-bar-php-warning {
+	background-color: #ffebe8;
+	border: 1px solid #c00;
+}
+
+#debug-bar-php .debug-bar-php-notice {
+	background-color: #ffffe0;
+	border: 1px solid #e6db55;
+}
+
+#debug-bar-deprecated ol.debug-bar-deprecated-list {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#debug-bar-deprecated ol.debug-bar-deprecated-list li {
+	padding: 10px;
+	margin: 0 0 10px 0;
+	background: #f0f0f0;
+}
+
+#debug-bar-wp-query ol.debug-bar-wp-query-list {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#debug-bar-wp-query ol.debug-bar-wp-query-list li, #debug-bar-wp-query p, #debug-bar-request p {
+	padding: 10px;
+	margin: 0 0 10px 0;
+	background: #f0f0f0;
+}
+
+#debug-bar-wp-query ol.debug-bar-wp-query-list li ol {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#debug-bar-wp-query h3, #debug-bar-request h3 {
+	float: none;
+	clear: both;
+	font-family: georgia, times, serif;
+	font-size: 22px;
+	margin: 15px 10px 15px 0 !important;
+}
+
+/* =========================================================================
+ *   Actions: Maximize / restore
+ * ========================================================================= */
+
+#debug-bar-actions {
+	position: absolute;
+	top: 21px;
+	right: 20px;
+	z-index: 300;
+}
+#debug-bar-actions span {
+	-moz-border-radius: 20px;
+	-webkit-border-radius: 20px;
+	border-radius: 20px;
+	display: block;
+	float: left;
+	height: 19px;
+	width: 19px;
+	margin-left: 5px;
+
+	font-size: 18px;
+	line-height: 14px;
+	text-align: center;
+	font-weight: bold;
+
+	color: #eee;
+	background: #aaa;
+
+	cursor: pointer;
+}
+#debug-bar-actions span:hover {
+	background: #888;
+}
+
+#debug-bar-actions span.restore {
+	line-height: 15px;
+}
+
+.debug-bar-maximized #debug-bar-actions span.restore {
+	display: block;
+}
+.debug-bar-maximized #debug-bar-actions span.maximize {
+	display: none;
+}
+
+.debug-bar-partial #debug-bar-actions span.restore {
+	display: none;
+}
+.debug-bar-partial #debug-bar-actions span.maximize {
+	display: block;
+}
+
+/* =========================================================================
+ *   JS Error item styling
+ * ========================================================================= */
+
+#debug-menu-links li a#debug-menu-link-Debug_Bar_JS {
+	display: none;
+}
+
+#debug-bar-js ol.debug-bar-js-list {
+	padding: 0 !important;
+	margin: 0 !important;
+	list-style: none;
+	clear: left;
+}
+
+#debug-bar-js ol.debug-bar-js-list li {
+	padding: 10px;
+	margin: 0 0 10px 0;
+}
+
+#debug-bar-js .debug-bar-js-error {
+	background-color: #ffebe8;
+	border: 1px solid #c00;
+}
+
+#debug-bar-js .debug-bar-js-error span {
+	color: #666;
+	font-size: 0.8em;
+	display: block;
+}
+
+#debug-bar-js .debug-bar-js-error:hover span {
+	color: #000;
+}

+ 251 - 0
app/plugins/debug-bar/debug-bar.php

@@ -0,0 +1,251 @@
+<?php
+/*
+ Plugin Name: Debug Bar
+ Plugin URI: http://wordpress.org/extend/plugins/debug-bar/
+ Description: Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
+ Author: wordpressdotorg
+ Version: 0.8.1
+ Author URI: http://wordpress.org/
+ */
+
+/***
+ * Debug Functions
+ *
+ * When logged in as a super admin, these functions will run to provide
+ * debugging information when specific super admin menu items are selected.
+ *
+ * They are not used when a regular user is logged in.
+ */
+
+class Debug_Bar {
+	var $panels = array();
+
+	function Debug_Bar() {
+		if ( defined('DOING_AJAX') && DOING_AJAX )
+			add_action( 'admin_init', array( &$this, 'init_ajax' ) );
+		add_action( 'admin_bar_init', array( &$this, 'init' ) );
+	}
+
+	function init() {
+		if ( ! is_super_admin() || ! is_admin_bar_showing() || $this->is_wp_login() )
+			return;
+
+		add_action( 'admin_bar_menu',               array( &$this, 'admin_bar_menu' ), 1000 );
+		add_action( 'wp_after_admin_bar_render',    array( &$this, 'render' ) );
+		add_action( 'wp_head',                      array( &$this, 'ensure_ajaxurl' ), 1 );
+		add_filter( 'body_class',                   array( &$this, 'body_class' ) );
+		add_filter( 'admin_body_class',             array( &$this, 'body_class' ) );
+
+		$this->requirements();
+		$this->enqueue();
+		$this->init_panels();
+	}
+
+	/* Are we on the wp-login.php page?
+	 * We can get here while logged in and break the page as the admin bar isn't shown and otherthings the js relies on aren't available.
+	 */
+	function is_wp_login() {
+		return 'wp-login.php' == basename( $_SERVER['SCRIPT_NAME'] );
+	}
+
+	function init_ajax() {
+		if ( ! is_super_admin() )
+			return;
+
+		$this->requirements();
+		$this->init_panels();
+	}
+
+	function requirements() {
+		$recs = array( 'panel', 'php', 'queries', 'request', 'wp-query', 'object-cache', 'deprecated', 'js' );
+		foreach ( $recs as $rec )
+			require_once "panels/class-debug-bar-$rec.php";
+	}
+
+	function enqueue() {
+		$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
+
+		wp_enqueue_style( 'debug-bar', plugins_url( "css/debug-bar$suffix.css", __FILE__ ), array(), '20111209' );
+
+		wp_enqueue_script( 'debug-bar', plugins_url( "js/debug-bar$suffix.js", __FILE__ ), array( 'jquery' ), '20111209', true );
+
+		do_action('debug_bar_enqueue_scripts');
+	}
+
+	function init_panels() {
+		$classes = array(
+			'Debug_Bar_PHP',
+			'Debug_Bar_Queries',
+			'Debug_Bar_WP_Query',
+			'Debug_Bar_Deprecated',
+			'Debug_Bar_Request',
+			'Debug_Bar_Object_Cache',
+		);
+
+		foreach ( $classes as $class ) {
+			$this->panels[] = new $class;
+		}
+
+		$this->panels = apply_filters( 'debug_bar_panels', $this->panels );
+	}
+
+	function ensure_ajaxurl() { ?>
+		<script type="text/javascript">
+		//<![CDATA[
+		var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
+		//]]>
+		</script>
+		<?php
+	}
+
+	// memory_get_peak_usage is PHP >= 5.2.0 only
+	function safe_memory_get_peak_usage() {
+		if ( function_exists( 'memory_get_peak_usage' ) ) {
+			$usage = memory_get_peak_usage();
+		} else {
+			$usage = memory_get_usage();
+		}
+		return $usage;
+	}
+
+	function admin_bar_menu() {
+		global $wp_admin_bar;
+
+		$classes = apply_filters( 'debug_bar_classes', array() );
+		$classes = implode( " ", $classes );
+
+		/* Add the main siteadmin menu item */
+		$wp_admin_bar->add_menu( array(
+			'id'     => 'debug-bar',
+			'parent' => 'top-secondary',
+			'title'  => apply_filters( 'debug_bar_title', __('Debug', 'debug-bar') ),
+			'meta'   => array( 'class' => $classes ),
+		) );
+
+		// @todo: Uncomment and finish me!
+		// foreach ( $this->panels as $panel_key => $panel ) {
+		// 	if ( ! $panel->is_visible() )
+		// 		continue;
+		//
+		// 	$panel_class = get_class( $panel );
+		//
+		// 	$wp_admin_bar->add_menu( array(
+		// 		'parent' => 'debug-bar',
+		// 		'id'     => "debug-bar-$panel_class",
+		// 		'title'  => $panel->title(),
+		// 	) );
+		// }
+	}
+
+	function body_class( $classes ) {
+		if ( is_array( $classes ) )
+			$classes[] = 'debug-bar-maximized';
+		else
+			$classes .= ' debug-bar-maximized ';
+
+		if ( isset( $_GET['debug-bar'] ) ) {
+			if ( is_array( $classes ) )
+				$classes[] = 'debug-bar-visible';
+			else
+				$classes .= ' debug-bar-visible ';
+		}
+
+		return $classes;
+	}
+
+	function render() {
+		global $wpdb;
+
+		if ( empty( $this->panels ) )
+			return;
+
+		foreach ( $this->panels as $panel_key => $panel ) {
+			$panel->prerender();
+			if ( ! $panel->is_visible() )
+				unset( $this->panels[ $panel_key ] );
+		}
+
+		?>
+	<div id='querylist'>
+
+	<div id="debug-bar-actions">
+		<span class="maximize">+</span>
+		<span class="restore">&ndash;</span>
+		<span class="close">&times;</span>
+	</div>
+
+	<div id='debug-bar-info'>
+		<div id="debug-status">
+			<?php //@todo: Add a links to information about WP_DEBUG, PHP version, MySQL version, and Peak Memory.
+			$statuses = array();
+			$statuses[] = array( 'site', php_uname( 'n' ), sprintf( __( '#%d', 'debug-bar' ), get_current_blog_id() ) );
+			$statuses[] = array( 'php', __('PHP', 'debug-bar'), phpversion() );
+			$db_title = empty( $wpdb->is_mysql ) ? __( 'DB', 'debug-bar' ) : 'MySQL';
+			$statuses[] = array( 'db', $db_title, $wpdb->db_version() );
+			$statuses[] = array( 'memory', __('Memory Usage', 'debug-bar'), sprintf( __('%s bytes', 'debug-bar'), number_format_i18n( $this->safe_memory_get_peak_usage() ) ) );
+
+			if ( ! WP_DEBUG )
+				$statuses[] = array( 'warning', __('Please Enable', 'debug-bar'), 'WP_DEBUG' );
+
+			$statuses = apply_filters( 'debug_bar_statuses', $statuses );
+
+			foreach ( $statuses as $status ):
+				list( $slug, $title, $data ) = $status;
+
+				?><div id='debug-status-<?php echo esc_attr( $slug ); ?>' class='debug-status'>
+					<div class='debug-status-title'><?php echo $title; ?></div>
+					<?php if ( ! empty( $data ) ): ?>
+						<div class='debug-status-data'><?php echo $data; ?></div>
+					<?php endif; ?>
+				</div><?php
+			endforeach;
+			?>
+		</div>
+	</div>
+
+	<div id='debug-bar-menu'>
+		<ul id="debug-menu-links">
+
+	<?php
+		$current = ' current';
+		foreach ( $this->panels as $panel ) :
+			$class = get_class( $panel );
+			?>
+			<li><a
+				id="debug-menu-link-<?php echo esc_attr( $class ); ?>"
+				class="debug-menu-link<?php echo $current; ?>"
+				href="#debug-menu-target-<?php echo esc_attr( $class ); ?>">
+				<?php
+				// Not escaping html here, so panels can use html in the title.
+				echo $panel->title();
+				?>
+			</a></li>
+			<?php
+			$current = '';
+		endforeach; ?>
+
+		</ul>
+	</div>
+
+	<div id="debug-menu-targets"><?php
+	$current = ' style="display: block"';
+	foreach ( $this->panels as $panel ) :
+		$class = get_class( $panel ); ?>
+
+		<div id="debug-menu-target-<?php echo $class; ?>" class="debug-menu-target" <?php echo $current; ?>>
+			<?php $panel->render(); ?>
+		</div>
+
+		<?php
+		$current = '';
+	endforeach;
+	?>
+	</div>
+
+	<?php do_action( 'debug_bar' ); ?>
+	</div>
+	<?php
+	}
+}
+
+$GLOBALS['debug_bar'] = new Debug_Bar();

+ 46 - 0
app/plugins/debug-bar/js/debug-bar-js.dev.js

@@ -0,0 +1,46 @@
+(function() {
+	var count, list, rawCount = 0;
+
+	window.onerror = function( errorMsg, url, lineNumber ) {
+
+		var errorLine, place, button, tab;
+
+		rawCount++;
+
+		if ( !count )
+			count = document.getElementById( 'debug-bar-js-error-count' );
+		if ( !list )
+			list = document.getElementById( 'debug-bar-js-errors' );
+
+		if ( !count || !list )
+			return; // threw way too early... @todo cache these?
+
+		if ( 1 == rawCount ) {
+			button = document.getElementById( 'wp-admin-bar-debug-bar' );
+			if ( !button )
+				return; // how did this happen?
+			if ( button.className.indexOf( 'debug-bar-php-warning-summary' ) === -1 )
+				button.className = button.className + ' debug-bar-php-warning-summary';
+
+			tab = document.getElementById('debug-menu-link-Debug_Bar_JS');
+			if ( tab )
+				tab.style.display = 'block';
+		}
+
+		count.textContent = rawCount;
+		errorLine = document.createElement( 'li' );
+		errorLine.className = 'debug-bar-js-error';
+		errorLine.textContent = errorMsg;
+		place = document.createElement( 'span' );
+		place.textContent = url + ' line ' + lineNumber;
+		errorLine.appendChild( place );
+		list.appendChild( errorLine );
+
+		return false;
+	};
+
+	// suppress error handling
+	window.addEventListener( 'error', function( e ) {
+		e.preventDefault();
+	}, true );
+})();

+ 1 - 0
app/plugins/debug-bar/js/debug-bar-js.js

@@ -0,0 +1 @@
+(function(){var b,c,a=0;window.onerror=function(j,g,d){var f,e,h,i;a++;if(!b){b=document.getElementById("debug-bar-js-error-count")}if(!c){c=document.getElementById("debug-bar-js-errors")}if(!b||!c){return}if(1==a){h=document.getElementById("wp-admin-bar-debug-bar");if(!h){return}if(h.className.indexOf("debug-bar-php-warning-summary")===-1){h.className=h.className+" debug-bar-php-warning-summary"}i=document.getElementById("debug-menu-link-Debug_Bar_JS");if(i){i.style.display="block"}}b.textContent=a;f=document.createElement("li");f.className="debug-bar-js-error";f.textContent=j;e=document.createElement("span");e.textContent=g+" line "+d;f.appendChild(e);c.appendChild(f);return false};window.addEventListener("error",function(d){d.preventDefault()},true)})();

+ 91 - 0
app/plugins/debug-bar/js/debug-bar.dev.js

@@ -0,0 +1,91 @@
+var wpDebugBar;
+
+(function($) {
+
+var api;
+
+wpDebugBar = api = {
+	// The element that we will pad to prevent the debug bar
+	// from overlapping the bottom of the page.
+	body: undefined,
+
+	init: function() {
+		// If we're not in the admin, pad the body.
+		api.body = $(document.body);
+
+		api.toggle.init();
+		api.tabs();
+		api.actions.init();
+	},
+
+	toggle: {
+		init: function() {
+			$('#wp-admin-bar-debug-bar').click( function(e) {
+				e.preventDefault();
+				api.toggle.visibility();
+			});
+		},
+		visibility: function( show ) {
+			show = typeof show == 'undefined' ? ! api.body.hasClass( 'debug-bar-visible' ) : show;
+
+			// Show/hide the debug bar.
+			api.body.toggleClass( 'debug-bar-visible', show );
+
+			// Press/unpress the button.
+			$(this).toggleClass( 'active', show );
+		}
+	},
+
+	tabs: function() {
+		var debugMenuLinks = $('.debug-menu-link'),
+			debugMenuTargets = $('.debug-menu-target');
+
+		debugMenuLinks.click( function(e) {
+			var t = $(this);
+
+			e.preventDefault();
+
+			if ( t.hasClass('current') )
+				return;
+
+			// Deselect other tabs and hide other panels.
+			debugMenuTargets.hide().trigger('debug-bar-hide');
+			debugMenuLinks.removeClass('current');
+
+			// Select the current tab and show the current panel.
+			t.addClass('current');
+			// The hashed component of the href is the id that we want to display.
+			$('#' + this.href.substr( this.href.indexOf( '#' ) + 1 ) ).show().trigger('debug-bar-show');
+		});
+	},
+
+	actions: {
+		init: function() {
+			var actions = $('#debug-bar-actions');
+
+			$('.maximize', actions).click( api.actions.maximize );
+			$('.restore',  actions).click( api.actions.restore );
+			$('.close',    actions).click( api.actions.close );
+		},
+		maximize: function() {
+			api.body.removeClass('debug-bar-partial');
+			api.body.addClass('debug-bar-maximized');
+		},
+		restore: function() {
+			api.body.removeClass('debug-bar-maximized');
+			api.body.addClass('debug-bar-partial');
+		},
+		close: function() {
+			api.toggle.visibility( false );
+			console.log( 'boo');
+		}
+	}
+};
+
+wpDebugBar.Panel = function() {
+
+};
+
+$(document).ready( wpDebugBar.init );
+
+})(jQuery);

+ 1 - 0
app/plugins/debug-bar/js/debug-bar.js

@@ -0,0 +1 @@
+var wpDebugBar;(function(b){var a;wpDebugBar=a={body:undefined,init:function(){a.body=b(document.body);a.toggle.init();a.tabs();a.actions.init()},toggle:{init:function(){b("#wp-admin-bar-debug-bar").click(function(c){c.preventDefault();a.toggle.visibility()})},visibility:function(c){c=typeof c=="undefined"?!a.body.hasClass("debug-bar-visible"):c;a.body.toggleClass("debug-bar-visible",c);b(this).toggleClass("active",c)}},tabs:function(){var d=b(".debug-menu-link"),c=b(".debug-menu-target");d.click(function(g){var f=b(this);g.preventDefault();if(f.hasClass("current")){return}c.hide().trigger("debug-bar-hide");d.removeClass("current");f.addClass("current");b("#"+this.href.substr(this.href.indexOf("#")+1)).show().trigger("debug-bar-show")})},actions:{init:function(){var c=b("#debug-bar-actions");b(".maximize",c).click(a.actions.maximize);b(".restore",c).click(a.actions.restore);b(".close",c).click(a.actions.close)},maximize:function(){a.body.removeClass("debug-bar-partial");a.body.addClass("debug-bar-maximized")},restore:function(){a.body.removeClass("debug-bar-maximized");a.body.addClass("debug-bar-partial")},close:function(){a.toggle.visibility(false);console.log("boo")}}};wpDebugBar.Panel=function(){};b(document).ready(wpDebugBar.init)})(jQuery);

+ 56 - 0
app/plugins/debug-bar/js/ui-dockable.dev.js

@@ -0,0 +1,56 @@
+/**
+ * Dockable.
+ **/
+(function($){
+	$.widget("db.dockable", $.ui.mouse, {
+		options: {
+			handle: false,
+			axis: 'y',
+			resize: function() {},
+			resized: function() {}
+		},
+		_create: function() {
+			if ( this.options.axis == 'x' ) {
+				this.page = 'pageX';
+				this.dimension = 'width';
+			} else {
+				this.page = 'pageY';
+				this.dimension = 'height';
+			}
+
+			if ( ! this.options.handle )
+				return;
+
+			this.handle = $( this.options.handle );
+
+			this._mouseInit();
+		},
+		_handoff: function() {
+			return {
+				element: this.element,
+				handle: this.handle,
+				axis: this.options.axis
+			};
+		},
+		_mouseStart: function(event) {
+			this._trigger( "start", event, this._handoff() );
+			this.d0 = this.element[this.dimension]() + event[this.page];
+		},
+		_mouseDrag: function(event) {
+			var resize = this._trigger( "resize", event, this._handoff() );
+
+			// If the resize event returns false, we don't resize.
+			if ( resize === false )
+				return;
+
+			this.element[this.dimension]( this.d0 - event[this.page] );
+			this._trigger( "resized", event, this._handoff() );
+		},
+		_mouseCapture: function(event) {
+			return !this.options.disabled && event.target == this.handle[0];
+		},
+		_mouseStop: function(event) {
+			this._trigger( "stop", event, this._handoff() );
+		}
+	});
+})(jQuery);

+ 1 - 0
app/plugins/debug-bar/js/ui-dockable.js

@@ -0,0 +1 @@
+(function(a){a.widget("db.dockable",a.ui.mouse,{options:{handle:false,axis:"y",resize:function(){},resized:function(){}},_create:function(){if(this.options.axis=="x"){this.page="pageX";this.dimension="width"}else{this.page="pageY";this.dimension="height"}if(!this.options.handle){return}this.handle=a(this.options.handle);this._mouseInit()},_handoff:function(){return{element:this.element,handle:this.handle,axis:this.options.axis}},_mouseStart:function(b){this._trigger("start",b,this._handoff());this.d0=this.element[this.dimension]()+b[this.page]},_mouseDrag:function(c){var b=this._trigger("resize",c,this._handoff());if(b===false){return}this.element[this.dimension](this.d0-c[this.page]);this._trigger("resized",c,this._handoff())},_mouseCapture:function(b){return !this.options.disabled&&b.target==this.handle[0]},_mouseStop:function(b){this._trigger("stop",b,this._handoff())}})})(jQuery);

+ 97 - 0
app/plugins/debug-bar/panels/class-debug-bar-deprecated.php

@@ -0,0 +1,97 @@
+<?php
+// Alot of this code is massaged from Andrew Nacin's log-deprecated-notices plugin
+
+class Debug_Bar_Deprecated extends Debug_Bar_Panel {
+	var $deprecated_functions = array();
+	var $deprecated_files = array();
+	var $deprecated_arguments = array();
+
+	function init() {
+		$this->title( __('Deprecated', 'debug-bar') );
+
+		add_action( 'deprecated_function_run', array( &$this, 'deprecated_function_run' ), 10, 3 );
+		add_action( 'deprecated_file_included', array( &$this, 'deprecated_file_included' ), 10, 4 );
+		add_action( 'deprecated_argument_run',  array( &$this, 'deprecated_argument_run' ),  10, 3 );
+
+		// Silence E_NOTICE for deprecated usage.
+		foreach ( array( 'function', 'file', 'argument' ) as $item )
+			add_filter( "deprecated_{$item}_trigger_error", '__return_false' );
+	}
+
+	function prerender() {
+		$this->set_visible(
+			count( $this->deprecated_functions )
+			|| count( $this->deprecated_files )
+			|| count( $this->deprecated_arguments )
+		);
+	}
+
+	function render() {
+		echo "<div id='debug-bar-deprecated'>";
+		echo '<h2><span>Total Functions:</span>' . number_format( count( $this->deprecated_functions ) ) . "</h2>\n";
+		echo '<h2><span>Total Arguments:</span>' . number_format( count( $this->deprecated_arguments ) ) . "</h2>\n";
+		echo '<h2><span>Total Files:</span>' . number_format( count( $this->deprecated_files ) ) . "</h2>\n";
+		if ( count( $this->deprecated_functions ) ) {
+			echo '<ol class="debug-bar-deprecated-list">';
+			foreach ( $this->deprecated_functions as $location => $message)
+				echo "<li class='debug-bar-deprecated-function'>".str_replace(ABSPATH, '', $location) . ' - ' . strip_tags($message). "</li>";
+			echo '</ol>';
+		}
+		if ( count( $this->deprecated_files ) ) {
+			echo '<ol class="debug-bar-deprecated-list">';
+			foreach ( $this->deprecated_files as $location => $message)
+				echo "<li class='debug-bar-deprecated-function'>".str_replace(ABSPATH, '', $location) . ' - ' . strip_tags($message). "</li>";
+			echo '</ol>';
+		}
+		if ( count( $this->deprecated_arguments ) ) {
+			echo '<ol class="debug-bar-deprecated-list">';
+			foreach ( $this->deprecated_arguments as $location => $message)
+				echo "<li class='debug-bar-deprecated-function'>".str_replace(ABSPATH, '', $location) . ' - ' . strip_tags($message). "</li>";
+			echo '</ol>';
+		}
+		echo "</div>";
+	}
+
+	function deprecated_function_run($function, $replacement, $version) {
+		$backtrace = debug_backtrace();
+		$bt = 4;
+		// Check if we're a hook callback.
+		if ( ! isset( $backtrace[4]['file'] ) && 'call_user_func_array' == $backtrace[5]['function'] ) {
+			$bt = 6;
+		}
+		$file = $backtrace[ $bt ]['file'];
+		$line = $backtrace[ $bt ]['line'];
+		if ( ! is_null($replacement) )
+			$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 'debug-bar'), $function, $version, $replacement );
+		else
+			$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 'debug-bar'), $function, $version );
+
+		$this->deprecated_functions[$file.':'.$line] = $message;
+	}
+
+	function deprecated_file_included( $old_file, $replacement, $version, $message ) {
+		$backtrace = debug_backtrace();
+		$file = $backtrace[4]['file'];
+		$file_abs = str_replace(ABSPATH, '', $file);
+		$line = $backtrace[4]['line'];
+		$message = empty( $message ) ? '' : ' ' . $message;
+		if ( ! is_null( $replacement ) )
+			$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 'debug-bar'), $file_abs, $version, $replacement ) . $message;
+		else
+			$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 'debug-bar'), $file_abs, $version ) . $message;
+
+		$this->deprecated_files[$file.':'.$line] = $message;
+	}
+
+	function deprecated_argument_run( $function, $message, $version) {
+		$backtrace = debug_backtrace();
+		$bt = 4;
+		if ( ! isset( $backtrace[4]['file'] ) && 'call_user_func_array' == $backtrace[5]['function'] ) {
+			$bt = 6;
+		}
+		$file = $backtrace[ $bt ]['file'];
+		$line = $backtrace[ $bt ]['line'];
+
+		$this->deprecated_arguments[$file.':'.$line] = $message;
+	}
+}

+ 24 - 0
app/plugins/debug-bar/panels/class-debug-bar-js.php

@@ -0,0 +1,24 @@
+<?php
+
+class Debug_Bar_JS extends Debug_Bar_Panel {
+	var $real_error_handler = array();
+
+	function init() {
+		if ( !defined( 'SCRIPT_DEBUG' ) || !SCRIPT_DEBUG )
+			return false;
+
+		$this->title( __('JavaScript', 'debug-bar') );
+
+		// attach here instead of debug_bar_enqueue_scripts
+		// because we want to be as early as possible!
+		$wcsf2011 = '20110813';
+		wp_enqueue_script( 'debug-bar-js', plugins_url( "js/debug-bar-js.dev.js", dirname(__FILE__) ), array(), $wcsf2011 );
+	}
+
+	function render() {
+		echo '<div id="debug-bar-js">';
+		echo '<h2><span>' . __( 'Total Errors:', 'debug-bar' ) . "</span><div id='debug-bar-js-error-count'>0</div></h2>\n";
+		echo '<ol class="debug-bar-js-list" id="debug-bar-js-errors"></ol>' . "\n";
+		echo '</div>';
+	}
+}

+ 24 - 0
app/plugins/debug-bar/panels/class-debug-bar-object-cache.php

@@ -0,0 +1,24 @@
+<?php
+
+class Debug_Bar_Object_Cache extends Debug_Bar_Panel {
+	function init() {
+		$this->title( __('Object Cache', 'debug-bar') );
+	}
+
+	function prerender() {
+		global $wp_object_cache;
+		$this->set_visible( is_object($wp_object_cache) && method_exists($wp_object_cache, 'stats') );
+	}
+
+	function render() {
+		global $wp_object_cache;
+		ob_start();
+		echo "<div id='object-cache-stats'>";
+		$wp_object_cache->stats();
+		echo "</div>";
+		$out = ob_get_contents();
+		ob_end_clean();
+
+		echo $out;
+	}
+}

+ 47 - 0
app/plugins/debug-bar/panels/class-debug-bar-panel.php

@@ -0,0 +1,47 @@
+<?php
+
+class Debug_Bar_Panel {
+	var $_title = '';
+	var $_visible = true;
+
+	function Debug_Bar_Panel( $title='' ) {
+		$this->title( $title );
+
+		if ( $this->init() === false ) {
+			$this->set_visible( false );
+			return;
+		}
+
+		add_filter( 'debug_bar_classes', array( &$this, 'debug_bar_classes' ) );
+	}
+
+	/**
+	 * Initializes the panel.
+	 */
+	function init() {}
+
+	function prerender() {}
+
+	/**
+	 * Renders the panel.
+	 */
+	function render() {}
+
+	function is_visible() {
+		return $this->_visible;
+	}
+
+	function set_visible( $visible ) {
+		$this->_visible = $visible;
+	}
+
+	function title( $title=NULL ) {
+		if ( ! isset( $title ) )
+			return $this->_title;
+		$this->_title = $title;
+	}
+
+	function debug_bar_classes( $classes ) {
+		return $classes;
+	}
+}

+ 82 - 0
app/plugins/debug-bar/panels/class-debug-bar-php.php

@@ -0,0 +1,82 @@
+<?php
+
+class Debug_Bar_PHP extends Debug_Bar_Panel {
+	var $warnings = array();
+	var $notices = array();
+	var $real_error_handler = array();
+
+	function init() {
+		if ( ! WP_DEBUG )
+			return false;
+
+		$this->title( __('Notices / Warnings', 'debug-bar') );
+
+		$this->real_error_handler = set_error_handler( array( &$this, 'error_handler' ) );
+	}
+
+	function is_visible() {
+		return count( $this->notices ) || count( $this->warnings );
+	}
+
+	function debug_bar_classes( $classes ) {
+		if ( count( $this->warnings ) )
+			$classes[] = 'debug-bar-php-warning-summary';
+		elseif ( count( $this->notices ) )
+			$classes[] = 'debug-bar-php-notice-summary';
+		return $classes;
+	}
+
+	function error_handler( $type, $message, $file, $line ) {
+		$_key = md5( $file . ':' . $line . ':' . $message );
+
+		switch ( $type ) {
+			case E_WARNING :
+			case E_USER_WARNING :
+				$this->warnings[$_key] = array( $file.':'.$line, $message );
+				break;
+			case E_NOTICE :
+			case E_USER_NOTICE :
+				$this->notices[$_key] = array( $file.':'.$line, $message );
+				break;
+			case E_STRICT :
+				// TODO
+				break;
+			case E_DEPRECATED :
+			case E_USER_DEPRECATED :
+				// TODO
+				break;
+			case 0 :
+				// TODO
+				break;
+		}
+
+		if ( null != $this->real_error_handler )
+			return call_user_func( $this->real_error_handler, $type, $message, $file, $line );
+		else
+			return false;
+	}
+
+	function render() {
+		echo "<div id='debug-bar-php'>";
+		echo '<h2><span>Total Warnings:</span>' . number_format( count( $this->warnings ) ) . "</h2>\n";
+		echo '<h2><span>Total Notices:</span>' . number_format( count( $this->notices ) ) . "</h2>\n";
+		if ( count( $this->warnings ) ) {
+			echo '<ol class="debug-bar-php-list">';
+			foreach ( $this->warnings as $location_message) {
+				list( $location, $message) = $location_message;
+				echo "<li class='debug-bar-php-warning'>WARNING: ".str_replace(ABSPATH, '', $location) . ' - ' . strip_tags($message). "</li>";
+			}
+			echo '</ol>';
+		}
+		if ( count( $this->notices ) ) {
+			echo '<ol class="debug-bar-php-list">';
+			foreach ( $this->notices as $location_message) {
+				list( $location, $message) = $location_message;
+				echo "<li  class='debug-bar-php-notice'>NOTICE: ".str_replace(ABSPATH, '', $location) . ' - ' . strip_tags($message). "</li>";
+			}
+			echo '</ol>';
+		}
+		echo "</div>";
+
+	}
+}

+ 80 - 0
app/plugins/debug-bar/panels/class-debug-bar-queries.php

@@ -0,0 +1,80 @@
+<?php
+
+class Debug_Bar_Queries extends Debug_Bar_Panel {
+	function init() {
+		$this->title( __('Queries', 'debug-bar') );
+	}
+
+	function prerender() {
+		$this->set_visible( defined('SAVEQUERIES') && SAVEQUERIES || ! empty($GLOBALS['EZSQL_ERROR']) );
+	}
+
+	function debug_bar_classes( $classes ) {
+		if ( ! empty($GLOBALS['EZSQL_ERROR']) )
+			$classes[] = 'debug-bar-php-warning-summary';
+		return $classes;
+	}
+
+	function render() {
+		global $wpdb, $EZSQL_ERROR;
+
+		$out = '';
+		$total_time = 0;
+
+		if ( !empty($wpdb->queries) ) {
+			$show_many = isset($_GET['debug_queries']);
+
+			if ( $wpdb->num_queries > 500 && !$show_many )
+				$out .= "<p>" . sprintf( __('There are too many queries to show easily! <a href="%s">Show them anyway</a>', 'debug-bar'), esc_url( add_query_arg( 'debug_queries', 'true' ) ) ) . "</p>";
+
+			$out .= '<ol class="wpd-queries">';
+			$counter = 0;
+
+			foreach ( $wpdb->queries as $q ) {
+				list($query, $elapsed, $debug) = $q;
+
+				$total_time += $elapsed;
+
+				if ( ++$counter > 500 && ! $show_many )
+					continue;
+
+				$debug = explode( ', ', $debug );
+				$debug = array_diff( $debug, array( 'require_once', 'require', 'include_once', 'include' ) );
+				$debug = implode( ', ', $debug );
+				$debug = str_replace( array( 'do_action, call_user_func_array' ), array( 'do_action' ), $debug );
+				$query = nl2br(esc_html($query));
+
+				$out .= "<li>$query<br/><div class='qdebug'>$debug <span>#{$counter} (" . number_format(sprintf('%0.1f', $elapsed * 1000), 1, '.', ',') . "ms)</span></div></li>\n";
+			}
+			$out .= '</ol>';
+		} else {
+			if ( $wpdb->num_queries == 0 )
+				$out .= "<p><strong>" . __('There are no queries on this page.', 'debug-bar') . "</strong></p>";
+			else
+				$out .= "<p><strong>" . __('SAVEQUERIES must be defined to show the query log.', 'debug-bar') . "</strong></p>";
+		}
+
+		if ( ! empty($EZSQL_ERROR) ) {
+			$out .= '<h3>' . __( 'Database Errors', 'debug-bar' ) . '</h3>';
+			$out .= '<ol class="wpd-queries">';
+
+			foreach ( $EZSQL_ERROR as $e ) {
+				$query = nl2br(esc_html($e['query']));
+				$out .= "<li>$query<br/><div class='qdebug'>{$e['error_str']}</div></li>\n";
+			}
+			$out .= '</ol>';
+		}
+
+		$heading = '';
+		if ( $wpdb->num_queries )
+			$heading .= '<h2><span>Total Queries:</span>' . number_format( $wpdb->num_queries ) . "</h2>\n";
+		if ( $total_time )
+			$heading .= '<h2><span>Total query time:</span>' . number_format(sprintf('%0.1f', $total_time * 1000), 1) . " ms</h2>\n";
+		if ( ! empty($EZSQL_ERROR) )
+			$heading .= '<h2><span>Total DB Errors:</span>' . number_format( count($EZSQL_ERROR) ) . "</h2>\n";
+
+		$out = $heading . $out;
+
+		echo $out;
+	}
+}

+ 51 - 0
app/plugins/debug-bar/panels/class-debug-bar-request.php

@@ -0,0 +1,51 @@
+<?php
+
+class Debug_Bar_Request extends Debug_Bar_Panel {
+	function init() {
+		$this->title( __('Request', 'debug-bar') );
+	}
+
+	function prerender() {
+		$this->set_visible( ! is_admin() );
+	}
+
+	function render() {
+		global $wp;
+
+		echo "<div id='debug-bar-request'>";
+
+		if ( empty($wp->request) )
+			$request = 'None';
+		else
+			$request = $wp->request;
+
+		echo '<h3>Request:</h3>';
+		echo '<p>' . esc_html( $request ) . '</p>';
+
+		if ( empty($wp->query_string) )
+			$query_string = 'None';
+		else
+			$query_string = $wp->query_string;
+
+		echo '<h3>Query String:</h3>';
+		echo '<p>' . esc_html( $query_string ) . '</p>';
+
+		if ( empty($wp->matched_rule) )
+			$matched_rule = 'None';
+		else
+			$matched_rule = $wp->matched_rule;
+
+		echo '<h3>Matched Rewrite Rule:</h3>';
+		echo '<p>' . esc_html( $matched_rule ) . '</p>';
+
+		if ( empty($wp->matched_query) )
+			$matched_query = 'None';
+		else
+			$matched_query = $wp->matched_query;
+
+		echo '<h3>Matched Rewrite Query:</h3>';
+		echo '<p>' . esc_html( $matched_query ) . '</p>';
+
+		echo '</div>';
+	}
+}

+ 105 - 0
app/plugins/debug-bar/panels/class-debug-bar-wp-query.php

@@ -0,0 +1,105 @@
+<?php
+
+class Debug_Bar_WP_Query extends Debug_Bar_Panel {
+	function init() {
+		$this->title( __('WP Query', 'debug-bar') );
+	}
+
+	function prerender() {
+		$this->set_visible( defined('SAVEQUERIES') && SAVEQUERIES );
+	}
+
+	function render() {
+		global $template, $wp_query;
+		$queried_object = get_queried_object();
+		if ( $queried_object && isset( $queried_object->post_type ) )
+			$post_type_object = get_post_type_object( $queried_object->post_type );
+
+		echo "<div id='debug-bar-wp-query'>";
+		echo '<h2><span>Queried Object ID:</span>' . get_queried_object_id() . "</h2>\n";
+
+		// Determine the query type. Follows the template loader order.
+		$type = '';
+		if ( is_404() )
+			$type = '404';
+		elseif ( is_search() )
+			$type = 'Search';
+		elseif ( is_tax() )
+			$type = 'Taxonomy';
+		elseif ( is_front_page() )
+			$type = 'Front Page';
+		elseif ( is_home() )
+			$type = 'Home';
+		elseif ( is_attachment() )
+			$type = 'Attachment';
+		elseif ( is_single() )
+			$type = 'Single';
+		elseif ( is_page() )
+			$type = 'Page';
+		elseif ( is_category() )
+			$type = 'Category';
+		elseif ( is_tag() )
+			$type = 'Tag';
+		elseif ( is_author() )
+			$type = 'Author';
+		elseif ( is_date() )
+			$type = 'Date';
+		elseif ( is_archive() )
+			$type = 'Archive';
+		elseif ( is_paged() )
+			$type = 'Paged';
+
+		if ( !empty($type) )
+			echo '<h2><span>Query Type:</span>' . $type . "</h2>\n";
+
+		if ( !empty($template) )
+			echo '<h2><span>Query Template:</span>' . basename($template) . "</h2>\n";
+
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+		$page_for_posts = get_option( 'page_for_posts' );
+
+		echo '<h2><span>Show on Front:</span>' . $show_on_front . "</h2>\n";
+		if ( 'page' == $show_on_front ) {
+			echo '<h2><span>Page for Posts:</span>' . $page_for_posts . "</h2>\n";
+			echo '<h2><span>Page on Front:</span>' . $page_on_front . "</h2>\n";
+		}
+
+		if ( isset( $post_type_object ) )
+			echo '<h2><span>Post Type:</span>' . $post_type_object->labels->singular_name . "</h2>\n";
+
+		echo '<div class="clear"></div>';
+
+		if ( empty($wp_query->query) )
+			$query = 'None';
+		else
+			$query = http_build_query( $wp_query->query );
+
+		echo '<h3>Query Arguments:</h3>';
+		echo '<p>' . esc_html( $query ) . '</p>';
+
+		if ( ! empty($wp_query->request) ) {
+			echo '<h3>Query SQL:</h3>';
+			echo '<p>' . esc_html( $wp_query->request ) . '</p>';
+		}
+
+		if ( ! is_null( $queried_object ) ) {
+			echo '<h3>Queried Object:</h3>';
+			echo '<ol class="debug-bar-wp-query-list">';
+			foreach ($queried_object as $key => $value) {
+				// See: http://wordpress.org/support/topic/plugin-debug-bar-custom-post-type-archive-catchable-fatal-error
+				// TODO: Fix better
+				if ( is_object( $value ) ) {
+					echo '<li>' . $key . ' => <ol>';
+					foreach ( $value as $_key => $_value )
+						echo '<li>' . $_key . ' => ' . $_value . '</li>';
+					echo '</ol></li>';
+				} else {
+					echo '<li>' . $key . ' => ' . $value . '</li>';
+				}
+			}
+			echo '</ol>';
+		}
+		echo '</div>';
+	}
+}

+ 126 - 0
app/plugins/debug-bar/readme.txt

@@ -0,0 +1,126 @@
+=== Debug Bar ===
+Contributors: wordpressdotorg, ryan, westi, koopersmith, duck_, mitchoyoshitaka
+Tags: debug
+Tested up to: 3.6
+Stable tag: 0.8
+Requires at least: 3.1
+
+Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
+
+== Description ==
+
+Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
+
+A must for developers!
+
+When WP_DEBUG is enabled it also tracks PHP Warnings and Notices to make them easier to find.
+
+When SAVEQUERIES is enabled the mysql queries are tracked and displayed.
+
+Add a PHP/MySQL console with the [Debug Bar Console plugin](http://wordpress.org/extend/plugins/debug-bar-console/).
+
+== Upgrade Notice ==
+
+= 0.8.1 =
+Minor security fix.
+
+= 0.8 =
+WordPress 3.3 compatibility
+UI refresh
+Removed jQuery UI requirement
+Full screen by default
+New debug-bar query parameter to show on page load
+Removed display cookies
+JavaScript error tracking (disabled by default)
+
+= 0.7 =
+Made compatible with PHP < 5.2.0
+CSS Tweaks
+Load JavaScript in Footer
+Fixed display issues for WP_Query debug on CPT archives pages
+SQL/DB error tracking
+
+= 0.6 =
+Added maximize/restore button
+Added cookie to keep track of debug bar state
+Added post type information to WP_Query tab
+Bug fix where bottom of page was obscured in the admin
+
+= 0.5 =
+New UI
+Backend rewritten with a class for each panel
+Many miscellaneous improvements
+
+= 0.4.1 =
+Compatibility updates for trunk
+
+= 0.4 =
+Added DB Version information
+Updated PHP Warning and Notice tracking so that multiple different errors on the same line are tracked
+Compatibility updates for trunk
+
+= 0.3 =
+Added WordPress Query infomation
+Added Request parsing information
+
+= 0.2 =
+Added PHP Notice / Warning tracking when WP_DEBUG enabled
+Added deprecated function usage tracking
+
+= 0.1 =
+Initial Release
+
+== Changelog ==
+
+= 0.8.1 =
+Minor security fix.
+
+= 0.8 =
+WordPress 3.3 compatibility
+UI refresh
+Removed jQuery UI requirement
+Full screen by default
+New debug-bar query parameter to show on page load
+Removed display cookies
+JavaScript error tracking (disabled by default)
+
+= 0.7 =
+Made compatible with PHP < 5.2.0
+CSS Tweaks
+Load JavaScript in Footer
+Fixed display issues for WP_Query debug on CPT archives pages
+SQL/DB error tracking
+
+= 0.6 =
+Added maximize/restore button
+Added cookie to keep track of debug bar state
+Added post type information to WP_Query tab
+Bug fix where bottom of page was obscured in the admin
+
+= 0.5 =
+New UI
+Backend rewritten with a class for each panel
+Many miscellaneous improvements
+
+= 0.4.1 =
+Compatibility updates for trunk
+
+= 0.4 =
+Added DB Version information
+Updated PHP Warning and Notice tracking so that multiple different errors on the same line are tracked
+Compatibility updates for trunk
+
+= 0.3 =
+Added WordPress Query infomation
+Added Request parsing information
+
+= 0.2 =
+Added PHP Notice / Warning tracking when WP_DEBUG enabled
+Added deprecated function usage tracking
+
+= 0.1 =
+Initial Release
+
+== Installation ==
+
+Use automatic installer.

+ 1 - 0
app/plugins/regenerate-thumbnails

@@ -0,0 +1 @@
+Subproject commit 550b3994b005f12b07aa3da61814b083b5aeb319

+ 1 - 0
app/plugins/theme-check

@@ -0,0 +1 @@
+Subproject commit ff5472ba844c2874e05cc9698ef0c839b6a583fe

Some files were not shown because too many files changed in this diff