What is the way to use tokens in PHP code?
I need to show the user profile picture URL, but the following code doesn't work.
<?php
echo "[current-user:picture:url]";
?>
How do I display tokens in a block? I am using Drupal 7.
You could try token_replace
| |||
|
I dont recommend using PHP in a block for many reasons. I would recommend you to use proper implementation of hook_block_view and hook_block_info to do you custom PHP codes in there. | |||
|