You are here

function amp_db_disable_amp in Accelerated Mobile Pages (AMP) 7

Set a node as AMP disabled.

Parameters

$node_id: Node ID of the node to set as disabled.

Throws

\Exception

1 call to amp_db_disable_amp()
amp_node_enabled_form_submit in ./amp.module
Form callback to save the enabled status.

File

includes/amp.db.inc, line 46
DB functions for AMP.

Code

function amp_db_disable_amp($node_id) {
  db_merge('amp_node')
    ->key(array(
    'aid' => $node_id,
  ))
    ->fields(array(
    'status' => AMP_DISABLED,
  ))
    ->execute();
}