Find if the drupal node is published or not published in node_save()
You are looking for $node-&gt;status. The Node module defines two constants which you can use instead of 0/1 to make your code more readable:

/**
 * Node is not published.
 */
define('NODE_NOT_PUBLISHED', 0);

/**
 * Node is published.
 */
define('NODE_PUBLISHED', 1);


Example:

if ($node-&gt;status == NODE_PUBLISHED) {
  // Node is published.
}


Note that you should not alter node_save(). Instead, implement hook_nodeapi() to do something either before ($op is "presave") or after ($op is "insert"/"update") the node is saved.