The example is hook_systems_theme_page_alter is incorrect. It shows the operations array accepting a link built with l(). This is incorrect and causes a failure on that page if done in this manner. The correct format should be the same as in the operations[] links in system_themes_pages and accept an array of 'title', 'href', 'query', etc.

I have updated the systems.api.php and patched it to correctly show the function.

Comments

arcaneadam’s picture

Status: Active » Needs review
StatusFileSize
new720 bytes

Attaching the patch file and marking as needs review

tstoeckler’s picture

Status: Needs review » Needs work
+++ b/modules/system/system.api.php
@@ -3924,7 +3924,11 @@ function hook_system_themes_page_alter(&$theme_groups) {
+        'title' => t('Foo'), ¶

Trailing whitespace.

arcaneadam’s picture

Status: Needs work » Needs review
StatusFileSize
new719 bytes

Noted and fixed.

arcaneadam’s picture

Since this is Minor and really more of a Doc issue I'd think it's ready for commit, but I'll leave it up to someone else to mark it as RTBC, since I'm the submitter.

droplet’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Reviewed & tested by the community
arcaneadam’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Verified fixed in e33de1c for 7.x and 1b2cd3a in 8.x marking as closed.

arcaneadam’s picture

Title: hook_system_themes_page_alter is Incorrect » (Needs commit for D7) hook_system_themes_page_alter is Incorrect
Version: 8.x-dev » 7.x-dev
Status: Closed (fixed) » Reviewed & tested by the community

Actually that is a negative on the 7.x change. It only got rolled into 8.x. the commit that it got included on in 8.x (http://drupalcode.org/project/drupal.git/commit/1b2cd3a) when rolled into 7.x didn't include the system.api.php change (http://drupalcode.org/project/drupal.git/commit/e33de1c).

I am marking this back to RTBC and setting it to 7.x. If one of the maintainers could verify that it's committed in D7 this can be closed.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oops! Right you are, good catch.

Committed to 7.x. Thanks!

webchick’s picture

Title: (Needs commit for D7) hook_system_themes_page_alter is Incorrect » hook_system_themes_page_alter documentation is incorrect

Status: Fixed » Closed (fixed)

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