Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
88f026eb
Commit
88f026eb
authored
Apr 11, 2014
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2228795
by Gaelan | eojthebrave: Where did hook_url_outbound_alter go?.
parent
1104509d
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/system/system.api.php
+0
-30
0 additions, 30 deletions
core/modules/system/system.api.php
with
0 additions
and
30 deletions
core/modules/system/system.api.php
+
0
−
30
View file @
88f026eb
...
@@ -2439,36 +2439,6 @@ function hook_system_themes_page_alter(&$theme_groups) {
...
@@ -2439,36 +2439,6 @@ function hook_system_themes_page_alter(&$theme_groups) {
}
}
}
}
/**
* Alters outbound URLs.
*
* @param $path
* The outbound path to alter, not adjusted for path aliases yet. It won't be
* adjusted for path aliases until all modules are finished altering it. This
* may have been altered by other modules before this one.
* @param $options
* A set of URL options for the URL so elements such as a fragment or a query
* string can be added to the URL.
* @param $original_path
* The original path, before being altered by any modules.
*
* @see url()
*/
function
hook_url_outbound_alter
(
&
$path
,
&
$options
,
$original_path
)
{
// Use an external RSS feed rather than the Drupal one.
if
(
$path
==
'rss.xml'
)
{
$path
=
'http://example.com/rss.xml'
;
$options
[
'external'
]
=
TRUE
;
}
// Instead of pointing to user/[uid]/edit, point to user/me/edit.
if
(
preg_match
(
'|^user/([0-9]*)/edit(/.*)?|'
,
$path
,
$matches
))
{
if
(
\Drupal
::
currentUser
()
->
id
()
==
$matches
[
1
])
{
$path
=
'user/me/edit'
.
$matches
[
2
];
}
}
}
/**
/**
* Provide replacement values for placeholder tokens.
* Provide replacement values for placeholder tokens.
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment