How to get the node status?
Getting a node's status is quite simple:

// Get the node with node ID 123.
$node = node_load(123);
// Get its status.
$status = $node-&gt;status;


That said... I don't know what your function looks like or in which context it's running, so depending on your situation, there may be an even better way to get what you want.