I see that when I am creating a block through the drupal admin I can use PHP, in addition to plain text & html. Is there a variable in scope that I can use to access the node id?
<?php echo my_custom_function( $node_id, $my_desired_class); ?>
You can use the menu_get_object()
function which will get you the node object for the page, assuming of course your block is being displayed on a node page:
$node = menu_get_object();
if (isset($node->nid)) {
$nid = $node->nid;
echo my_custom_function($nid, $my_desired_class);
}