Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / simple_sitemap / simple_sitemap.api.php
1 <?php
2
3 /**
4  * @file
5  * Hooks provided by the Simple XML sitemap module.
6  */
7
8 /**
9  * @addtogroup hooks
10  * @{
11  */
12
13 /**
14  * Alter the generated link data before the sitemap is saved.
15  * This hook gets invoked for every sitemap chunk generated.
16  *
17  * @param array &$links
18  *   Array containing multilingual links generated for each path to be indexed.
19  */
20 function hook_simple_sitemap_links_alter(&$links) {
21
22   // Remove German URL for a certain path in the hreflang sitemap.
23   foreach ($links as &$link) {
24     if ($link['path'] == 'node/1') {
25       // Remove 'loc' URL if it points to a german site.
26       if ($link['langcode'] == 'de') {
27         unset($link);
28       }
29       // If this 'loc' URL points to a non-german site, make sure to remove
30       // its german alternate URL.
31       else {
32         unset($link['alternate_urls']['de']);
33       }
34     }
35   }
36 }
37
38 /**
39  * @} End of "addtogroup hooks".
40  */