function fb_instant_articles_display_is_article_type in Facebook Instant Articles 7
Same name and namespace in other branches
- 7.2 modules/fb_instant_articles_display/fb_instant_articles_display.module \fb_instant_articles_display_is_article_type()
Checks if an entity type and bundle are a Facebook Instant Article type.
Parameters
string $entity_type: The entity type name.
string $bundle: The entity bundle name.
Return value
bool Boolean TRUE or FALSE.
7 calls to fb_instant_articles_display_is_article_type()
- facebook_instant_articles_api_import_action in modules/
fb_instant_articles_api_rules/ fb_instant_articles_api_rules.module - Implementation of a Facebook instant article node import action.
- facebook_instant_articles_api_remove_action in modules/
fb_instant_articles_api_rules/ fb_instant_articles_api_rules.module - Implementation of a Facebook instant article node delete action.
- fb_instant_articles_display_form_node_type_form_alter in modules/
fb_instant_articles_display/ fb_instant_articles_display.module - Implements hook_form_FORM_ID_alter().
- fb_instant_articles_display_node_type_form_submit in modules/
fb_instant_articles_display/ fb_instant_articles_display.module - Submit callback for node type form.
- fb_instant_articles_rss_form_node_form_alter in modules/
fb_instant_articles_rss/ fb_instant_articles_rss.module - Implements hook_form_BASE_FORM_ID_alter().
File
- modules/
fb_instant_articles_display/ fb_instant_articles_display.module, line 95 - Hook implementations for Facebook Instant Articles Display module.
Code
function fb_instant_articles_display_is_article_type($entity_type, $bundle) {
$is_type = FALSE;
if ($types = fb_instant_articles_display_get_article_entity_types()) {
// See if this entity type and bundle exists.
if (isset($types[$entity_type]) && isset($types[$entity_type][$bundle])) {
$is_type = TRUE;
}
}
// Allow other modules to alter.
drupal_alter('fb_instant_articles_display_is_article_type', $is_type, $entity_type, $bundle);
return $is_type;
}