Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
simple_sitemap
Commits
69f8d311
Commit
69f8d311
authored
Jun 13, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add .api.php file to document hook_simple_sitemap_links_alter()
parent
6cb333e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
simple_sitemap.api.php
simple_sitemap.api.php
+30
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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