php_enable() uses the following code:

 drupal_set_message(t('A !php-code text format has been created.', array('!php-code' => l('PHP code', 'admin/config/content/formats/' . $php_format->format))));

In the documentation for t() is reported the following text:

  • Incorrect HTML in t():

$output .= t('<p>Go to the @contact-page.</p>', array('@contact-page' => l(t('contact page'), 'contact')));

  • Correct HTML in t():

$output .= '<p>' . t('Go to the <a href="@contact-page">contact page</a>.', array('@contact-page' => url('contact'))) . '</p>';

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

Title: Documentation problem with php_enable() » php_enable() uses code that is reported as wrong in the documentation for t()
Component: documentation » php.module
Sivaji_Ganesh_Jojodae’s picture

Title: php_enable() uses code that is reported as wrong in the documentation for t() » Incorrect use of t() in php_enable()
Status: Active » Needs review
FileSize
799 bytes

Agree with kiamlaluno. Attached patch will provide correct placeholder.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

This is exactly right.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.