function hook_fb_instant_articles_transformer_rules_alter in Facebook Instant Articles 7.2
Same name and namespace in other branches
- 8.2 fb_instant_articles.api.php \hook_fb_instant_articles_transformer_rules_alter()
- 3.x fb_instant_articles.api.php \hook_fb_instant_articles_transformer_rules_alter()
Transform rule definitions.
Parameters
array $rules: An array of transformer rule definitions.
See also
hook_fb_instant_articles_transformer_rules()
1 invocation of hook_fb_instant_articles_transformer_rules_alter()
- TransformerExtender::__construct in src/
TransformerExtender.php - Transformer constructor.
File
- ./
fb_instant_articles.api.php, line 81 - Hooks provided by Facebook Instant Articles Base module.
Code
function hook_fb_instant_articles_transformer_rules_alter($rules) {
// Example: Remove caption rule from list of base rules.
foreach ($rules as $rule) {
if ($rule['class'] == 'CaptionRule' && $rule['selector'] == 'img') {
unset($rules[$rule]);
}
}
}