This is a general question that I couldn't find a satisfactory answer to. Apart from the obvious, making a node visible on the user side versus keeping it in a 'draft' mode, what does publishing a node accomplish? Especially if the node isn't front-end content.
2 Answers
Node status is baked into the node access system fairly deeply in implementations. What I mean is, it is not directly used by used hook_node_access()
and hook_node_grants()
, but implementations of these hooks do. The node access system defines who can see and do what to nodes. So, if you are using nodes outside of page content (eg, using Rabbit Hole w/ Nodequeue), you can still hide your unpublished content from people who don't need to see it.
-
Thanks for that link, and the detailed explanation. I learnt a lot about
node_access
! Commented Nov 5, 2016 at 19:16
In the database, the 'node' table has a 'status' column. On 1, the node is published, and on 0 it is unpublished. Basically, publishing an unpublished node is setting this 0 to 1.