Skip to content

Commit

Permalink
adding function to pass CSS class names to JS file
Browse files Browse the repository at this point in the history
  • Loading branch information
BFTrick committed Jan 15, 2013
1 parent 0f791eb commit a0f83ca
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions google-font-collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function getFontFamilyNameArray()
}

/**
* Custom Font Class
* getTitle
* this function returns the font title
**/
function getTitle($key)
Expand All @@ -51,7 +51,7 @@ function getTitle($key)
}

/**
* Custom Font Class
* getLocation
* this function returns the font location
**/
function getLocation($key)
Expand All @@ -60,7 +60,7 @@ function getLocation($key)
}

/**
* Custom Font Class
* getCssDeclaration
* this function returns the font css declaration
**/
function getCssDeclaration($key)
Expand All @@ -69,7 +69,7 @@ function getCssDeclaration($key)
}

/**
* Custom Font Class
* getCssClass
* this function returns the font css class
**/
function getCssClass($key)
Expand All @@ -78,7 +78,22 @@ function getCssClass($key)
}

/**
* Custom Font Class
* getCssClassArray
* this function returns an array of css classes
* this function is used to send a JS file an array for the postMessage transport option in the theme customizer should you use it
**/
function getCssClassArray()
{
$result;
foreach ($this->fonts as $key => $value)
{
$result[] = $value->__get("cssClass");
}
return $result;
}

/**
* getTotalNumberOfFonts
* this function returns the total number of fonts
**/
function getTotalNumberOfFonts()
Expand All @@ -87,7 +102,7 @@ function getTotalNumberOfFonts()
}

/**
* Custom Font Class
* printThemeCustomizerCssLocations
* this function prints the links to the css files for the theme customizer
**/
function printThemeCustomizerCssLocations()
Expand All @@ -101,7 +116,7 @@ function printThemeCustomizerCssLocations()
}

/**
* Custom Font Class
* printThemeCustomizerCssClasses
* this function prints the theme customizer css classes necessary to display all of the fonts
**/
function printThemeCustomizerCssClasses()
Expand Down

0 comments on commit a0f83ca

Please sign in to comment.