You are here

function hook_fb_instant_articles_display_is_article_type_alter in Facebook Instant Articles 7

Same name and namespace in other branches
  1. 7.2 modules/fb_instant_articles_display/fb_instant_articles_display.api.php \hook_fb_instant_articles_display_is_article_type_alter()

Allows modules to alter if an entity type and bundle are treated as Facebook Instant Articles.

Parameters

$is_type: A boolean for if this is a node type that should be served as a Facebook Instant Article.

$entity_type: The entity type name.

$bundle: The entity bundle name.

See also

fb_instant_articles_display_is_article_type()

1 invocation of hook_fb_instant_articles_display_is_article_type_alter()
fb_instant_articles_display_is_article_type in modules/fb_instant_articles_display/fb_instant_articles_display.module
Checks if an entity type and bundle are a Facebook Instant Article type.

File

modules/fb_instant_articles_display/fb_instant_articles_display.api.php, line 22
Hooks provided by Facebook Instant Articles Display module.

Code

function hook_fb_instant_articles_display_is_article_type_alter(&$is_type, $entity_type, $bundle) {

  // Explicitly set content type to be included in the RSS feed.
  if (!$is_type && $entity_type == 'article' && $bundle == 'node') {
    $is_type = TRUE;
  }
}