You are here

function amp_db_remove in Accelerated Mobile Pages (AMP) 7

Remove a given node from AMP.

Parameters

$node_id: Node ID to remove.

Throws

\Exception

2 calls to amp_db_remove()
amp_db_enable_amp in includes/amp.db.inc
Set a node as AMP enabled.
amp_node_delete in ./amp.module
Implements hook_node_delete().

File

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

Code

function amp_db_remove($node_id) {

  // Deleting it from the table will set it up as enabled by default and will
  // keep the table as small as possible.
  db_delete('amp_node')
    ->condition('aid', $node_id)
    ->execute();
}