Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wroxbox’s picture

Changed preprocess_page into hook_page_build and added CSS from CDN.

wroxbox’s picture

Fixed to latest CDN version.

wroxbox’s picture

SocialNicheGuru’s picture

Could there be a switch where an admin can decide which s/he would like with a local library fallback much like jquery_update?

SocialNicheGuru’s picture

Status: Active » Needs review
markhalliwell’s picture

Title: Use Fontawesome from CDN » Add support for CDN version of Font Awesome
Status: Needs review » Needs work

This completely replaces the ability to provide a local version.

mkhamash’s picture

Here is patch that will give the ability to choose between a local and a CDN version of Font Awesome, it adds a checkbox to Drupal Bandwidth optimization settings in performance page, I am not convinced with the place of the checkbox but this is the best place that I could find.

aDarkling’s picture

Works great!

Tried it with css/jscript aggregation on & off.
Code looks good. You might want to compress lines 20-22 to

$requirements['fontawesome']['title'] = $fontawesome['name'];

for code readability consistency, especially since the array was already explicitly defined on line 12.
However that is just a personal style opinion & does not affect the operation of this patch in the least.

inders’s picture

Assigned: Unassigned » inders
Status: Needs review » Reviewed & tested by the community

  • mkhamash authored 98c031c on 7.x-2.x
    Issue #2427075 by wroxbox, mkhamash: Add support for CDN version of Font...
inders’s picture

Status: Reviewed & tested by the community » Closed (fixed)
mkhamash’s picture

FileSize
900 bytes

There was a small mistake in the hook_requirements() message in the original patch that I have uploaded, it would show a warning message "The Font Awesome library could not be found" with using the CDN option.

mkhamash’s picture

Assigned: inders » Unassigned
Status: Closed (fixed) » Needs review

  • mkhamash authored 72d824c on
    Issue #2427075 by wroxbox, mkhamash: Add support for CDN version of Font...
inders’s picture

Status: Needs review » Closed (fixed)

Commit done . Thank you mkhamash !