alexboia / WP-Trip-Summary

A WordPress trip summary plugin to help travel bloggers manage and display structured information about their train rides and biking or hiking trips
BSD 3-Clause "New" or "Revised" License
13 stars 4 forks source link

Refactor help functionality: extract relevant operations to a class #61

Closed alexboia closed 4 years ago

alexboia commented 4 years ago

Target code area or entity The functions that provide the help content should be extracted to a class. Main plug-in file, abp01-plugin-main.php, the following functions:

Target aspect Code readability

Proposed solution A new class should be defined, with the following singature:

class Abp01_Help {
   public function getHelpContentForLocale($locale) {}

   public function getHelpContentForCurrentLocale() {}
}

Thus: