You are here

function feeds_push_unsubscribe in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_push_unsubscribe()

Scheduler callback for unsubscribing from PuSH hubs.

Parameters

array $job: A job definition, which consists of at least the following elements:

  • type (string) The importer ID.
  • id (int) The Feed node ID if the importer is attached to a content type. Otherwise 0.

Related topics

3 string references to 'feeds_push_unsubscribe'
feeds_cron_job_scheduler_info in ./feeds.module
Implements hook_cron_job_scheduler_info().
feeds_cron_queue_info in ./feeds.module
Implements hook_cron_queue_info().
feeds_uninstall in ./feeds.install
Implements hook_uninstall().

File

./feeds.module, line 248
Feeds - basic API functions and hook implementations.

Code

function feeds_push_unsubscribe($job) {
  $source = feeds_source($job['type'], $job['id']);

  /** @var FeedsFetcher $fetcher */
  $fetcher = feeds_plugin('FeedsHTTPFetcher', $source->importer->id);
  $fetcher
    ->unsubscribe($source);
}