Can we use PHP instead?

Created on 27 August 2009, over 15 years ago
Updated 22 April 2024, 9 months ago

I wanted to be able to use conditional statements using tokens, so I needed to use PHP on the fields in the administration section.

I have changed the text fields to textareas in /admin/content/page_title

Then i changed:
from
$title = token_replace_multiple($title, $types);
to
$title = php_filter('process', 0, -1, token_replace_multiple($title, $types));

in page_title.module...

And now I can handle conditional page titles.

Are there any security issues with this approach, if yes, please explain, if no, can it be included in the next commit. Or any other better approaches are welcome.

Thanks in advance.

Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

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.

No activities found.

Production build 0.71.5 2024