I am making a widget that utilizes the wp_list_tables class. Everything works great in the plugin admin section.
However, as soon as I simply instantiate my GB_List_Tables class, which extends WP_List_Tables, the widget throws a fatal error: undefined function convert_to_screen (url: http://heartwoodfarms.org/greenbox/ if you're curious, nothing much to see though)
Here's my widget() function:
//Display the widget
function widget( $args, $instance ){
extract( $args );
$title = empty($instance['title']) ? ' ' : apply_filters('my title', $instance['title']);
echo $before_widget;
// Display the widget title
if ( $title )
echo $before_title . $title . $after_title;
$list_table = new GB_List_Table();
echo $after_widget;
}
After much futile debuggery, I finally checked in template.php, and, sure enough, there is no function convert_to_screen() , even though that is where the function is supposed to reside.
Is this something that was deprecated with a new version of wordpress? I have the latest: 3.5
I have tried to copy and paste the convert_to_screen function into template.php, but I find myself in a seemingly endless stream of things that are required but are missing in order for convert_to_screen() to work.
I'm stuck. Help would be greatly appreciated.