public static function ShareaholicUtilities::asset_url in Share Buttons, Related Posts, Content Analytics - Shareaholic 8
Same name and namespace in other branches
- 7.3 utilities.php \ShareaholicUtilities::asset_url()
Returns the appropriate asset path for something from our rails app based on environment.
Parameters
string $asset:
Return value
string
2 calls to ShareaholicUtilities::asset_url()
- ShareaholicAdmin::include_css_js_assets in ./
admin.php - Inserts the necessary css and js assets for the Shareaholic Admin Pages
- ShareaholicPublic::js_snippet in ./
public.php - The actual text for the JS snippet because drupal doesn't seem to be able to add JS from template like Wordpress does... Using heredocs for now
File
- ./
utilities.php, line 493
Class
Code
public static function asset_url($asset) {
$env = self::get_env();
if ($env === 'development') {
return 'http://spreadaholic.com:8080/' . $asset;
}
elseif ($env === 'staging') {
return '//d2062rwknz205x.cloudfront.net/' . $asset;
}
else {
return '//cdn.shareaholic.net/' . $asset;
}
}