@ (at sign) in Drupal strings

前端 未结 1 690
逝去的感伤
逝去的感伤 2021-01-21 15:36

In another question, someone posted this code in an answer to my question.

drupal_set_message(
  t(\'Some Message @title\'), array(\'@title\' => $form_state[\         


        
相关标签:
1条回答
  • 2021-01-21 16:13

    In Drupal, an @ sign in front of a placeholder is used to signal to Drupal's string parser to run the string attached to the placeholder through check_plain().

    More info about string placeholders can be found on the t() API page.

    0 讨论(0)
提交回复
热议问题