Use hook_url_outbound_alter() instead of hook_preprocess_link()

Created on 3 August 2017, almost 8 years ago
Updated 11 June 2025, about 2 months ago

Problem/Motivation

If links created using the l() function are not run through the theme system and instead rendered inline (as when the system variable theme_link = FALSE), then content_lock_preprocess_link() will not be invoked and links like the edit link in the Content Overview form will not contain the necessary token.

Proposed resolution

Use content_lock_url_outbound_alter() instead of content_lock_preprocess_link() to manipulate the query options on links.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

πŸ’¬ Support request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States KeyboardCowboy Denver, CO, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024