1 node.actions.inc node_promote_action(Node $node, &$context)

Sets the promote property of a node to 1.

Parameters

Node $node: A node entity.

$context: Contextual information about the triggered action.

Related topics

File

core/modules/node/node.actions.inc, line 77
Action callbacks for Node module.

Code

function node_promote_action(Node $node, &$context) {
  $node->promote = NODE_PROMOTED;
  $node->save();
}