Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
simple_sitemap
Commits
69f8d311
Commit
69f8d311
authored
Jun 13, 2016
by
Pawel G
Browse files
Add .api.php file to document hook_simple_sitemap_links_alter()
parent
6cb333e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
simple_sitemap.api.php
0 → 100644
View file @
69f8d311
<?php
/**
* @file
* Hooks provided by the Simple XML sitemap module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alter the generated link data before the sitemap is saved.
* This hook gets invoked for every sitemap chunk generated.
*
* @param array &$links
* Array containing multilingual links generated for each path to be indexed.
*/
function
hook_simple_sitemap_links_alter
(
&
$links
)
{
// Remove German links for all paths in the hreflang sitemap.
foreach
(
$links
as
&
$link
)
{
unset
(
$link
[
'urls'
][
'de'
]);
}
}
/**
* @} End of "addtogroup hooks".
*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment