This is a first stab, at converting plugins to return a renderable array; and also in case they return plain HTML in the $block->content, at least convert it to '#markup' => $block->content;.

The patch isn't full, but marking as needs review, to get feedback.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Needs review » Needs work

There's no need to use #markup if we're just returning strings. The system can handle that and I think we should just stay with it. Using #markup is adding weight to the system that simply doesn't need it.


   $block->title = check_plain($account->name);
+
+  $element['user_picture'] = array(
+    '#theme' => 'user_picture',
+    '#signature' => $account,
+  );
+
+
   $block->content = theme('user_picture', array('account' => $account));

That doesn't do anything. :)

amitaibu’s picture

Status: Needs work » Needs review
FileSize
1.47 KB

> That doesn't do anything. :)

Oops :)
re-rolled,and removed remove #markup as-well.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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