Skip to content

Commit

Permalink
adding helper method getThemeColourFromID
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel-toast committed Aug 8, 2023
1 parent 2123532 commit db8be59
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ static function getThemeColourFromColourPaletteID($colourPaletteID)
}
}

static function getThemeColourFromID($ID)
{
$themeColours = self::getThemeColoursArray();

// Loop through the $themeColours and return the object that matches the $ID
foreach($themeColours as $themeColour){
if ($ID == $themeColour->CustomID) {
return $themeColour;
}
}
}

static function getColourFormatsForTinyMCE()
{
$colours = self::getThemeColoursArray();
Expand Down

0 comments on commit db8be59

Please sign in to comment.