print_column_headers

Definition:
function print_column_headers( $screen, $id = true ) {}

Parameters

  • unknown_type $screen
  • unknown_type $id

Source code

function print_column_headers( $screen, $id = true ) {

	if ( is_string($screen) )

		$screen = convert_to_screen($screen);



	$columns = get_column_headers( $screen );

	$hidden = get_hidden_columns($screen);

	$styles = array();



	foreach ( $columns as $column_key => $column_display_name ) {

		$class = ' class="manage-column';



		$class .= " column-$column_key";



		if ( 'cb' == $column_key )

			$class .= ' check-column';

		elseif ( in_array($column_key, array('posts', 'comments', 'links')) )

			$class .= ' num';



		$class .= '"';



		$style = '';

		if ( in_array($column_key, $hidden) )

			$style = 'display:none;';



		if ( isset($styles[$screen->id]) && isset($styles[$screen->id][$column_key]) )

			$style .= ' ' . $styles[$screen>id][$column_key];

		$style = ' style="' . $style . '"';

?>

	<th scope="col" <?php echo $id ? "id=\"$column_key\"" : ""; echo $class; echo $style; ?>><?php echo $column_display_name; ?></th>

<?php }

}

2625

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: