Commit 44a942b3 authored by Dave Reid's avatar Dave Reid Committed by Dave Reid

Issue #2521574 by joachim, Dave Reid: When using Features and Strongarm,...

Issue #2521574 by joachim, Dave Reid: When using Features and Strongarm, export XML sitemap variables along with node types, taxonomy vocabularies, and menus
parent da1ae7b7
......@@ -288,3 +288,16 @@ function xmlsitemap_menu_variables() {
}
return $defaults;
}
/**
* Implements hook_features_pipe_COMPONENT_alter().
*
* Add variables to exported menus.
*/
function xmlsitemap_menu_features_pipe_menu_custom_alter(&$pipe, $data, $export) {
if (!empty($data)) {
foreach ($data as $menu_name) {
$pipe['variable'][] = "xmlsitemap_settings_menu_link_{$menu_name}";
}
}
}
......@@ -331,3 +331,16 @@ function xmlsitemap_node_view_access($node, $account = NULL) {
return FALSE;
}
/**
* Implements hook_features_pipe_COMPONENT_alter().
*
* Add variables to exported node types.
*/
function xmlsitemap_node_features_pipe_node_alter(&$pipe, $data, $export) {
if (!empty($data)) {
foreach ($data as $node_type) {
$pipe['variable'][] = "xmlsitemap_settings_node_{$node_type}";
}
}
}
......@@ -263,3 +263,16 @@ function xmlsitemap_taxonomy_entity_query_alter($query) {
}
}
}
/**
* Implements hook_features_pipe_COMPONENT_alter().
*
* Add variables to exported taxonomy vocabularies.
*/
function xmlsitemap_taxonomy_features_pipe_taxonomy_alter(&$pipe, $data, $export) {
if (!empty($data)) {
foreach ($data as $vocabulary_name) {
$pipe['variable'][] = "xmlsitemap_settings_taxonomy_term_{$vocabulary_name}";
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment