You are here

function http_response_headers_rule_delete in HTTP Response Headers 7

Callback to delete a header rule.

Parameters

string $machine_name: A string rule ID to delete.

1 call to http_response_headers_rule_delete()
HttpResponseHeadersTestCase::deleteHeaderRule in ./http_response_headers.test
Deletes a rule with given rule ID.
1 string reference to 'http_response_headers_rule_delete'
drush_http_response_headers_http_header_del in ./http_response_headers.drush.inc
Deletes a header rule.

File

./http_response_headers.module, line 375
Contains HTTP response headers.

Code

function http_response_headers_rule_delete($machine_name) {
  db_delete('http_response_headers')
    ->condition('machine_name', $machine_name)
    ->execute();

  // Clear the header rules cache.
  http_response_headers_cache_reset();
}