Opening this to backport #1500160: Document the 'pages' key in hook_block_info()

API page: http://api.drupal.org/api/drupal/modules%21block%21block.api.php/functio...

Even though pages is documented as "a list of pages", it should not be an array, but a single string with the paths separated by "\n". This should be documented.

Comments

jmarkel’s picture

Status: Active » Needs review
StatusFileSize
new3.72 KB

Here's the patch backported from #1500160: Document the 'pages' key in hook_block_info()

Ach - should have renamed the patch for this issue. Ah well :-(

jmarkel’s picture

StatusFileSize
new3.9 KB

Re-rolled the patch with additional info for the 'pages' key - for BLOCK_VISIBILITY_PHP

jmarkel’s picture

Assigned: jmarkel » Unassigned
jmarkel’s picture

StatusFileSize
new3.9 KB

Dang - made a typo. Here it is, fixed.

jmarkel’s picture

StatusFileSize
new3.92 KB

Updated to note that there are three rather than one path separators allowed - '\n', '\r', and '\r\n'.

jhodgdon’s picture

Status: Needs review » Closed (duplicate)

This issue should just be closed. What we normally do is wait until the 8.x issue has been resolved, then change *that* issue to 7.x, so that the entire issue history is in one place. So I'm closing this as a duplicate of
#1500160: Document the 'pages' key in hook_block_info()
Also, it saves a lot of time and effort to just work on one version at a time, rather than trying to maintain the 8.x and 7.x patches through all the reviews. Thanks!

jhodgdon’s picture

Issue summary: View changes

Updated issue summary.