The current docblock for theme_get_setting includes notes for core developers if they update the module. That should be a code comment, not a part of the "how do I use this function" documentation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Status: Active » Needs review
FileSize
1.91 KB

This patch makes minor tweaks to the theme_get_setting comments and moves this entire paragraph to a code comment:

The default values for each setting is defined in this function. To add new
settings, add their default values here, and then add form elements to
system_theme_settings() in system.admin.inc.

Nick Lewis’s picture

I think the next paragraph should simply read "The site-wide defaults are used unless overridden by theme specific settings, or settings declared in theme's .info file." and then its good to go.

JohnAlbin’s picture

What Nick says makes it clear that my changes are insufficient to clarify what the hell is going on. I know the code very well, but didn't update the docs much when I re-wrote the code.

Per the conversation I had with Nick in IRC, I'm replacing all the refs to "site-wide settigns" with "global settings" since that's the text that is used on the admin/appearance/settings form.

Here's a complete re-write of the docs and some of the comments.

JohnAlbin’s picture

Title: docblock for theme_get_setting is too verbose » docblock for theme_get_setting is confusing

Better title.

JohnAlbin’s picture

One more tweak regarding what it means to pass an empty string to $theme per Nick's request in IRC.

Nick Lewis’s picture

Status: Needs review » Reviewed & tested by the community
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks John.

Status: Fixed » Closed (fixed)

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