Problem/Motivation

Functions styleswitcher_active_style() & styleswitcher_default_style() are too cumbersome for use and in their bodies. They return the whole style while it is mostly only one style property needed from them.

Proposed resolution

  • Refactor function styleswitcher_active_style() to return only path of the active style.
  • Refactor function styleswitcher_default_style() to return only machine name of the default style.
  • Create a function to return a theme defined default style without iterating through styles multiple times.
  • Replace all references to $style['is_default'] with the use of the refactored function.

Comments

pingwin4eg’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new11.33 KB

  • pingwin4eg committed e1785b5 on 7.x-2.x
    Issue #2469355 by pingwin4eg: Refactored functions getting active and...
pingwin4eg’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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