function _entity_embed_button_image in Entity Embed 7.2
Same name and namespace in other branches
- 7.3 entity_embed.module \_entity_embed_button_image()
- 7 entity_embed.module \_entity_embed_button_image()
Helper function to create a URL to an embed button icon.
Parameters
int $fid: A file ID.
Return value
string A string containing a URL that may be used to access the file.
1 call to _entity_embed_button_image()
- entity_embed_pre_render_text_format in ./
entity_embed.module - Process text format elements to load and attach assets.
File
- ./
entity_embed.module, line 664 - Provides a CKEditor plugin and text filter for embedding and rendering entities.
Code
function _entity_embed_button_image($fid) {
if ($fid) {
$image = file_load($fid);
return file_create_url($image->uri);
}
else {
return file_create_url(drupal_get_path('module', 'entity_embed') . '/js/plugins/drupalentity/entity.png');
}
}