Problem/Motivation

#2331941: Add class to configured description / help text extracted the rendering of #descriptions to a theme, theme_fel_description(). Now, that was a bit hasty decision as it is very close to theme_form_element_label() in functionality. They belong in pairs, so the hastily selected name is a bit weird in comparison:

  • theme_form_element_label()
  • theme_fel_description()

Proposed resolution

Rename theme_fel_description() to something that better pairs up with theme_form_element_label().Even though there is a awkward mismatch between $form['#title'] and theme_form_element_label() (titlelabel) the template is still called the same in D8, which makes this issue's argument stronger.

Possible candidates:

  1. theme_form_element_description() which completely ignores this module's namespace. The logical name for it if it were implemented by core. Implemented on behalf of …
  2. theme_fel_form_element_description. Same as above prefixed with our namespace.
  3. theme_fel_element_description(). This follows the pattern for other theme replacements in this module.
  4. theme_fel_description(). Keep it as is. When read out lout it is "theme_form_element_layout_description()" which is pretty close to the logical.

Comments

kaare’s picture

Priority: Normal » Minor
Status: Needs work » Active

  • kaare committed fb2529e on 7.x-1.x
    Issue #2337277 by kaare: Rename theme_fel_description to pair up with...
kaare’s picture

Status: Active » Fixed

Went with #2, theme_fel_form_element_description(). This keeps it within our namespace and implements the logical partner with theme_form_element_label().

Status: Fixed » Closed (fixed)

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