<?php

/*
Plugin Name: Tests for WP_Posts_List_Table Patch (#18516)
Plugin URI: http://core.trac.wordpress.org/ticket/18516
Description: Tests adding a custom value to the WP_Posts_List_Table single row
Version: 0.1
Author: brandondove
Author URI: http://pixeljar.net
*/

/**
 * Copyright (c) 2011 brandondove. All rights reserved.
 *
 * Released under the GPL license
 * http://www.opensource.org/licenses/gpl-license.php
 *
 * This is an add-on for WordPress
 * http://wordpress.org/
 *
 * **********************************************************************
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * **********************************************************************
 */



/**
* Test new post_class functionality.
*/
class bd_test_posts_list_table_test {
	
	function __construct() {
		add_filter( 'post_class', array( &$this, 'post_class' ) );
	}
	
	function post_class( $classes ) {
		global $post, $current_screen;
		
		if( $current_screen->id == 'edit-post' )
			$classes[] = "custom-class";
		
		return $classes;
	}
	
}
if( is_admin() ) :
	new bd_test_posts_list_table_test;
endif;